Hallo Ralf,
habe es herausgefunden. Das nicht funktionierende Gerät ist vom "protocol" "V3". Im Code habe ich gesehen, dass hier nicht vorgesehen war, dass es sich um etwas anderes als einen Dimmer handeln könnte. Bei mir ist es leider ein Schalter.
Wenn ich die Zeilen 243 bis 265 deiner Version um einen zusätzlichen Fallback (siehe vorletztes else) anpasse funktioniert alles perfekt.
if ($hash->{READINGS}{protocol}{VAL} eq "V3") {
if( AttrVal($name, "model", "") eq "itdimmer" ) {
if ($cmd eq "on") {
readingsSingleUpdate($lh, "dim", "100",1);
readingsSingleUpdate($lh, "state", "on",1);
} elsif ($cmd eq "off") {
readingsSingleUpdate($lh, "dim", "0",1);
readingsSingleUpdate($lh, "state", "off",1);
} else {
if ($cmd eq "dim100%") {
$lh->{STATE} = "on";
readingsSingleUpdate($lh, "state", "on",1);
} elsif ($cmd eq "dim00%") {
$lh->{STATE} = "off";
readingsSingleUpdate($lh, "state", "off",1);
} else {
readingsSingleUpdate($lh, "state", $cmd,1);
}
}
} else {
readingsSingleUpdate($lh, "state", $cmd,1);
}
} else {
readingsSingleUpdate($lh, "state", $cmd,1);
}
Könntest du das bitte in deine Version aufnehmen, so dass der Maintainer nur einmal mergen muss?
@DeeSPe: Ich bin mir sicher, dass es daran liegt, da nun alles funktioniert. Bei meinen Homematic Geräten war das Problem nicht aufgetreten, da hier das readings update schon korrekt implementiert wurde, sowohl für Rollos als auch Schalter.