Hi, Im using AMPIO Smart Home for hardware Home Automation, but Im using Home Assistent to integrate it with all the rest. Garage door gest only 1 and 0 to move garage gate. 0 - do nothing, 1 - change state or stop closing/opening. So when I press the button and its cloded, i will start to open, when I press it again during that time, the gate stops, when I press it again, its start to close again. But I added binery_sensor to check if gate is open or closed by using ESPHome. How can I integrate is to make one full garage door entity?
MQTT topic for gate is : ampio/from/14E03/state/o/9
binery_sensor: binary_sensor.garaz_brama_1
Thanks for any help
Late but maybe it will be helpfull
I’ve configured like below using 2 entities (sensor - from contactron and switch). I don’t remember how exactly it was configured :
#Switch MQTT configuration
switch:
#GARAGE
- unique_id: garage_door
name: "garage_door"
state_topic: "ampio/from/ABA3/state/o/5"
command_topic: "ampio/to/ABA3/o/5/cmd"
payload_on: "ON"
payload_off: "OFF"
state_on: 1
state_off: 0
retain: true
#Cover MQTT configuration
cover:
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: "Garage Door"
value_template: "{{ states('sensor.garage_door') }}"
open_cover:
- condition: state
entity_id: sensor.garage_door
state: "closed"
- service: switch.toggle
target:
entity_id: switch.garage_door
close_cover:
- condition: state
entity_id: sensor.garage_door
state: "open"
- service: switch.toggle
target:
entity_id: switch.garage_door
stop_cover:
service: switch.toggle
target:
entity_id: switch.garage_door
icon_template: >-
{% if is_state('cover.garage_door', 'opening') or is_state('cover.garage_door', 'closing') %}
mdi:garage-alert
{% elif is_state('cover.garage_door', 'open') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}