From 2b0989d758fb9588204bc26b87cb489c90aba8c6 Mon Sep 17 00:00:00 2001 From: Tobias Sachs Date: Sat, 7 Jan 2017 19:21:11 +0100 Subject: [PATCH] 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) --- lib/raZberry.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/raZberry.pm b/lib/raZberry.pm index cf7eeb6ee..be606b082 100755 --- a/lib/raZberry.pm +++ b/lib/raZberry.pm @@ -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 );