This is a simple component to integrate with the CoCT Loadshedding API and provide loadshedding-related status information. Forked from swartjean/ha-coct-loadshedding and [tiaanv/ha-eskom-loadshedding]](tiaanv/ha-eskom-loadshedding)
This integration exposes a sensor for the current stage of loadshedding. It also calculates the loadshedding schedule for COCT and can provide a sensor indicating if the selected Area is currently in loadshedding, as well as when the next loadshedding slot for the selected area will be. This depends of course on the current loadshedding stage.
This component will set up the following platforms.
Platform | Description |
---|---|
sensor |
Show loadshedding status information. |
This component will create the following sensors.
Sensor | Description |
---|---|
sensor.coct_loadshedding_stage |
Show Current Loadshedding Stage from CoCT API (Numeric). |
sensor.coct_loadshedding_load_shedding_active |
Is the configured Area currently in loadshedding (True/False). |
sensor.coct_loadshedding_next_load_shedding |
When the next scheduled loadshedding for the area will take place (DateTime). |
- Using the tool of choice open the directory (folder) for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory (folder) there, you need to create it. - In the
custom_components
directory (folder) create a new folder calledcoct_loadshedding
. - Download all the files from the
custom_components/coct_loadshedding/
directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Restart Home Assistant
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "CoCT Loadshedding Interface"
- Configure the Scan Period (update frequency in seconds). Default is 900s.
- Configure the Area as per COCT map.
NOTE: Long refresh rates kan delay the change of the sensor, as the current implementation does not run on ZERO hour, and refresh times are dependent on startup time. This generally is not an issue in practice. It just seems erratic if you are monitoring the sensor(s).