-
Hi I would like a rule to kick in when a message to power on the device comes through mqtt I managed to get that working with the button in general I want the rule to kick in when the power is set to on manually and not by the schedule. If there is other way to accomplish that i would be open for suggestions |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
The simpler way is PulseTime, but that would apply to all sources of turning power on. Your rules may have undesired effects if the scheduled command via MQTT comes in the 60-second interval. You could have the command via MQTT cancel the interval using |
Beta Was this translation helpful? Give feedback.
-
If "rule to kick in when the power is set to on manually" means when the user press the button, you already have it. |
Beta Was this translation helpful? Give feedback.
-
thank you for you answers. maybe I should clarify what i want to accomplish I have a timer set up (Configuration - configure timer) to switch on the light twice a day, lets say 9am-11am and 7pm to 9pm. that works great. |
Beta Was this translation helpful? Give feedback.
-
Thank you both for quick reply button is covered by this and i can get custom time set by the event here that leaves the webui but I can live without it for now |
Beta Was this translation helpful? Give feedback.
-
thanks that worked
the reason my code did not work was because i forgot to put "Backlog" in |
Beta Was this translation helpful? Give feedback.
Thank you both for quick reply
button is covered by this
Rule1 ON button1#state DO Backlog Power1 %value%; RuleTimer1 60 ENDON ON Rules#Timer=1 DO Power1 off ENDON
and i can get custom time set by the event here
Rule2 ON event#manualpower DO Power1 on ENDON ON event#manualpower DO Var2 %value% ENDON ON event#manualpower DO RuleTimer1 %Var2% ENDON ON Rules#Timer=1 DO Power1 off ENDON
that leaves the webui but I can live without it for now