Because I don't have any programming skills, I often have to come up with workarounds to accomplish what I want to do. Since I have installed a Sunsynk inverter to deal with the increasing power cuts in South Africa, I have been looking for a solution to get the state of charge of the batteries connected to it into Hubitat. Of course, once that information is available in Hubitat, automations can be used to warn me if the SOC falls below certain levels; non-essential devices can be turned off if the SOC falls below a chosen level; if the SOC rises above a pre-set level, non-essential devices that were turned off when the SOC dropped too low can be turned on again, etc.
Sunsynk recently announced an integration with Hue lights. (Here's their video announcing the integration.) With the Sunsynk app, the color and brightness level of Hue lights can be changed according to the SOC of the batteries. This made a light bulb go off in my head
If I dedicate one of my Hue bulbs to serve as a status indicator of the SOC of the batteries and set the brightness level of that bulb to the same as the SOC% of the battery as reported in the Sunsynk app, the bulb's brightness can be used as the SOC of the batteries. The brightness level can then be used in automations.
I was using the built-in Hubitat Hue integration, but the status of Hue lights does not update reliably in HE (if the light is changed from another source). I switched to @armand's Advanced Hue Bridge integration for HE. The status of the hue light updates very quickly in Hubitat with this app. All that was left to do was to set up webCore rules, such as sending an SMS if the light's brightness falls below 60% or what devices to turn off if the light's brightness falls below 50%.
I have been testing this solution for 2 the past two days, and it has worked flawlessly. The only drawback is that long power outages cause the internet to go out, and then the automation stops working because the Sunsynk app naturally needs internet. If others are interested, I will explain in more detail how I set up the rules in the Sunsynk app and webCore.