I make a service call to set the temperature to 24 degrees, but it actually sets the temperature to 20 degrees. I've done this about 10 times now, always the same result
Home Assistant release with the issue:
.105.5
Last working Home Assistant release (if known):
Didn't notice in previous releases, but maybe was there?
Operating environment (Hass.io/Docker/Windows/etc.):
hass.io running on ubuntu server on mac mini
Integration causing this issue:
evohome
Link to integration documentation on our website:
https://www.home-assistant.io/integrations/evohome/
configuration.yaml
service: evohome.set_zone_override
data:
entity_id: climate.living_room
setpoint: 24
duration: {"minutes":5}
2020-02-22 22:50:20 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=e
vohome, service=set_zone_override, service_data=entity_id=climate.living_room, setpoint=24, duration=minu
tes=5>
2020-02-22 22:50:23 DEBUG (MainThread) [homeassistant.components.evohome] Status = {'systemId': '4187037'
, 'zones': [{'zoneId': '4187036', 'temperatureStatus': {'temperature': 23.0, 'isAvailable': True}, 'activ
eFaults': [], 'setpointStatus': {'targetHeatTemperature': 20.0, 'setpointMode': 'TemporaryOverride', 'unt
il': '2020-02-22T22:55:20Z'}, 'name': 'Living Room'}, {'zoneId': '4217766', 'temperatureStatus': {'temper
ature': 21.0, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 18.0,
'setpointMode': 'FollowSchedule'}, 'name': 'Dining Room'}, {'zoneId': '4217767', 'temperatureStatus': {'
temperature': 20.5, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature':
19.0, 'setpointMode': 'FollowSchedule'}, 'name': 'Entrance'}, {'zoneId': '4217768', 'temperatureStatus':
{'temperature': 22.0, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperatur
e': 22.0, 'setpointMode': 'FollowSchedule'}, 'name': 'Laundry room'}, {'zoneId': '4217769', 'temperatureS
tatus': {'temperature': 23.0, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTem
perature': 23.0, 'setpointMode': 'FollowSchedule'}, 'name': "Sebastian's Room"}, {'zoneId': '4217770', 't
emperatureStatus': {'temperature': 21.5, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'ta
rgetHeatTemperature': 21.5, 'setpointMode': 'FollowSchedule'}, 'name': "Sophie's Room"}, {'zoneId': '4217
771', 'temperatureStatus': {'temperature': 21.5, 'isAvailable': True}, 'activeFaults': [{'faultType': 'Te
mpZoneActuatorLowBattery', 'since': '2020-02-14T01:47:11'}, {'faultType': 'TempZoneActuatorCommunicationL
ost', 'since': '2020-02-14T04:57:13'}], 'setpointStatus': {'targetHeatTemperature': 18.0, 'setpointMode':
'FollowSchedule'}, 'name': 'Guest Bedroom'}, {'zoneId': '4217772', 'temperatureStatus': {'temperature':
23.0, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 20.0, 'setpoi
ntMode': 'FollowSchedule'}, 'name': 'Master Closet'}, {'zoneId': '4217773', 'temperatureStatus': {'temper
ature': 22.0, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 22.0,
'setpointMode': 'FollowSchedule'}, 'name': 'Master Bedroom'}, {'zoneId': '4217774', 'temperatureStatus':
{'temperature': 18.5, 'isAvailable': True}, 'activeFaults': [{'faultType': 'TempZoneActuatorLowBattery',
'since': '2020-01-26T10:56:58'}, {'faultType': 'TempZoneActuatorCommunicationLost', 'since': '2020-02-15
T17:00:08'}], 'setpointStatus': {'targetHeatTemperature': 18.0, 'setpointMode': 'FollowSchedule'}, 'name'
: 'Garage'}, {'zoneId': '4217775', 'temperatureStatus': {'temperature': 22.5, 'isAvailable': True}, 'acti
veFaults': [], 'setpointStatus': {'targetHeatTemperature': 18.0, 'setpointMode': 'FollowSchedule'}, 'name
': 'Office & Library'}, {'zoneId': '4217776', 'temperatureStatus': {'temperature': 24.0, 'isAvailable': T
rue}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 23.5, 'setpointMode': 'FollowSchedu
le'}, 'name': 'Master Bath'}], 'activeFaults': [], 'systemModeStatus': {'mode': 'Auto', 'isPermanent': Tr
ue}}
2020-02-22 22:50:23 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_
id=climate.living_room, old_state=<state climate.living_room=heat; hvac_modes=['off', 'heat'], min_temp=5
.0, max_temp=25.0, preset_modes=['none', 'temporary', 'permanent'], current_temperature=23.3, temperature
=25.0, hvac_action=heating, preset_mode=none, status=setpoints=this_sp_from=2020-02-22T20:00:00+01:00, th
is_sp_temp=25.0, next_sp_from=2020-02-23T02:00:00+01:00, next_sp_temp=21.0, zone_id=4187036, active_fault
s=[], setpoint_status=target_heat_temperature=25.0, setpoint_mode=FollowSchedule, temperature_status=temp
erature=23.5, is_available=True, friendly_name=Living Room, icon=mdi:radiator, supported_features=17 @ 20
20-02-22T22:24:04.773419+01:00>, new_state=<state climate.living_room=heat; hvac_modes=['off', 'heat'], m
in_temp=5.0, max_temp=25.0, preset_modes=['none', 'temporary', 'permanent'], current_temperature=23.3, te
mperature=20.0, hvac_action=idle, preset_mode=temporary, status=setpoints=this_sp_from=2020-02-22T20:00:0
0+01:00, this_sp_temp=25.0, next_sp_from=2020-02-23T02:00:00+01:00, next_sp_temp=21.0, zone_id=4187036, a
ctive_faults=[], setpoint_status=target_heat_temperature=20.0, setpoint_mode=TemporaryOverride, until=202
0-02-22T23:55:20+01:00, temperature_status=temperature=23.0, is_available=True, friendly_name=Living Room
, icon=mdi:radiator, supported_features=17 @ 2020-02-22T22:24:04.773419+01:00>>
2020-02-22 22:50:23 DEBUG (MainThread) [homeassistant.components.evohome] Temperatures = {'4217766': 21.3
2, '4217767': 20.6, '4217774': 18.53, '4217771': 21.61, '4217768': 22.36, '4187036': 23.22, '4217776': 24
.07, '4217773': 22.24, '4217772': 23.26, '4217775': 22.54, '4217769': 23.0, '4217770': 21.37}
2020-02-22 22:50:23 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_
id=climate.sophie_s_room, old_state=<state climate.sophie_s_room=heat; hvac_modes=['off', 'heat'], min_te
mp=5.0, max_temp=25.0, preset_modes=['none', 'temporary', 'permanent'], current_temperature=21.6, tempera
ture=21.5, hvac_action=idle, preset_mode=none, status=setpoints=this_sp_from=2020-02-22T22:30:00+01:00, t
his_sp_temp=21.5, next_sp_from=2020-02-23T06:30:00+01:00, next_sp_temp=23.0, zone_id=4217770, active_faul
ts=[], setpoint_status=target_heat_temperature=21.5, setpoint_mode=FollowSchedule, temperature_status=tem
perature=21.5, is_available=True, friendly_name=Sophie's Room, icon=mdi:radiator, supported_features=17 @
2020-02-22T22:24:04.761637+01:00>, new_state=<state climate.sophie_s_room=heat; hvac_modes=['off', 'heat
'], min_temp=5.0, max_temp=25.0, preset_modes=['none', 'temporary', 'permanent'], current_temperature=21.
4, temperature=21.5, hvac_action=heating, preset_mode=none, status=setpoints=this_sp_from=2020-02-22T22:3
0:00+01:00, this_sp_temp=21.5, next_sp_from=2020-02-23T06:30:00+01:00, next_sp_temp=23.0, zone_id=4217770
, active_faults=[], setpoint_status=target_heat_temperature=21.5, setpoint_mode=FollowSchedule, temperatu
re_status=temperature=21.5, is_available=True, friendly_name=Sophie's Room, icon=mdi:radiator, supported_
features=17 @ 2020-02-22T22:24:04.761637+01:00>>
2020-02-22 22:50:23 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_
id=climate.living_room, old_state=<state climate.living_room=heat; hvac_modes=['off', 'heat'], min_temp=5
.0, max_temp=25.0, preset_modes=['none', 'temporary', 'permanent'], current_temperature=23.3, temperature
=20.0, hvac_action=idle, preset_mode=temporary, status=setpoints=this_sp_from=2020-02-22T20:00:00+01:00,
this_sp_temp=25.0, next_sp_from=2020-02-23T02:00:00+01:00, next_sp_temp=21.0, zone_id=4187036, active_fau
lts=[], setpoint_status=target_heat_temperature=20.0, setpoint_mode=TemporaryOverride, until=2020-02-22T2
3:55:20+01:00, temperature_status=temperature=23.0, is_available=True, friendly_name=Living Room, icon=md
i:radiator, supported_features=17 @ 2020-02-22T22:24:04.773419+01:00>, new_state=<state climate.living_ro
om=heat; hvac_modes=['off', 'heat'], min_temp=5.0, max_temp=25.0, preset_modes=['none', 'temporary', 'per
manent'], current_temperature=23.2, temperature=20.0, hvac_action=idle, preset_mode=temporary, status=set
points=this_sp_from=2020-02-22T20:00:00+01:00, this_sp_temp=25.0, next_sp_from=2020-02-23T02:00:00+01:00,
next_sp_temp=21.0, zone_id=4187036, active_faults=[], setpoint_status=target_heat_temperature=20.0, setp
oint_mode=TemporaryOverride, until=2020-02-22T23:55:20+01:00, temperature_status=temperature=23.0, is_ava
ilable=True, friendly_name=Living Room, icon=mdi:radiator, supported_features=17 @ 2020-02-22T22:24:04.77
3419+01:00>>
2020-02-22 22:50:23 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_
id=sensor.sophie_s_room_temperature, old_state=<state sensor.sophie_s_room_temperature=21.6; unit_of_meas
urement=C, friendly_name=Temperature-Sophie's Room, device_class=temperature @ 2020-02-22T22:41:24.652118
+01:00>, new_state=<state sensor.sophie_s_room_temperature=21.4; unit_of_measurement=C, friendly_name=Tem
perature-Sophie's Room, device_class=temperature @ 2020-02-22T22:50:23.752688+01:00>>
2020-02-22 22:50:23 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_
id=sensor.living_room_temperature, old_state=<state sensor.living_room_temperature=23.3; unit_of_measurem
ent=C, friendly_name=Temperature-Living Room, device_class=temperature @ 2020-02-22T22:48:09.335733+01:00
>, new_state=<state sensor.living_room_temperature=23.2; unit_of_measurement=C, friendly_name=Temperature
-Living Room, device_class=temperature @ 2020-02-22T22:50:23.768759+01:00>>
2020-02-22 22:50:23 INFO (MainThread) [evohome.logger] 2020-02-22T22:50:23.851130 MSG: || 045 | I |
| TRV:000730 | | >broadcast | temperature | 003 | 000990 || {'04:000730': {'temperature
': 24.48}}
2020-02-22 22:50:28 INFO (MainThread) [evohome.logger] 2020-02-22T22:50:28.390779 MSG: || 045 | I |
| CTL:158182 | | >broadcast | zone_mode | 013 | 0007D... || [{'00': {'setpoint': 20.0,
'mode': 'TemporaryOverride', 'until': '2020-02-22 23:55:00'}}]
2020-02-22 22:50:28 INFO (MainThread) [evohome.logger] 2020-02-22T22:50:28.453548 MSG: || 045 | I |
| CTL:158182 | | >broadcast | setpoint | 003 | 0007D0 || [{'00': {'setpoint': 20.0}}
]
2020-02-22 22:50:29 INFO (MainThread) [evohome.logger] 2020-02-22T22:50:29.851996 MSG: || 051 | I |
| TRV:136497 | | CTL:158182 | window_state | 003 | 070000 || {'04:136497': {'window_open
': False}}
I've noticed this as well, both for setting a room to 13 degrees going to 10 degress, and for over 20 to 20. Seems to have to do with the precision logic.
I wonder if there is an issue with this code:
# otherwise it is SVC_SET_ZONE_OVERRIDE
temperature = round(data[ATTR_ZONE_TEMP] * self.precision) / self.precision
temperature = max(min(temperature, self.max_temp), self.min_temp)
I wonder if there is an issue with this code:
# otherwise it is SVC_SET_ZONE_OVERRIDE temperature = round(data[ATTR_ZONE_TEMP] * self.precision) / self.precision temperature = max(min(temperature, self.max_temp), self.min_temp)
That's what I thought as well, but I wasn't sure what the values for self.precision can be...
Its either 0.1
or 0.5
:
if evo_broker.client_v1:
self._precision = PRECISION_TENTHS
else:
self._precision = self._evo_device.setpointCapabilities["valueResolution"]
see:
2020-02-23 15:57:03 DEBUG (MainThread) [homeassistant.components.evohome] Config = {'systemId': '3432522', 'modelType': 'EvoTouch', 'zones': [{'zoneId': '3432521', 'modelType': 'HeatingZone', 'setpointCapabilities': {'maxHeatSetpoint': 35.0, 'minHeatSetpoint': 5.0, 'valueResolution': 0.5, 'can ...
There is a 'best-efforts' attempt to get higher-precision temps using the older API, but now I think about it, _current_ temperatures can be in 0.1
, but _target_ temperatures (setpoints) have to be in 0.5
regardless.
So we can fix _two_ bugs here:
precision = self._evo_device.setpointCapabilities["valueResolution"]
temperature = round(data[ATTR_ZONE_TEMP] / precision) * precision
temperature = max(min(temperature, self.max_temp), self.min_temp)
Yeah that looks better, with / then * instead of the other way around, because that causes the rounding down to 10 or 20, not sure what the other bug is...
It's using precision
instead of self.precision
.
Are you interested in making that change at your end and testing it - I am working on the TZ problem...
In climate.py, add a line, and change the last two lines:
async def async_zone_svc_request(self, service: dict, data: dict) -> None:
"""Process a service request (setpoint override) for a zone."""
if service == SVC_RESET_ZONE_OVERRIDE:
await self._evo_broker.call_client_api(
self._evo_device.cancel_temp_override()
)
return
# otherwise it is SVC_SET_ZONE_OVERRIDE # TODO: bug here?
precision = self._evo_device.setpointCapabilities["valueResolution"]
temperature = round(data[ATTR_ZONE_TEMP] / precision) * precision
temperature = max(min(temperature, self.max_temp), self.min_temp)
... and then (I changed from temp
to temperature
):
if ATTR_DURATION_UNTIL in data:
duration = data[ATTR_DURATION_UNTIL]
if duration.total_seconds() == 0:
await self._update_schedule()
until = parse_datetime(str(self.setpoints.get("next_sp_from")))
else:
until = dt.now() + data[ATTR_DURATION_UNTIL]
else:
until = None # indefinitely
# TODO: until dt from aware to evo naive/local
await self._evo_broker.call_client_api(
self._evo_device.set_temperature(temperature, until=until)
)
BTW, it seems you can set a zone target temp to (say) 13.7 C (i.e. a multiple of 0.1, not 0.5).
I can do a test later this week, currently traveling.