Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: homeassistant
Source: custom_components/gruenbeck_cloud/select.py:38
Integration: Grünbeck Cloud (documentation, issues)
First occurred: 23. Februar 2024 um 20:57:14 (352 occurrences)
Last logged: 08:04:11
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/config/custom_components/gruenbeck_cloud/coordinator.py”, line 81, in listen
await self.api.listen(callback=self.async_set_updated_data)
File “/usr/local/lib/python3.12/site-packages/pygruenbeck_cloud/pygruenbeck_cloud.py”, line 1009, in listen
callback(device)
File “/config/custom_components/gruenbeck_cloud/coordinator.py”, line 176, in async_set_updated_data
self.async_update_listeners()
File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 183, in async_update_listeners
update_callback()
File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 492, in _handle_coordinator_update
self.async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 989, in async_write_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 1110, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 1047, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 995, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/select/init.py”, line 151, in state
current_option = self.current_option
^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/gruenbeck_cloud/select.py”, line 80, in current_option
return self.entity_description.value_fn(self.coordinator.data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/gruenbeck_cloud/select.py”, line 38, in
value_fn=lambda device: OPERATION_MODES[device.parameters.mode], # type: ignore[index] # noqa: E501
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 5
@Phoenix85 You need to show the error message. It says what is wrong. You give the possibility to help you by showing the error.
Hi, I’ve been using the integration since February and it worked great!
But since Sunday I have a issue. Alle entities are not available and there is always a connection/inizialisation issue.
Hello, would it be possible to modify the attributes of the error-sensor so that it is possible to show the error or warning message in a tile card?
Like “Salzvorrat gering”
@Redskyer thx for the snippet. It works for water consumption but not for salt which is odd because its basically the same with different data. I have to dig a little bit deeper into this.
I’m failing at logging into the cloud.
The app on the iPhone (where I created the grünbeck cloud account) is working fine, as is the Webinterface.
Device: SC18
I am now using the integration as well. Great work. Thank you very much.
I have a question regarding the values in the Energy Dashboard. The water consumption values do not match the values from the app. The values in HA are always significantly higher.
For example:
App 24.05. → 258 L
HA 24.05. → 314.1 L
Is it the same for you?
The sensor in my configuration.yaml looks like this:
sensor:
- name: "Total Water Usage"
unit_of_measurement: L
icon: mdi:water-pump
state_class: total_increasing
device_class: water
state: >
{%- set soft_water = states('sensor.softliq_d_xxxx_weichwasserharte') | float(0) -%}
{%- set raw_water = states('sensor.softliq_d_xxxx_rohwasserharte') | float(0) -%}
{%- set soft_water_quantity = states('sensor.softliq_d_xxxx_weichwasserverbrauch') | float(0) -%}
{%- if (is_number(soft_water_quantity) and (soft_water_quantity > 1)) and (is_number(raw_water) and (raw_water > 1)) and (is_number(soft_water) and (soft_water > 1)) -%}
{%- set water_usage = ((soft_water*soft_water_quantity)/(raw_water-soft_water)+soft_water_quantity) | round(4) | float(unavailable) -%}
{%- if is_number(water_usage) -%}
{{water_usage}}
{%- endif -%}
{%- endif -%}
Check if your sensor “sensor.softliq_d_xxxx_weichwasserverbrauch” is reporting the same as the app. If yes, everything should be fine, because the app shows soft water consumption. The template sensor you created is calculating the total amount of water. This is the soft water plus the raw water passing by the Grünbeck at the valve where you adjust the “Härte” for the mixed water you use in your house.
If you want to try a local connection instead of the cloud api for the SCXX device you can use this integration, it uses local tcp MUX interface.
Not available for SD devices.
Probable cause: There is an error in the current installed release that it does not work fine with newest HA version 2024.10, some python dependency that is not fulfilled for sure - the author did the fix on the day 2024.10 was released.
I did the download of the files of the newer Grünbeck release manually (on the day 2024.10 was released) and copied them over. Then it worked (maybe restarted HA, dunno). I did not see any update of the Grünbeck integration since then (maybe it needs some approval before getting deployed), but I don’t know if the version of the manually copied files can get recognized.