Hi, I need a switch to enable/disable a control of my inverter. The log indicates two possibilities, 0 and 1. I can read the set state but I really don’t know how to check it. I tried to write the code but i don’t know how to proceed.
switch:
- platform: modbus_controller
modbus_controller_id: zcs
id: eps_on_off
name: EPS On/Off
register_type: holding
address: 0x1029
on_turn_on: # what to write here?
on_turn_off: # what to write here?
A binary_sensor: tells you the state of a physical switch or button typically on a GPIO pin.
A switch: is how ESPHome controls a light or relay connected to a GPIO. id: is how the binary sensor can control the switch.