Template results are now rendered to native Python types. @@ -276,19 +276,50 @@ homeassistant: Please note, this is a transitional option, which will be removed in the future. +([@frenck] - [#41227]) + +
++ Previously we implemented a rate limit of 1 update per minute for -`states.DOMAIN` in templates. This works fine for all `states`, however it turned -out to be too conservative for `states.DOMAIN` per -[this comment](https://github.com/home-assistant/architecture/issues/449#issuecomment-711032893). -Therefore it has been changed to an update once every second. +`states.DOMAIN` in templates. This has been changed to an update once every second. -It is no longer necessary to reference `sensor.time`, `sensor.date`, or manually -update template entities that do not listen for state changes, as they will -automatically update when an referenced entity changes state or every 60 seconds -after the last state changed event when `now()` or `utcnow()` is contained in -the template. +Templates using `states` (without a domain) still have a rate limit of 1 update per minute. -([@frenck] - [#41227]) ([@bdraco] - [#42004] [#41147]) +([@bdraco] - [#42004]) + +
+ ++The `entity_id:` attribute was recently removed from template entities because +the templates are now able to find all referenced entities automatically. This +removal introduced a new problem where templates using the current time could +no longer use `entity_id: sensor.time` to ensure periodic updates. + +With apologies to those who have spent the last couple of releases adding +workarounds to their templates, we are now introducing an auto-refresh feature +to time-based templates. + +It is thus no longer necessary to reference `sensor.time`, `sensor.date` or manually +update template entities when `now()` or `utcnow()` is present in the template. + +The template will automatically be updated when: + +- A referenced entity changes state. +- At the start of each minute when `now()` or `utcnow()` is present in the template. + +Please note, if you have a time-based template where you _do not_ want it to +update periodically it will now have to be reworked to not use `now()`. + +([@bdraco] - [#41147] [#42225])