Is it possible to include an input_boolean in a binary_sensor group?

I have a binary_sensor group that represents if we are in our home, and I would like to add an input_boolean to represent if a guest is present in the home. Is it possible to combine an input_boolean in a binary_sensor group?

Create a template binary sensor based on the input boolean, then add that to your group.

Or create a YAML group.

I’m pretty new to Home Assistant still, where can I create a template binary sensor?

Start here: Template Binary Sensor

1 Like

Either my suggestion of using a Template sensor and Tom’s suggestion of using Groups would need to be added to your configuration.yaml file.

Home Assistant YAML Basics

Here is what I have now, but it seems the binary sensor does not turn on when the input_boolean toggle changes. Do I have something wrong in the state part?

template:
  - binary_sensor:
      - name: "Guest mode"
        state: "{{ is_state_attr('input_boolean.guest_mode', 'value', 'on') }}"
state: "{{ states('input_boolean.guest_mode')|bool }}"

Or

state: "{{ is_state('input_boolean.guest_mode', 'on') }}"
1 Like

Thanks, that worked!