mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
removed set for devicelogs window, door, motion, lightsensor and photosensor
git-svn-id: https://svn.fhem.de/fhem/trunk@1891 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a2048bd526
commit
1826e71fe5
@ -144,6 +144,14 @@ TRX_LIGHT_Set($@)
|
||||
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};
|
||||
if(!defined($device_type_num)) {
|
||||
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) {
|
||||
# try to use it for all types:
|
||||
$current = $command;
|
||||
|
Loading…
x
Reference in New Issue
Block a user