2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

10_EnOcean: subType gateway/dimming: set-command set reading dim

git-svn-id: https://svn.fhem.de/fhem/trunk@8449 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klaus-schauer 2015-04-18 05:48:55 +00:00
parent 1bec04a4a3
commit 6dd36c396d

View File

@ -1,5 +1,6 @@
############################################## ##############################################
# $Id$ # $Id$
# 2015-04-18
# EnOcean Security in Perl, teach-in, VAES, MAC and message handling # EnOcean Security in Perl, teach-in, VAES, MAC and message handling
# Copyright: Jan Schneider (timberwolf at tec-observer dot de) # Copyright: Jan Schneider (timberwolf at tec-observer dot de)
@ -1600,6 +1601,7 @@ sub EnOcean_Set($@)
shift(@a); shift(@a);
} }
$sendDimCmd = 1; $sendDimCmd = 1;
readingsSingleUpdate ($hash, "dim", $dimVal, 1);
} elsif ($cmd eq "dimup") { } elsif ($cmd eq "dimup") {
return "Usage: $cmd dim/% [rampTime/s lock|unlock]" return "Usage: $cmd dim/% [rampTime/s lock|unlock]"
@ -1615,6 +1617,7 @@ sub EnOcean_Set($@)
shift(@a); shift(@a);
} }
$sendDimCmd = 1; $sendDimCmd = 1;
readingsSingleUpdate ($hash, "dim", $dimVal, 1);
} elsif ($cmd eq "dimdown") { } elsif ($cmd eq "dimdown") {
return "Usage: $cmd dim/% [rampTime/s lock|unlock]" return "Usage: $cmd dim/% [rampTime/s lock|unlock]"
@ -1630,6 +1633,7 @@ sub EnOcean_Set($@)
shift(@a); shift(@a);
} }
$sendDimCmd = 1; $sendDimCmd = 1;
readingsSingleUpdate ($hash, "dim", $dimVal, 1);
} elsif ($cmd eq "on") { } elsif ($cmd eq "on") {
$rampTime = 1; $rampTime = 1;
@ -1655,12 +1659,14 @@ sub EnOcean_Set($@)
} }
} }
$sendDimCmd = 1; $sendDimCmd = 1;
readingsSingleUpdate ($hash, "dim", $dimVal, 1);
} elsif ($cmd eq "off") { } elsif ($cmd eq "off") {
$dimVal = 0; $dimVal = 0;
$rampTime = 1; $rampTime = 1;
$setCmd = 8; $setCmd = 8;
$sendDimCmd = 1; $sendDimCmd = 1;
readingsSingleUpdate ($hash, "dim", $dimVal, 1);
} else { } else {
my $cmdList = "dim:slider,0,1,100 on:noArg off:noArg teach:noArg"; my $cmdList = "dim:slider,0,1,100 on:noArg off:noArg teach:noArg";