Skip to content

Commit

Permalink
raZberry: allow custom device id for binary sensors
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Tobias Sachs committed Jan 7, 2017
1 parent fcc90d9 commit 2b0989d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/raZberry.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ sub new {
#push( @{ $$self{states} }, 'on', 'off'); I'm not sure we should set the states here, since it's not a controlable item?

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

0 comments on commit 2b0989d

Please sign in to comment.