Skip to content

Commit 2b0989d

Browse files
author
Tobias Sachs
committed
raZberry: allow custom device id for binary sensors
Fibaro FGK-10x transmits its on/off state with the id -0-113-6-Door-A this change allows us to use such custom Ids for devices that are like binary sensors but do not use the default id (-0-48-1)
1 parent fcc90d9 commit 2b0989d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/raZberry.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ sub new {
12881288
#push( @{ $$self{states} }, 'on', 'off'); I'm not sure we should set the states here, since it's not a controlable item?
12891289

12901290
$$self{master_object} = $object;
1291-
$devid = $devid . "-0-48-1";
1291+
$devid = $devid . "-0-48-1" unless ( $devid =~ m/-\d+-\d+/ );
12921292
$$self{type} = "Binary Sensor";
12931293
$$self{devid} = $devid;
12941294
$object->register( $self, $devid, $options );

0 commit comments

Comments
 (0)