[gelöst] Aktion bei Datum

Begonnen von joewanne, 24 Juni 2019, 19:58:04

Vorheriges Thema - Nächstes Thema

joewanne

#15
Zitat von: Otto123 am 24 Juni 2019, 21:45:27
Es gibt wirklich gute Beispiele in der langen Doku zu Calendar.
Wenn Du meine Notiz gebrauchen kannst.  ;)

Gruß Otto

Hallo Otto,
das mit dem Calendar funktioniert Prima!
Das war dann auch die Lösung des Problems


define AquariumWW Calendar ical url https://xxxxx mein Kalender xxxxx.ical

define myAquarium CALVIEW AquariumWW 1
attr myAquarium modes next

define myAquarium_notify_1 notify AQ_WW:status:.*|myAquarium:t_001_daysleft:.* {\
my $status = ReadingsVal("AQ_WW","status","");;\
my $wwtage = ReadingsVal("myAquarium","t_001_daysleft","");;\
Log3 ($wwtage, 1, "wwtage= $wwtage");;\
if ($wwtage >= 3 && $status == 1) { fhem("set AQ_WW alarm 1")}\
if ($wwtage == 2 && $status == 1) { fhem("set AQ_WW alarm 2;; set AQ_WW status 2;; set pushmsg msg Wasserwechsel steht an!")}\
if ($wwtage == 0 && $status == 2) { fhem("set AQ_WW alarm 3;; set AQ_WW status 3;; set pushmsg msg Wasserwechsel steht heute an!")}\
}



Dann habe ich mir in FTUI noch einen Schalter erstellt, der den Status bei Betätigung wieder auf 1 stellt.


Vielen lieben Dank für Eure Hilfe.

Liebe Grüße
Jörg