core: Cannot set setpoint for SRT321

The problem

SRT321/HRT4-ZW Thermostat setpoint is well discovered and converted to climate entity but cannot set the setpoint.

What is version of Home Assistant Core has the issue?

core-2021.3.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

ZWave2JSMQTT

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zwave_js/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Stacktrace:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1504, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 642, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 681, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 679, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/climate.py", line 401, in async_set_hvac_mode
    raise ValueError(
ValueError: Thermostat climate.main_heater_thermostat_main does not support setting a mode

I also see:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 317, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 424, in _async_add_entity
    capabilities=entity.capability_attributes,
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 189, in capability_attributes
    self.hass, self.min_temp, self.temperature_unit, self.precision
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 498, in min_temp
    DEFAULT_MIN_TEMP, TEMP_CELSIUS, self.temperature_unit
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/climate.py", line 218, in temperature_unit
    if "f" in self._unit_value.metadata.unit.lower():
AttributeError: 'NoneType' object has no attribute 'metadata'

Follow up of #46570

The zwave trace is available here.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 46 (41 by maintainers)

Most upvoted comments

Yes, the buttons set the temperature individually, using the set_temperature service call (from my understanding of the frontend code). I wonder if the frontend is getting confused and the hvac mode setting is getting triggered?

I tested this on my mode-based thermostat, and clicking on the arrow sends the expected set_temperature call, with only the temperature set.

2021-03-12 10:44:17 INFO (MainThread) [homeassistant.components.zwave_js.climate] In async_set_temperature, kwargs = {'temperature': 68.0, 'entity_id': ['climate.z_wave_thermostat']}

No service calls for async_set_hvac mode are seen unless I change it.

Service call works. Setting using the climate widget (yes button + and -) in the front end generates this exception.

Not sure if this helps, but I saw both my SR321 and another thermostat input device fall off after upgrading Z-Wave JS from 0.1.07 (iirc) to 0.1.10. Other attributes (temp etc.) are still relayed, but not the thermostat entity.

@GreatAlbatross I think this is a different problem. HA 2021.2.X is not compatible with the newer versions of the server, with regards to thermostats and RGB devices. So if you upgrade the server (e.g. zwave-js addon) but stay at HA Core 2021.2.3, you won’t see a thermostat.

I haven’t seen this before. The first question is if this device is really supposed to have a setpoint or not. Is this just an SRT321 with an addon? I know the SRT321 supports a Heating setpoint value. If this is the same, then I would submit an issue to node-zwave-js with the interview logs, maybe the command class needs to be added manually?