Open ruimarinho opened 6 years ago
Yes I'm thinking about it You can already configure it as one, but you loose all the advantages related to the switch behavior and representation
A binary_sensor can be typed to represent a door using a device_class : https://home-assistant.io/components/binary_sensor/
I'm using this as an alternative:
- platform: template
sensors:
main_door_binary_sensor:
value_template: "{{ is_state('sensor.main_door', 'on-press') }}"
device_class: door
entity_id: sensor.main_door
I don't think it would work out of the box, would it?
- platform: zigate
sensors:
main_door_binary_sensor:
device_class: door
entity_id: sensor.main_door
@elric91 - thanks for the great work on this component.
I think ideally the Xiaomi Door Sensor should behave as a
binary_sensor
instead of the suggested config as aswitch
as there is no action available - it would either report as open or closed.