I need you help getting ZHA integration with Aqara E1 Thermostat working.
HW:
- Sonoff USB dongle P version
- Aqara E1 Thermostat
integration is done via ZHA
the Thermostat card on the dashboard works (almost) fine, I can change temperature ther, but… I cannot put thermostat into “Off” state. Pressing “Off” sign on the card - entire entity goes into “off” state, but if I look on the thermostat itself - it still shows latest temperature and heating state.
Log shows nothing about it - it looks like system sees this “works as expected”.
Now I am trying to write the script, which changes the temperature by +0.5 or +1 degree.
After studying all logs and chatting with some friends, who have this script working on their side, I have come to the conclusion that something is not right.
The script is not really executed and finishes on timeout. I’ve tried to execute is calling by Entity ID, or by Device ID -the result is identical - timeout with no impact in the Thermostat settings. Likely in this case there is something in the log.
Script:
alias: Room - temperature up
icon: mdi:thermometer-plus
sequence:
- service: climate.set_temperature
data:
hvac_mode: heat
temperature: >-
{{ state_attr('climate.lumi_lumi_airrtc_agl001_thermostat',
'temperature') | float | round(1) + 0.5 }}
target:
entity_id: climate.lumi_lumi_airrtc_agl001_thermostat
mode: single
Trace shows that Script works (it has increased temperature by 0.5 degree as it is deined in the script.
I’ve tried to increase by 1 degree - the same results.
Executed: December 18, 2022 at 8:34:10 PM
Result:
params:
domain: climate
service: set_temperature
service_data:
hvac_mode: heat
temperature: 19.5
entity_id:
- climate.lumi_lumi_airrtc_agl001_thermostat
target:
entity_id:
- climate.lumi_lumi_airrtc_agl001_thermostat
running_script: false
limit: 10
log:
Logger: homeassistant.core
Source: components/zha/core/channels/hvac.py:301
First occurred: 12:05:29 AM (17 occurrences)
Last logged: 8:34:41 PM
Error executing service: <ServiceCall climate.set_temperature (c:01GMJN8YTT98RBC7JFKBD75X43): hvac_mode=heat, temperature=15.0, area_id=['living_room'], device_id=['*<here the device number>*']>
Error executing service: <ServiceCall climate.set_temperature (c:01GMJNGVZ9B8WEXQNTVQAR8PB8): hvac_mode=heat, temperature=15.0, area_id=['living_room'], device_id=['*<here the device number>*']>
Error executing service: <ServiceCall climate.set_temperature (c:01GMKA9DYBSM2Q0ET8TGE7T4SA): hvac_mode=heat, temperature=20.0, entity_id=['climate.lumi_lumi_airrtc_agl001_thermostat']>
Error executing service: <ServiceCall climate.set_temperature (c:01GMKAQAQPKWQF8MSJV1MPTHAY): hvac_mode=heat, temperature=20.0, entity_id=['climate.lumi_lumi_airrtc_agl001_thermostat']>
Error executing service: <ServiceCall climate.set_temperature (c:01GMKBNF2WKVBBHNECFEP26PYX): hvac_mode=heat, temperature=19.5, entity_id=['climate.lumi_lumi_airrtc_agl001_thermostat']>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
return fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1763, in catch_exceptions
await coro_or_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1782, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 943, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 613, in async_service_temperature_set
await entity.async_set_temperature(**kwargs)
File "/usr/src/homeassistant/homeassistant/components/zha/climate.py", line 463, in async_set_temperature
success = await thrm.async_set_heating_setpoint(
File "/usr/src/homeassistant/homeassistant/components/zha/core/channels/hvac.py", line 266, in async_set_heating_setpoint
if not await self.write_attributes(data):
File "/usr/src/homeassistant/homeassistant/components/zha/core/channels/hvac.py", line 301, in write_attributes
res = await self.cluster.write_attributes(data, **kwargs)
File "/usr/local/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 567, in write_attributes
return await self.write_attributes_raw(attrs, manufacturer)
File "/usr/local/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 573, in write_attributes_raw
result = await self._write_attributes(attrs, manufacturer=manufacturer)
File "/usr/local/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 324, in request
return await self._endpoint.request(
File "/usr/local/lib/python3.10/site-packages/zigpy/endpoint.py", line 237, in request
return await self.device.request(
File "/usr/local/lib/python3.10/site-packages/zigpy/device.py", line 312, in request
return await asyncio.wait_for(req.result, timeout)
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
Digging into the log further, following error has been identified:
Logger: zigpy.application
Source: /usr/local/lib/python3.10/site-packages/zigpy/application.py:134
First occurred: 9:42:33 PM (1 occurrences)
Last logged: 9:42:33 PM
Couldn't start application
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
return fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 132, in startup
await self.initialize(auto_form=auto_form)
File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 77, in initialize
await self.load_network_info(load_devices=False)
File "/usr/local/lib/python3.10/site-packages/bellows/zigbee/application.py", line 209, in load_network_info
status, node_type, nwk_params = await ezsp.getNetworkParameters()
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
I feel it might be connected, and not starting “zigpy.application” might be a reason? - guessing.
Where and what needs to be checked?
Can you please help?