-
Hi, i would like to capture in Berry if Timer1 is enabled/disabled. So i created this test:
This triggers if i enable/disable Timer1 in the gui as expected, but it also triggers if i enable/disable all other timers (Timer2, Timer3, ...). How would i write a rule in berry, that only triggers for a specific timer? Thanks for any help of the berry/tasmota experts. I read the docs in the Rules about "multi level JSON messages", so i thought my Timers#Timer1#Enable would only trigger for Timer1. I also tried Timer1#Enable, but to no avail. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
If you had read the console output, you'd have seen the explanation. When you do any update to timers, Tasmota will execute the command To find out what timer detail was changed, you'd have to keep last timers payload saved, and compare with the update. |
Beta Was this translation helpful? Give feedback.
-
Hi sfromis, i need some further help! When the rule above is triggered by any timer change, my variable d is a string (that somehow looks like json, but it is not?): This is the output (i deleted all subsequent timers after Timer5 for better readability
How could i convert d to map, so that i easily can access the various values, like dmap['Timer5']['Days'] (assuming dmap is the map representation of d? I hope i don't have to parse it as a string. Thanks for your continued help! |
Beta Was this translation helpful? Give feedback.
If you had read the console output, you'd have seen the explanation. When you do any update to timers, Tasmota will execute the command
Timers
reporting the state of all timers. YourTimers#Timer1#Enable
does work as you thought, but when the reported timers state contains all timers, you'll always see each trigger firing, with no option to avoid this.To find out what timer detail was changed, you'd have to keep last timers payload saved, and compare with the update.