removed set for devicelogs window, door, motion, lightsensor and photosensor
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1891 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -144,6 +144,14 @@ TRX_LIGHT_Set($@)
|
|||||||
return "No set implemented for $device_type";
|
return "No set implemented for $device_type";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( lc($hash->{TRX_LIGHT_devicelog}) eq "window" || lc($hash->{TRX_LIGHT_devicelog}) eq "door" ||
|
||||||
|
lc($hash->{TRX_LIGHT_devicelog}) eq "motion" ||
|
||||||
|
lc($hash->{TRX_LIGHT_devicelog}) eq "lightsensor" || lc($hash->{TRX_LIGHT_devicelog}) eq "photosensor"
|
||||||
|
) {
|
||||||
|
return "No set implemented for $device_type";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
my $device_type_num = $light_device_c2b{$device_type};
|
my $device_type_num = $light_device_c2b{$device_type};
|
||||||
if(!defined($device_type_num)) {
|
if(!defined($device_type_num)) {
|
||||||
return "Unknown device_type, choose one of " .
|
return "Unknown device_type, choose one of " .
|
||||||
@@ -431,6 +439,14 @@ sub TRX_LIGHT_parse_X10 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lc($def->{TRX_LIGHT_devicelog}) eq "window" || lc($def->{TRX_LIGHT_devicelog}) eq "door") {
|
||||||
|
$command = ($command eq "on") ? "Open" : "Closed" ;
|
||||||
|
} elsif (lc($def->{TRX_LIGHT_devicelog}) eq "motion") {
|
||||||
|
$command = ($command eq "on") ? "alert" : "normal" ;
|
||||||
|
} elsif (lc($def->{TRX_LIGHT_devicelog}) eq "lightsensor" || lc($def->{TRX_LIGHT_devicelog}) eq "photosensor") {
|
||||||
|
$command = ($command eq "on") ? "dark" : "bright" ;
|
||||||
|
}
|
||||||
|
|
||||||
if ($type == 0x10 || $type == 0x11) {
|
if ($type == 0x10 || $type == 0x11) {
|
||||||
# try to use it for all types:
|
# try to use it for all types:
|
||||||
$current = $command;
|
$current = $command;
|
||||||
|
|||||||
Reference in New Issue
Block a user