mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
30_pilight_*: fix trigger changes twice
git-svn-id: https://svn.fhem.de/fhem/trunk@8665 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
fd207ee9f4
commit
2283bc9a87
@ -1,6 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 30_pilight_*: restore (StateFn)
|
||||
- bugfix: 30_pilight_*: restore (StateFn), trigger changes twice
|
||||
- feature: 30_pilight_dimmer: new attributes dimlevel_on, dimlevel_off
|
||||
dimmers without direct dimlevel support (switch combined with screen)
|
||||
- bugfix: 73_km200: Bugfix for sorting and comparison method
|
||||
|
@ -112,9 +112,9 @@ sub pilight_dimmer_Parse($$)
|
||||
if ($state eq "down") {
|
||||
$dimlevel = $dimlevel_old - $dimlevel_step;
|
||||
$state="on";
|
||||
if ($dimlevel < 0) {
|
||||
if ($dimlevel <= 0) {
|
||||
$state="off";
|
||||
$dimlevel = 0;
|
||||
$dimlevel= AttrVal($chash->{NAME}, "dimlevel_off",0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ sub pilight_dimmer_Parse($$)
|
||||
Log3 $chash->{NAME}, 5, "pilight_dimmer_Parse: $dimlevel_old $dimlevel";
|
||||
$dimlevel = int($dimlevel+0.5);
|
||||
Log3 $chash->{NAME}, 5, "pilight_dimmer_Parse: $dimlevel_old round $dimlevel";
|
||||
readingsBulkUpdate($chash,"dimlevel",$dimlevel);
|
||||
readingsBulkUpdate($chash,"dimlevel",$dimlevel) if ($dimlevel_old != $dimlevel);
|
||||
}
|
||||
readingsEndUpdate($chash, 1);
|
||||
|
||||
@ -260,7 +260,10 @@ sub pilight_dimmer_Set($$)
|
||||
delete $hash->{helper}{DEV_DIMLEVEL} if ($set eq "off");
|
||||
|
||||
pilight_dimmer_Write($hash,$set,$dimlevel);
|
||||
return undef;
|
||||
#keinen Trigger bei Set auslösen
|
||||
#Aktualisierung erfolgt in Parse
|
||||
my $skipTrigger = 1;
|
||||
return undef,$skipTrigger;
|
||||
}
|
||||
|
||||
#####################################
|
||||
|
@ -124,7 +124,10 @@ sub pilight_switch_Set($$)
|
||||
|
||||
my $msg = "$me,$v";
|
||||
IOWrite($hash, $msg);
|
||||
return undef;
|
||||
#keinen Trigger bei Set auslösen
|
||||
#Aktualisierung erfolgt in Parse
|
||||
my $skipTrigger = 1;
|
||||
return undef,$skipTrigger;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user