When I run that whole template in the dev tools it says afternoon, which is right. On my view which has this, it says morning. When I run {{ states.sensor.time_of_day }} through the template tool it says:
<template state sensor.time_of_day=morning; friendly_name=Time of Day @ 2018-02-04T10:06:01.452237-05:00>
This is probably the last time I bounced my container.
What might be going on here? What causes made-up sensors like this to get re-evaluated?
Strange, when I run it today it still points implies that the last time that it was run was yesterday morning: <template state sensor.time_of_day=morning; friendly_name=Time of Day @ 2018-02-05T07:52:19.666247-05:00>
Not sure, but as long as i know, template sensors only update if an entity in the value_template changes it’s state.
In the moment your template get’s only evaluated on sun state change.
You could use the time_date sensor to replace the as_timestamp(now()) in your template.
I don’t get what you are trying to do with this sensor… what is making those 2 sensors in the states()? if its a component, then those states should return a string, and the strings need to match exactly.
does {{ states(“sensor.ha_config_current”) ==states(“sensor.ha_config_last”) }}
evaluate as true?
It looks like they are both strings and it should evaluate as true. If it does, then you should watch and see when each of these sensors change. You should be able to see it in history. If the sensors aren’t changing, then any sensor based on them won’t change.
I wonder if the event is getting suppressed somehow? Have you ran with logger in debug? It’s going to make your hass.log file huge but you’ll get to see all the crap firing back and forth.
the dash just removes whitespace. The way he is using it is useless and doesn’t modify the expression. If he used it during a for loop, it would remove the carriage return between each object.