diff --git a/README.md b/README.md index fa27c8f..0fc74cc 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,6 @@ These binary sensors are retrieved from the `../econet/regParams` and `../econet | `mainSrv` | Indicates if the main server is operational | `../econet/sysParams` | | `wifi` | Indicates if the Wi-Fi connection is active | `../econet/sysParams` | | `lan` | Indicates if the LAN connection is active | `../econet/sysParams` | - ### Number Entities @@ -185,7 +184,6 @@ These number entities are retrieved from the `../econet/rmCurrentDataParamsEdits | `tempCOSet` | Desired fireplace set temperature | `../econet/rmCurrentDataParamsEdits` | | `tempCWUSet` | Desired hot water (CWU) set temperature | `../econet/rmCurrentDataParamsEdits` | - ## Contributing diff --git a/custom_components/econet300/const.py b/custom_components/econet300/const.py index 0114fb7..a4c9c0c 100644 --- a/custom_components/econet300/const.py +++ b/custom_components/econet300/const.py @@ -96,11 +96,13 @@ "lambdaLevel", }, "_default": { + "boilerPower", "tempFeeder", "fuelLevel", "tempCO", "tempCOSet", "statusCWU", + "tempCWU", "tempCWUSet", "tempFlueGas", "mode", @@ -112,6 +114,12 @@ "quality", "signal", "softVer", + "controllerID", + "moduleASoftVer", + "moduleBSoftVer", + "moduleCSoftVer", + "moduleLambdaSoftVer", + "modulePanelSoftVer", }, } @@ -170,6 +178,13 @@ "mode": None, "thermostat": None, "statusCWU": None, + "softVer": None, + "controllerID": None, + "moduleASoftVer": None, + "moduleBSoftVer": None, + "moduleCSoftVer": None, + "moduleLambdaSoftVer": None, + "modulePanelSoftVer": None, } # By default all sensors device_class are None @@ -193,7 +208,6 @@ "tempLowerBuffer": SensorDeviceClass.TEMPERATURE, "signal": SensorDeviceClass.SIGNAL_STRENGTH, "servoMixer1": SensorDeviceClass.ENUM, - "main_server": None, } ENTITY_NUMBER_SENSOR_DEVICE_CLASS_MAP = { @@ -232,6 +246,13 @@ "statusCWU": None, "thermostat": None, "mode": None, + "softVer": None, + "controllerID": None, + "moduleASoftVer": None, + "moduleBSoftVer": None, + "moduleCSoftVer": None, + "moduleLambdaSoftVer": None, + "modulePanelSoftVer": None, } ENTITY_ICON = { @@ -256,7 +277,6 @@ "additionalFeeder": "mdi:screw-lag", "pumpFireplaceWorks": "mdi:pump", "pumpCWUWorks": "mdi:pump", - "main_server": "mdi:server", "mixerPumpWorks": "mdi:pump", "mixerTemp": "mdi:thermometer", "mixerSetTemp": "mdi:thermometer", @@ -265,6 +285,13 @@ "mixerTemp1": "mdi:thermometer", "mainSrv": "mdi:server-network", "lan": "mdi:lan-connect", + "softVer": "mdi:alarm-panel-outline", + "controllerID": "mdi:alarm-panel-outline", + "moduleASoftVer": "mdi:raspberry-pi", + "moduleBSoftVer": "mdi:raspberry-pi", + "moduleCSoftVer": "mdi:raspberry-pi", + "moduleLambdaSoftVer": "mdi:raspberry-pi", + "modulePanelSoftVer": "mdi:alarm-panel-outline", } ENTITY_ICON_OFF = { @@ -289,7 +316,6 @@ else ("start" if x == 1 else ("working" if x == 2 else STATE_UNKNOWN)) ) ), - "main_server": lambda x: "Server available" if x == 1 else "Server not available", "statusCWU": lambda x: "Not set" if x == NO_CWU_TEMP_SET_STATUS_CODE else "Set", "thermostat": lambda x: "ON" if x == 1 else "OFF", } @@ -305,6 +331,7 @@ "moduleLambdaSoftVer": EntityCategory.DIAGNOSTIC, "protocolType": EntityCategory.DIAGNOSTIC, "controllerID": EntityCategory.DIAGNOSTIC, + "moduleCSoftVer": EntityCategory.DIAGNOSTIC, "mainSrv": EntityCategory.DIAGNOSTIC, "wifi": EntityCategory.DIAGNOSTIC, "lan": EntityCategory.DIAGNOSTIC, diff --git a/custom_components/econet300/sensor.py b/custom_components/econet300/sensor.py index bac151c..ca0ba13 100644 --- a/custom_components/econet300/sensor.py +++ b/custom_components/econet300/sensor.py @@ -135,6 +135,11 @@ def create_controller_sensors( "Created and appended sensor entity from regParams: %s", entity ) elif data_key in data_sysParams: + if data_sysParams.get(data_key) is None: + _LOGGER.warning( + "%s in sysParams is null, sensor will not be created.", data_key + ) + continue entity = EconetSensor( create_sensor_entity_description(data_key), coordinator, api ) diff --git a/custom_components/econet300/strings.json b/custom_components/econet300/strings.json index 5fa38e1..05597e3 100644 --- a/custom_components/econet300/strings.json +++ b/custom_components/econet300/strings.json @@ -106,12 +106,27 @@ "firing_up_count": { "name": "Firing up count" }, - "main_server": { - "name": "Main server" - }, "soft_ver": { "name": "Module ecoNET version" }, + "controller_id": { + "name": "Controller name" + }, + "module_a_soft_ver": { + "name": "Module A version" + }, + "module_b_soft_ver": { + "name": "Module B version" + }, + "module_c_soft_ver": { + "name": "Module C version" + }, + "module_lambda_soft_ver": { + "name": "Module Lambda version" + }, + "module_panel_soft_ver": { + "name": "Module Panel version" + }, "mode": { "name": "Boiler mode", "state": { diff --git a/custom_components/econet300/translations/en.json b/custom_components/econet300/translations/en.json index 7ab4a29..f3c9dcd 100644 --- a/custom_components/econet300/translations/en.json +++ b/custom_components/econet300/translations/en.json @@ -91,9 +91,6 @@ "lambda_level": { "name": "Lambda level" }, - "main_server": { - "name": "Main server" - }, "work_at100": { "name": "Work at 100%" }, @@ -153,6 +150,24 @@ "soft_ver": { "name": "Module ecoNET version" }, + "controller_id": { + "name": "Controller name" + }, + "module_a_soft_ver": { + "name": "Module A version" + }, + "module_b_soft_ver": { + "name": "Module B version" + }, + "module_c_soft_ver": { + "name": "Module C version" + }, + "module_lambda_soft_ver": { + "name": "Module Lambda version" + }, + "module_panel_soft_ver": { + "name": "Module Panel version" + }, "servo_mixer1": { "name": "Mixer 1 servo position" }, diff --git a/custom_components/econet300/translations/pl.json b/custom_components/econet300/translations/pl.json index 30d25a1..bc30b98 100644 --- a/custom_components/econet300/translations/pl.json +++ b/custom_components/econet300/translations/pl.json @@ -94,9 +94,6 @@ "mixer_set_temp1": { "name": "Temp. zadana mieszacza 1" }, - "main_server": { - "name": "Główny serwer" - }, "mode": { "name": "Tryb pracy", "state": {