I’m not sure if this is more of an ESPHome question or HA Configuration question, but I figured I’d start here.
I am using an ESPHome integration to control an electronic switch via relay. It’s set up as a momentary switch using the following configuration:
switch:
- platform: gpio
pin: 16
id: relay1
name: "Close Sheer Curtain"
icon: "mdi:gate"
inverted: true
on_turn_on:
- delay: 500ms
- switch.turn_off: relay1
- platform: gpio
pin: 5
id: relay2
name: "Open Sheer Curtain"
icon: "mdi:gate"
inverted: true
on_turn_on:
- delay: 500ms
- switch.turn_off: relay2
- platform: gpio
pin: 4
id: relay3
name: "Close Solid Curtain"
icon: "mdi:gate"
inverted: true
on_turn_on:
- delay: 500ms
- switch.turn_off: relay3
- platform: gpio
pin: 0
id: relay4
name: "Open Solid Curtain"
icon: "mdi:gate"
inverted: true
on_turn_on:
- delay: 500ms
- switch.turn_off: relay4
These buttons work fine via lovelace, button toggles on and activates the switch then toggles off. However, I’m trying to set up a monetary button to toggle at night-time using a scene. When I add the entity to the scene I am given the option to set the toggles to a specific position, but as soon as I set the position to ‘on’ via the UI, the switch activates then I’m not able to save it in that position for the scene itself. There must be a better way to accomplish this, right?