Moin,
ich hab ein userReading "state1" in einem device ZufallsTimerHWR (TYPE RandomTimer), welches vom device "ug_rolloautomatik" abhängig ist, aber bei dessen Änderung nicht sofort, sondern erst nach einer gewissen Zeit verändert wird.
(Wie) kann ich die sofortige Reaktion des userReading anstoßen?
define ZufallsTimerHWR RandomTimer *{sunset("REAL",1000,"16:00","23:00")} gaeste_wc {Value("SimStopTime")} 600\
attr ZufallsTimerHWR switchmode 800/200
attr ZufallsTimerHWR userReadings state1 { ReadingsVal("ug_rolloautomatik","state","on")}, state2 {(split(" ", ReadingsVal("ZufallsTimerHWR","StartTime","")))[1]}
# CFGFN
# COMMAND off
# DEF *{sunset("REAL",1000,"16:00","23:00")} gaeste_wc {Value("SimStopTime")} 600
#
# DEVICE gaeste_wc
# FUUID 663ce445-f33f-b5ae-a9f8-879139775717d9ef
# NAME ZufallsTimerHWR
# NR 730
# STATE inactive
# TYPE RandomTimer
# eventCount 234
# READINGS:
# 2024-05-18 21:51:36 LastCommand set gaeste_wc off
# 2024-05-18 21:55:15 StartTime 2024-05-19 21:22:55
# 2024-05-18 21:55:15 StopTime 2024-05-19 21:45:00
# 2024-05-13 21:31:38 TimeToSwitch 600
# 2024-05-19 09:06:14 active 0
# 2024-05-18 22:29:20 state inactive
# 2024-05-19 09:06:14 state1 on
# 2024-05-19 09:06:14 state2 21:22:55
# helper:
# NEXT_CHECK 19.05.2024 09:15:48
# REL
# REP *
# SIGMAWHENOFF 800
# SIGMAWHENON 200
# STARTTIME 19.05.2024 21:22:55
# STOPTIME 19.05.2024 21:45:00
# SWITCHMODE 800/200
# S_REL
# TIMESPEC_START *{sunset("REAL",1000,"16:00","23:00")}
# TIMESPEC_STOP {Value("SimStopTime")}
# TIMETOSWITCH 600
# VAR_DURATION 0
# VAR_START 0
# active 0
# offReading state
# offRegex off
# startTime 1716146575
# stopTime 1716147900
#
setstate ZufallsTimerHWR inactive
setstate ZufallsTimerHWR 2024-05-18 21:51:36 LastCommand set gaeste_wc off
setstate ZufallsTimerHWR 2024-05-18 21:55:15 StartTime 2024-05-19 21:22:55
setstate ZufallsTimerHWR 2024-05-18 21:55:15 StopTime 2024-05-19 21:45:00
setstate ZufallsTimerHWR 2024-05-13 21:31:38 TimeToSwitch 600
setstate ZufallsTimerHWR 2024-05-19 09:06:14 active 0
setstate ZufallsTimerHWR 2024-05-18 22:29:20 state inactive
setstate ZufallsTimerHWR 2024-05-19 09:06:14 state1 on
setstate ZufallsTimerHWR 2024-05-19 09:06:14 state2 21:22:55
Ein userReading wird nur vom eigenen Device getriggert.
In deinem Fall musst du mit notify und setreading arbeiten.