Tried searching online but couldnt find anything but Im sure there must be a cleaner way of templating this?
{{
is_state('sensor.home_x_direction_of_travel', "towards") or
is_state('sensor.home_y_direction_of_travel', "towards") or
is_state('sensor.home_z_direction_of_travel', "towards") or
is_state('sensor.home_x_direction_of_travel', "away_from") or
is_state('sensor.home_y_direction_of_travel', "away_from") or
is_state('sensor.home_z_direction_of_travel', "away_from")
}}
Im making a tenplate sensor that will be true if any of the above are true. When the sensor is true it will trigger an automation and the automation runs only whilst the sensor is true if that makes sense?
Beautiful. Could reduce it with format(*'xyz'); and I think the template editor might be messing with you in terms of what’s a list and what’s a string. My version: