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

Climate Group not returning from 'Unavailable' state #65

Open
Elarion245 opened this issue Aug 14, 2023 · 6 comments
Open

Climate Group not returning from 'Unavailable' state #65

Elarion245 opened this issue Aug 14, 2023 · 6 comments

Comments

@Elarion245
Copy link

Elarion245 commented Aug 14, 2023

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!

@Elarion245
Copy link
Author

Is this integration still actively maintained? Doesn't seem so... Above issue renders the addon useless to me, as I see a short interruption of the link to the thermostats around once per day...

@snigehere
Copy link

snigehere commented Sep 19, 2023

I was previously using version 0.6 and it was fine - I upgraded to 1.0.0-rc6 to sort out using a unique ID ... After this upgrade I started getting the same issue as you are reporting .. I have downgraded back to 0.6 and, after deleting the group entity via developer tools and restarting, its now working correctly again. I guess the 0.6 code had an issue with the group entity as I have given it a unique ID when I moved to rc6. Having moved back to 0.6 the entity unique id was no longer supported and when I looked at it it said it was no longer being updated by climate group. I deleted the entity and restarted allowing climate group to re-create it and all was then OK.

@Elarion245
Copy link
Author

So you say that after deleting the entity, v0.6 can still be used?
Currently I have added an automation to reboot when the group becomes unavailable, but this is rather annoying...

@snigehere
Copy link

For me, yes.. I downgraded to 0.6 in hacs (the last non beta release) and then restarted.. checking developer tools i noticed no change but also saw that the group entity showed as no longer being updated by the group code so I deleted that entity and restarted again. The climate group config recreated the entity and it worked correctly.. I have two trvs in the group (two radiators in the same room) and was able to control them via the group entity and the group entity updated when I chanced the individual trv.

The reason I installed the beta was to be able to give it a unique I'd so I could share via nabu with alexa. I assumed that adding the unique I'd meant the group entity was messed up so delete / recreated.. there may have been another reason but I didn't look to see why.

@daenny
Copy link
Owner

daenny commented Sep 20, 2023

Sorry guys, I just updated the readme. Due to personal reasons, I cannot actively maintain this at the moment.
I had made a PR in the ha-core repo. But there were some issues.
You can try to use:
https://github.com/KartoffelToby/better_thermostat

@Elarion245
Copy link
Author

Sad to hear this, but it is clear that there are more important things than HA ;)

Better thermostat seems to aim at providing a bit more than the simple Climate Group. Can anyone provide an inside into what the minimum configuration would be to obtain only a climate group and nothing more?

@daenny: Can you comment on which version to use for the time being? 0.6 or 1.0.0rc6?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants