First post here, so apologies if posted in the wrong location.
I have an recently made my slow cooker “smart” with a TP-Link plug and have been attempting to make an “interactive” front end card with an automation behind it for turning the slow cooker on and off at user defined times.
I’m struggling with the automation though, and wondered if anyone here could help.The automation is below:
It is my aim that at the time in the template (pre-defined through the frontend), the slow cooker will turn on, provided that the input_boolean switch is also on. The front end card looks like this:
Hassio reports no errors through “Check Configuration”, so the code itself doesn’t produce errors, however also doesn’t fire the automation.
Any help is much appreciated.
Joshua
Solution was to ensure that the sensor.time was set in the sensor.yaml file so that the automation had a time for comparison. All sorted now.
Can you format your post? Also, you probably don’t need to use the timestamp for the comparison. If I recall correctly (can’t check on phone) the state of a datetime is the same as sensor.time as long as the datetime doesn’t contain a date as well as time.
Also, I Believe you need to remove the ,false on the custom timestamp because it puts your time in UTC
It looks identical to multiple automations I have comparing time to an input boolean, and they work every day for me. EDIT: the False makes it local time. True is 0GMT.
Reformatted the post as requested. I spotted it when I originally posted - had selected the wrong option in the formatting options.
I’ve also realised what I hadn’t been doing… And it is really stupid.
I hadn’t set up the time sensor in my sensor.yaml file. I had wrongly assumed that it would use the normal time platform that I’ve used as a trigger for other automations. Now the sensor is set up, and it is able to match the actual time with the defined time, it is working well.