{{'mdi:rss' if is_state('binary_sensor.rss_feeds','on') else 'mdi:rss-off'}}
the sensor still shows the -off sensor, while the binary_sensor is on, which is also indicated by the fact it is colored correctly, and of course the state.
only after a manual update of the binary_sensor does the icon change.
Which strikes me as odd, since I’ve added an entity to the binary_sensor to update on its state change, and that works for the binary_sensor itself.
should we also set an entity for the icon_template? that would be a first in my setup…not even sure if we can, though I would think the template is non-ambiguous and clear when to update…
If you are using the simple line template you are wrapping it in double quotes ?.. Just a thought, as I’ve missed obvious stuff like that.
But your multiline, though I’d put the true option on its own line (ocd again) looks fine too
Very weird
Try changing the second icon to mdi:music or something in case the icon you’re using is not present
Sounds like the template itself works but home assistant couldn’t parse the entity to update it on.
This is why for template sensors themselves, there is an option to supply the entities to update on separately. Did you try the noninline if else block in the actual template (not the template editor)?
I should have asked if this entity is a template binary sensor, if so, you can supply those entities.
The status of this states.persistent_notification probably never picks up as changing. At startup, your sensor night initiate before this entity too. Therefore it well never update unless manually.
states.persistent_notifications is actually the component that has entities inside. The component itself has no state that can change therefore the template doesn’t know that an entity inside changed.
not sure if that takes less core cycles, or truly is lighter on the system, but it should do as I want… update 2 little sensors, on certain events. the creation of the feed and the dismissal of the persistent notification.
I agree. We seem to just get bits and pieces of this story. I do think that the entity update service is probably the right method here, but hard to say.
there was no need to post the whole package, really
As far as I can see, your problem is with sensor.rss_feeds, sensor.persistent_notifications and binary_sensor.rss_feeds.
They won’t work as you wish as already explained (basically - HA extracts what is after states., is_state() etc and treats it as entity_id. In case of states.persistent_notification it will lead you nowhere. And maybe because of that there will be no updates to attributes.
The easiest way is to add entity_id: sensor.time to your sensors as described in docs.
Or change your approach.
Tbh the whole config now works as desired.
No brute force updates per minute, but on event.
All sensors update accordingly and I’ve got a nice view in the frontend
Next up to try and create a button in the markdown config to dismiss the notifications, or, if not possible, add them to the entities of the entities card. Never finished…