I have an issue, i try to make a light switch off after a before set time.
I am using a code snipet found on the forum as weel as an automation to make it happen, my issue is that the remaining time which i use as a trigger does not update automatically, but does update when i move the slider around, what am I missing ?
You can’t use now() anymore as HA wont update that as it used to. There are mentions to it in the recent changelogs, but if you really want to continue updating on a per second/minute basis you will need to use the service homeassistant.update for the sensor, and use a time trigger automation to update it.
OK to be specific, you used to be able to specify sensor.time as an entity for a template sensor, now you cannot. Now you need to use the automation to update it.
the part that was removed was the “entity_id:” part to force the sensor to update if it couldn’t find any entities to update on (like when you use now() ). You could always use sensor.time in the template and it would work fine and update every minute. That hasn’t changed. You can still use sensor.time in the template and it will still update at least once a minute.
Apparently after 117 is released you won’t need to use it since it will update on now(). But…you can still use sensor.time even then.
My point is sensor.time has always been, is now, and always will be for the foreseeable future, valid.