Skip to content

Commit b4e7705

Browse files
committed
Fix missing mode 11 in state_operating_mode definition
Signed-off-by: stefan <[email protected]>
1 parent 578de02 commit b4e7705

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

custom_components/sonnenbatterie/coordinator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
1010
from sonnenbatterie import AsyncSonnenBatterie
1111

12-
from custom_components.sonnenbatterie import LOGGER, DOMAIN, ATTR_SONNEN_DEBUG, CONF_SERIAL_NUMBER
12+
from custom_components.sonnenbatterie import LOGGER, DOMAIN, ATTR_SONNEN_DEBUG
1313

1414

1515
class SonnenbatterieCoordinator(DataUpdateCoordinator):
@@ -87,6 +87,7 @@ def populate_battery_info(self):
8787
async def _async_update_data(self):
8888
"""Populate self.latestdata"""
8989
if time() - self._last_login > 60:
90+
# noinspection PyBroadException
9091
try:
9192
await self.sbconn.logout()
9293
except:

custom_components/sonnenbatterie/sensor_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def generate_powermeter_sensors(_coordinator):
288288
key="state_operating_mode",
289289
legacy_key="operating_mode",
290290
icon="mdi:state-machine",
291-
options=["1", "2", "6", "10"],
291+
options=["1", "2", "6", "10", "11"],
292292
device_class=SensorDeviceClass.ENUM,
293293
value_fn=lambda coordinator: coordinator.latestData.get("status", {}).get(
294294
"OperatingMode"

0 commit comments

Comments
 (0)