Template Binary Sensor that changes state depending on multiple Switches

Simply put, I would like to create a binary sensor that returns true if any of the associated switch entities are on.

Context: I have an Orbit B-Hyve irrigation system that I’ve connected to Home Assistant through a Custom Component. Works like a charm, in that I can individually control all the zones and programs, and the Home Assistant entities automatically update regardless of how the system was started (i.e. triggering the watering controller from the app, the controller itself, Apple Home, etc. will update the switch state in Home Assistant).

By default, the custom component creates a ton of switches to represent each zone and program. For my main dashboard, I’d to be able to have a single binary_sensor that returns “true” if any of the switches are on (and thus, the system is currently running). Templating is completely over my head, however, so here I am.

So to recap: I need help to create a helper template binary sensor whose state template sets the state to true if any of a set of switches are on. If you feel like schooling me in how template entities work too, that would be great. :slight_smile:

Hi AwesomeCaden73,

This will do it…
GitHub - SirGoodenough/Availability-Template: Custom Template for checking the availiability of an entity..

How about you create a group?

The group’s state will be On as long as any of the belonging switches is On as well, you can test with a template: {{ is_state('switch.your_switch_group', 'on') }}