I’m trying to prevent an ESPHome device, from taking actions, based on the state of an input boolean within home assistant.
So if the input boolean is off
then stop the cover
on a esphome device from opening/closing. If the boolean is on
then allow the cover to operate normally.
I keep rolling my face on the keyboard and it’s not working. Any help would appreciated.
Whether or not the pool is open for the summer
input_boolean.pool_open
esphome device for controlling the pool cover:
switch:
- platform: gpio
pin: GPIO16
id: relay_1
name: Relay 1
internal: true
interlock: [relay_2]
- platform: gpio
pin: GPIO17
id: relay_2
name: Relay 2
internal: true
interlock: [relay_1]
cover:
- platform: template
name: "Pool Cover"
id: pool_cover
open_action:
- switch.turn_on: relay_1
- delay: 1000ms
- switch.turn_off: relay_1
- delay: 1000ms
- switch.turn_on: relay_1
- delay: 24000ms
- switch.turn_off: relay_1
- cover.template.publish:
id: pool_cover
state: OPEN
close_action:
- switch.turn_on: relay_2
- delay: 1000ms
- switch.turn_off: relay_2
- delay: 1000ms
- switch.turn_on: relay_2
- delay: 33000ms
- switch.turn_off: relay_2
- cover.template.publish:
id: pool_cover
state: CLOSED