Add individual circuit control switches for EcoFlow SHP2
- Add circuit state properties (circuit_1 - circuit_12) to track on/off status
- Add enable methods (enable_circuit_1 - enable_circuit_12) for Home Assistant integration
- Add 12 circuit switch entities with proper outlet device class and icons
- Enhance switch state handling for protobuf enum values (0=OFF, 1=ON)
- Uses existing set_circuit_power() method for reliable BLE communication
This enables individual control of all 12 SHP2 circuits through Home Assistant switches, supporting automation and manual control while maintaining compatibility with the EcoFlow app.
Original author @crogers2287, see #54
Overall I recalled what stops me from implementing circuits for SHP2 - is this advanced logic of combining the circuits into groups: For example I have a panel which uses 240v breakers (takes 2 slots) - it's not a good idea to disconnect just one side of it. And if we start to talk about grouping - that automatically means we need to group the current/power metrics as well... So it's quite a big one actually.
FYI @crogers2287
@rabits Okay, I also thought it wouldn't be this easy as the data is also incremental which is probably messing up switch states. This is probably similar to the grid power problem we had, maybe I'll try the same fix? I wouldn't mind implementing grouping as well, but I'm not really sure how it looks in a data stream, this is not something I would be able to infer from the data I currently have.
Oh nono, no worries about grouping - I just thought aloud...
Just tested - unfortunately still see the switches as OFF initially... Will try to check what could be wrong there.