i have several input_datetime to interact to
i want to On or Off the switch in the same automation… comparing the time.state with all my input_datetime values
my ideia is:
every second
compare all input_datetime values with time.state
and switch ON or OFF or nothing… as action
any one sugest any soluction?
nice to learn in this community
Thanks to 123 Taras
Your original automation is triggered every minute. So it turns on the switch at the desired time and turns it off for every other time. That means the switch is turned on for just one minute and then turned off. Is that how you want it to work?
An input_datetime only stores the time. How do you plan to tell the automation that the switch should be turned on or off at the specified time?
Why check every second if the time you’re specifying is in hours and minutes?
sensor.time changes every minute. That’s adequate for most scheduling applications.