sockless-coding / garo_wallbox

Garo wallbox - Home Assistant Component
MIT License
22 stars 40 forks source link

2 phases state value, not in the list of options provided #53

Closed maccan-tech closed 2 months ago

maccan-tech commented 2 months ago

`Logger: homeassistant Source: components/sensor/init.py:636 First occurred: September 16, 2024 at 19:10:54 (347 occurrences) Last logged: 06:42:54

Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners update_callback() File "/config/custom_components/garo_wallbox/base.py", line 27, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state self.async_calculate_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in async_calculate_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 636, in state raise ValueError( ValueError: Sensor sensor.garo_laddbox_phases provides state value '2', which is not in the list of options provided`

sockless-coding commented 2 months ago

@maccan-tech interesting, didn't know that was a possible state... What type of charger/setup do you have that supports two phase power?

maccan-tech commented 2 months ago

@sockless-coding I have a GLBDCWM-T222FC. And when my wife is charging here Skoda Citigo it only charges at 7kw and only on 2 phases.

You where fast, i was prepering to make a pullrequest :-) Dont forgot changes to the icons.json file.

sockless-coding commented 2 months ago

Yeah, I forgot the icon, I'll fix that so it gets included in the next release :)

Good to know, I thought Type 2 only supported 1 or 3 phase charging