"Helper sensors" to HomeKit?

Hi there!

An I have another question! :slight_smile: I want to get some Push Notifications throug HomeKit which ist possible when a state of a binary sensor changes.

So I need a binary sensor which states the status of a helper switch. Basically this is what I want to do an in Home Assistant its working great:

  - platform: template
    sensors:
      window_still_open:
        value_template: "{{ states('input_boolean.windows_still_open') }}"

      bad_air_quality:
        value_template: "{{ states('input_boolean.bad_air_quality') }}"

      dryer_finished:
        value_template: "{{ states('input_boolean.dryer_finished') }}"

Unfortunately these sensors are not shown in HomeKit where I need them… I played around with some code I found but every time I add “binary_sensor” anywhere in the yaml its not working anymore… Any idea how I get that into HomeKit?

Thank you!

1 Like

Got it running with this in configuration.yaml

template:
  - binary_sensor:
      - name: window_still_open
        state: > 
          {{ is_state('input_boolean.windows_still_open', 'on') }}
        device_class: motion

  - binary_sensor:
      - name: bad_air_quality
        state: > 
          {{ is_state('input_boolean.bad_air_quality', 'on') }}
        device_class: motion

  - binary_sensor:
      - name: dryer_finished
        state: > 
          {{ is_state('input_boolean.dryer_finished', 'on') }}
        device_class: motion

Closed! :slight_smile:

2 Likes