Good day,
I’m a beginner in HA, I’m migrating devices from Blynk, but I can’t figure out the condition.
I turn on the pump from the HA, when the level drops, the pump turns off.
How do I set it so that when the level is low, the switch will turn on?
I tried everything possible but I keep getting errors.
I have this shutdown code working, but I don’t know how to prevent the switch from turning on when the level is low.
Thank you Pavel
binary_sensor:
- platform: gpio
name: "hladina"
id: hladina
pin:
number: GPIO14
on_release:
- switch.turn_off: relay_pump
switch:
## relay pump
- platform: gpio
pin: GPIO5
name: "Relay pump"
id: relay_pump