Ich habe 2 kleine Notifies, die dafür sorgen, dass die Farbtemperatur meiner Hue Bulbs immer entsprechend des Tagesverlaufs angepasst werden.
Vielleicht findet es ja noch jemand nützlich.
# correct HUE color temperature according to twilight in case I change to colormode "ct"
#
define n_HUE_ct.cm notify HUE_HUEDevice.*:colormode:.*ct {
my $light=ReadingsVal("Twilight","light",0);
if ($light == 6 ) {fhem "set $NAME:FILTER=pct!=0 color 6500"}
elsif ($light < 6 && $light > 0 ) {fhem "set $NAME:FILTER=pct!=0 color 3400"}
elsif ($light == 0 ) {fhem "set $NAME:FILTER=pct!=0 color 2300"}
}
attr n_HUE_ct.cm room System
# correct HUE color temperature according to twilight in case Twilight light value changes
#
define n_HUE_ct notify Twilight:light.*(0|1|5|6) {
my $color;
if ($EVTPART1 == 6){$color = 6500}
elsif ($EVTPART1 < 6 && $EVTPART1 > 0){$color = 3400}
else {$color = 2300}
my @devices=devspec2array("TYPE=HUEDevice");
foreach(@devices) {
if ( ReadingsVal($_,"pct",0) > 0 ) {
fhem "set $_:FILTER=colormode=ct ct $color : transitiontime 3000";
}
}
}
attr n_HUE_ct room System
nochmal etwas verschlankt
Ich nutze schon eine weile deine notifys. Mir fehlt da noch, dass beim einschalten einer
Lampe die colortemp pasend zur Uhrzeit eingestellt wird und nicht auf den wert des letzten Abend...