Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96123

ESPHome switch configuration - HomeBridge

$
0
0

@Depechie wrote:

I added a relay to my ESP8266 with following ESPHome yaml:

switch:
- platform: gpio
  id: relay
  pin:
    number: D6
    inverted: False
  restore_mode: ALWAYS_OFF
- platform: template
  name: "Garage Door Switch"
  icon: "mdi:garage"
  turn_on_action:
  - switch.turn_on: relay
  - delay: 1s
  - switch.turn_off: relay

And this is actually working perfectly in Home Assistant! So I have a switch in Home Assistant and if I click it, it will turn on and after a second turn off again. Also the relay will toggle.
But the HomeBridge component shows the switch in HomeKit as a normal switch. Meaning, if I press the switch in HomeKit, the status will go from Off to On and stay on. Even though In Home Assistant it will go off again after 1 sec.

So now I need to manually tap twice on the switch in HomeKit before I can again use it.

How are other people using toggle relays with the HomeBridge link?
Do I need to put the actual toggle in a Home Assistant automation instead of inside the ESPHome config yaml? Any other tips?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 96123

Trending Articles