Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Climate Group not returning from 'Unavailable' state #65

@Elarion245

Description

@Elarion245

Hello,

I am using the climate_group add-on to define one climate-group in my living room:
grafik

I am experiencing that for some reason the one of the underlying thermostats (they are Fritz!DECT 301) randomly disconnect but then reconnect. This is reported as:

ValueError: Sensor sensor.thermostat_esstisch_eco_temp_filtered has device class 'None', state class 'None' unit '°C' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)
2023-08-13 16:13:33.319 ERROR (MainThread) [homeassistant.helpers.event] Error while dispatching event for sensor.thermostat_esstisch_nachste_geplante_temperatur to <Job track state_changed event {'sensor.thermostat_esstisch_nachste_geplante_temperatur'} HassJobType.Callback <bound method TrackTemplateResultInfo._refresh of <TrackTemplateResultInfo {Template<template=({% if is_state("sensor.thermostat_esstisch_nachste_geplante_temperatur", "126.5") %}

Quite logically, the climate_group also becomes unavailable:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 289, in _async_dispatch_entity_id_event
    hass.async_run_hass_job(job, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 625, in async_run_hass_job
    hassjob.target(*args)
  File "/config/custom_components/climate_group/climate.py", line 175, in async_state_changed_listener
    self.async_defer_or_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/components/group/__init__.py", line 493, in async_defer_or_update_ha_state
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 746, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 808, in _async_write_ha_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 752, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 246, in state
    return HVACMode(hvac_mode).value
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 711, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 1128, in __new__
    raise ve_exc
ValueError: 'unavailable' is not a valid HVACMode

My issue now is that the thermostats quickly return to a connection state, whereas the climate group remains unavailable:
grafik

I do not know how to fix this. The only thing which actually helps is a HomeAssistant reboot, which I want to avoid.

Any help is appreciated. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions