greets all. Obviously unclear on yet more concepts, even after repeated reading of the docs and everyone else’s problems in the Configuration section here.
hassio on an odroid-C2. More info at bottom.
Sensor is a zwave ecolink tilt sensor for a garage door. Zwave controller is an ISY994i-ZW with the community integration.
Diving right in, pertinent sections:
/config/configuration.yaml
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
sensor: !include sensors.yaml
# Configure binary sensors
binary_sensor: !include binary_sensors.yaml <----
/config/binary_sensors.yaml
platform: template
sensors:
test_garage_door_invert:
value_template: >
{% if is_state('binary_sensor.test_garage_door_sensor', 'off') %}
closed
{% else %}
open
{% endif %}
device_class: garage_door
friendly_name: "Garage Door Test"
garage_door_invert:
friendly_name: "Garage Door"
device_class: garage_door
value_template: >
{% if is_state('binary_sensor.garage_door_sensor', 'off') %}
closed
{% elif is_state('binary_sensor.garage_door_sensor', 'on') %}
open
{% else %}
error
{% endif %}
the ‘test_garage_door_sensor’ is the one I’m working with for these purposes.
‘off’ from the ISY is garage door closed.
‘on’ from the ISY is garage door opened.
Update: the garage_door device class is correct. I got confused. My embarrassed bad.
exactly backwards (of course) from the device_class: garage_door.
I can see the signal flip from off to on to off to on etc in both the ISY and in the hassio “Developer Tools -> States” binary_sensor.test_garage_door_sensor as I rock the sensor back and forth, so the signal is getting into hassio.
The “Developer Tools -> States” binary_sensor.test_garage_door_invert stays ‘off’
I don’t know how to debug the comm (sockets?) from the actual sensor to the ‘template’.
Can someone(s) more experienced have a look at my template (above) and maybe see what the error or omission is?
thanks in advance.
➜ /config hassio info
arch: aarch64
channel: stable
hassos: "2.12"
homeassistant: 0.101.2
hostname: hassio
logging: info
machine: odroid-c2
supervisor: "192"
supported_arch:
- aarch64
timezone: America/Anchorage
FWIW, I’ve added my +1 for an invert flag to the binary_sensor spec. But I am curious why it’s not there already? I’ve been a loooooonng time in industrial controls (long enough to be the designated Cranky Old Guy) and this is the first time I’ve ever seen a binary that didn’t have an ‘invert’ option.