Closed hablahab closed 2 weeks ago
Quick Update, since the last z2m update I have to fully remove the room Thermostat from the better thermostat otherwise its unavailable.
I can confirm this issue (from the previous comment), that Bosch Thermostat is unusable (unavailable in BT). I have migrated a working thermostat from ZHA to Z2M and it works using the direct instance. Better Thermostat stopped working. In one case it also rendered HA to be completely stuck. Was able to recover by removing the custom_component dir.
BT seems to be running in an endless loop:
2024-10-18 14:00:19.669 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('custom_components.better_thermostat.adapters.generic',) inside the event loop by custom integration 'better_thermostat' at custom_components/better_thermostat/adapters/delegate.py, line 27: self.adapter = import_module( (offender: /config/custom_components/better_thermostat/adapters/delegate.py, line 27: self.adapter = import_module(), please create a bug report at https://github.com/KartoffelToby/better_thermostat/issues
When my HA got stuck, I got these tracebacks:
Traceback (most recent call last): File "/config/custom_components/better_thermostat/climate.py", line 858, in startup await control_trv(self, trv) File "/config/custom_components/better_thermostat/utils/controlling.py", line 277, in control_trv await set_temperature(self, heater_entity_id, _temperature) File "/config/custom_components/better_thermostat/adapters/delegate.py", line 77, in set_temperature return await self.real_trvs[entity_id]["adapter"].set_temperature( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/better_thermostat/adapters/mqtt.py", line 73, in set_temperature return await generic_set_temperature(self, entity_id, temperature) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/better_thermostat/adapters/generic.py", line 111, in set_temperature await self.hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 968, in async_service_temperature_set raise ServiceValidationError( homeassistant.exceptions.ServiceValidationError: Set temperature action was used with the target temperature parameter but the entity does not support it
When trying to call the service _climate.settemperature one can see that there are two additional parameters:
and when calling using temperature as parameter only, it results in error:
Set temperature action was used with the target temperature parameter but the entity does not support it
same as in the traceback. I see two possible solutions:
I think I could implement solution 1 in the coming days, if this is the way forward. For solution 2 i am not quite sure if this is intended by feature #1378 already?
Digging a bit deeper this seems to be coming from this change in Z2M: Koenkk/zigbee-herdsman-converters@2101914e85d864246694a1f8d334a92781ffe9bc
which changes hvac_modes from off, heat, auto to off, heat, cool requiring to specify target_temp_high and target_temp_low in set set_temperature service call.
Comparing this to the still working thermostats in my setup on ZHA these only support hvac_modes off, heat.
So a more generic approach is needed for this, to support this possibly also for other thermostats in the future..
Implemented a model specific fix today, provided in the given pull request. @hablahab you can get a temporary fix by placing the file
into directory custom_components/better_thermostat/model_fixes. That should fix your issue.
Needs more fixes. PRs #1451 #1450 #1449
Prerequisites
HA state from dev options:
BT device diagnostic:
Description
Steps to Reproduce
Expected behavior:
When I change the Heating setpoint at the thermostat I expect the Better thermostat target temperature to change and vice versa
Actual behavior:
Changing the temp for better thermostat is not updating the room thermostat. Changing the temp on the room thermostat does not change better thermostats target temperature
Versions
HA version 2024.9.3 Better thermostat 1.6.0
Additional Information
It used to work. I think the thermostat only exposed a target temp, now it has two for heating and cooling which may cause the issue.