Closed pdobrien3 closed 2 years ago
Suppose add a condition that the sensor state must not be Null?
Do I get it right you get a notification on your phone asking whether you want to update garbage collection. If you say yes, it will then trigger the sensor update with the current day (or in two days or tomorrow if it is Friday or Saturday). So it will say garbage collection is today. And after the day is finished it it will show None as there will not be any next collection date defined? Not sure I understand this use-case. But if this is how you want this to work, then ok.
Yes, you hit the nail on the head. So a condition on the automation that the template sensor is not null should work. I actually got my first working date this Saturday so I am waiting to determine the state of all sensors involved tomorrow.
Things seem to have stabilized. No idea what changes fixed things. I think trigger based template sensors maintaining state and some of the code stuff you have done. Also, actually getting a valid date into the calendar. Anyway, I think all good at this stage. Thanks
Before you submit a new bug report, please check that
Write your question here
I use the companion app actionable notifications to send me a notification on friday and saturday to see if the yard was mowed and there are grass clippings that need to go out. I haven't quite figured out how this custom component works and how to deal with a sensor on home assistant restart.
This is my current sensor:
This is my automation:
At some point during the week, sensor.grass gets a state of null. I have tried adding:
as a trigger for sensor.grass_trigger_sensor but then it adds the current date for every home assistant restart. otherwise I get these errors at startup:
What is the best way to deal with a null date in sensor.grass_trigger_sensor?