diff --git a/homeassistant/components/solaredge_local/manifest.json b/homeassistant/components/solaredge_local/manifest.json index 960ff07b750..d65aa06ea0a 100644 --- a/homeassistant/components/solaredge_local/manifest.json +++ b/homeassistant/components/solaredge_local/manifest.json @@ -5,5 +5,5 @@ "documentation": "https://www.home-assistant.io/integrations/solaredge_local", "iot_class": "local_polling", "loggers": ["solaredge_local"], - "requirements": ["solaredge-local==0.2.0"] + "requirements": ["solaredge-local==0.2.3"] } diff --git a/homeassistant/components/solaredge_local/sensor.py b/homeassistant/components/solaredge_local/sensor.py index 35e5d758433..d0efcd0ec9b 100644 --- a/homeassistant/components/solaredge_local/sensor.py +++ b/homeassistant/components/solaredge_local/sensor.py @@ -290,7 +290,7 @@ class SolarEdgeSensor(SensorEntity): """Return the state attributes.""" if extra_attr := self.entity_description.extra_attribute: try: - return {extra_attr: self._data.info[self.entity_description.key]} + return {extra_attr: self._data.info.get(self.entity_description.key)} except KeyError: pass return None @@ -298,7 +298,7 @@ class SolarEdgeSensor(SensorEntity): def update(self) -> None: """Get the latest data from the sensor and update the state.""" self._data.update() - self._attr_native_value = self._data.data[self.entity_description.key] + self._attr_native_value = self._data.data.get(self.entity_description.key) class SolarEdgeData: diff --git a/requirements_all.txt b/requirements_all.txt index 0945f790b2d..9b6eeeb2e54 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2369,7 +2369,7 @@ snapcast==2.3.2 soco==0.29.1 # homeassistant.components.solaredge_local -solaredge-local==0.2.0 +solaredge-local==0.2.3 # homeassistant.components.solaredge solaredge==0.0.2