diff --git a/custom_components/smartevse/__init__.py b/custom_components/smartevse/__init__.py index eeb6e9a..e2cc60f 100644 --- a/custom_components/smartevse/__init__.py +++ b/custom_components/smartevse/__init__.py @@ -111,7 +111,6 @@ async def _async_update_data(self) -> dict[str, Any]: self.response = await self.hass.async_add_executor_job(self.get_data) try: self._data["smartevse_fw_version"] = self.response['version'] - self._data["smartevse_serialnr"] = self.response['serialnr'] self._data["smartevse_mode"] = self.response['mode'] self._data["smartevse_mode_id"] = self.response['mode_id'] self._data["smartevse_car_connected"] = self.response['car_connected'] @@ -148,6 +147,13 @@ async def _async_update_data(self) -> dict[str, Any]: self._data["smartevse_mains_meter"] = self.response['settings']['mains_meter'] except KeyError: pass + try: + self._data["smartevse_current_max_circuit"] = self.response['settings']['current_max_circuit'] + self._data["smartevse_current_max_sum_mains"] = self.response['settings']['current_max_sum_mains'] + self._data["smartevse_loadbl"] = self.response['evse']['loadbl'] + self._data["smartevse_serialnr"] = self.response['serialnr'] + except KeyError: + pass try: self._data["smartevse_home_battery_current"] = self.response['home_battery']['current'] / 10 self._data["smartevse_home_battery_last_update"] = self.response['home_battery']['last_update'] diff --git a/custom_components/smartevse/const.py b/custom_components/smartevse/const.py index e6a1dff..e2bc76b 100644 --- a/custom_components/smartevse/const.py +++ b/custom_components/smartevse/const.py @@ -163,6 +163,22 @@ unit=UnitOfElectricCurrent.AMPERE, device_class=SensorDeviceClass.CURRENT, ), + SmartEVSESensorEntityDescription( + key="smartevse_current_max_circuit", + name="SmartEVSE Current MaxCircuit", + unit=UnitOfElectricCurrent.AMPERE, + device_class=SensorDeviceClass.CURRENT, + ), + SmartEVSESensorEntityDescription( + key="smartevse_current_max_sum_mains", + name="SmartEVSE Current MaxSumMains", + unit=UnitOfElectricCurrent.AMPERE, + device_class=SensorDeviceClass.CURRENT, + ), + SmartEVSESensorEntityDescription( + key="smartevse_loadbl", + name="SmartEVSE LoadBl", + ), SmartEVSESensorEntityDescription( key="smartevse_solar_stop_time", name="SmartEVSE Solar Stop Time",