2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

10_EnOcean: readings channel<x> set by set-commands

git-svn-id: https://svn.fhem.de/fhem/trunk@11866 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klaus-schauer 2016-07-31 06:42:13 +00:00
parent 23d1914669
commit 42246f657a

View File

@ -2099,10 +2099,14 @@ sub EnOcean_Set($@)
$switchCmd |= ($d2 << 1) | 0x01;
}
}
if (defined $sendCmd) {
if (defined $sendCmd) {
$data = sprintf "%02X", $switchCmd;
$rorg = "F6";
Log3 $name, 3, "EnOcean set $name $cmd";
if ($updateState) {
readingsSingleUpdate($hash, "channel" . $1, $cmd1, 1) if ($cmd1 =~ m/^([A-D])./);
readingsSingleUpdate($hash, "channel" . $1, $cmd2, 1) if ($cmd2 && $cmd2 =~ m/^([A-D])./);
}
readingsSingleUpdate($hash, ".lastChannel", $lastChannel, 0);
}