syssi / esphome-solax-x1-mini

ESPHome component to monitor a Solax X1 mini via RS485
Apache License 2.0
39 stars 11 forks source link

Add a text sensor to publish the operation mode as string #3

Closed syssi closed 3 years ago

syssi commented 3 years ago
// Hybrid.X1.X3-G3.ModbusTCP.RTU.V3.21-.English.pdf
// May be some modes doesn't apply to the X1 mini
static const char *const MODE_TEXT[16] = {
    "Wait",             // 0
    "Check",            // 1
    "Normal",           // 2
    "Fault",            // 3
    "Permanent Fault",  // 4

    "Update",     // 5
    "EPS check",  // 6
    "EPS",        // 7
    "Self Test",  // 8
    "Idle",       // 9
};

https://github.com/syssi/esphome-modbus-solax-x1/blob/main/components/solax_x1/solax_x1.cpp#L11