I have two templates named Dusk Luminance and Dusk Elevation. I've combined these two into the combined template below named Dusk Combined. Currently the Dusk Luminance and Dusk Elevation sensors are both in the "on" state. Yet the combined template below remains "off". Any idea what could be causing this behavior?
{{ is_state('binary_sensor.dusk_luminance', 'on') or
is_state('binary_sensor.dusk_elevation', 'on') }}
While it doesn't address the question of the state of your entity, you can't test a Trigger Condition like that... The condition Test function is outside the actual automation, since the automation isn't running, there isn't a trigger.id value to compare against. The condition Test tool should always fail when used on a Trigger Condition.
Did you mean for that to be a State Condition, maybe?
Have you checked the template, and its parts, in the Template Editor? What is the result if you paste the following into the editor?
Currently the Dusk Elevation and Dusk Luminance are both in the "on" state. I assumed combining them with an "OR" statement would cause it to be in the "on" state if one or the other is in the on state. Currently they are both in the "on" state.
Showing us a screenshot of a section of a dashboard card without the card config doesn't help us. All of those could be completely different entities or you could need to refresh your browser cache.
Based on the results from the Template Editor, it looks like those are not the correct entity IDs. You need to find the correct entity IDs for those two sensors.
I changed the "Dusk Combined" template to the following, which toggles On/Off when I change the 'on' to 'off' in either statement. So I think this is correct.
-Thanks
{{ is_state('binary_sensor.sun_sunset_template', 'on') or
is_state('binary_sensor.aqara_t1_light_sensor_luminance_template', 'on') }}