i have binary sensor (Z-Wave windows sensor Shenzhen Neo Electronics Co Ltd) named binary_sensor.sensor_window_office. Everything works fine, but it is not visible on the phone in the Apple Homekit application. I try add device_class: window via “Customization” but still not working.
So, i add to configuraton.yaml :
binary_sensor:
platform: template
sensors:
window_office:
friendly_name: “Window office”
device_class: window
value_template: >
{% if is_state(‘binary_sensor.sensor_window_office’, ‘on’) %}
On
{% else %}
Off
{% endif %}
When i open window - binary_sensor.sensor_window_office change state to on, when close - to off.
Now, i have visible binary_sensor.window_office on Lovelace and in phone HomeKit application. But this sensor have always status “off”.
When i try this template in Developer Tools i get:
Yes, I have a delayed start homekt but this should not affect the operation of the created binary_sensor, because it should change its status depending on the status of the original sensor, which it does not want to do.