core: evohome fails converting non-UTC times
The problem
When a service call is made to evohome.set_zone_override, an hour is added to the duration if the system is in UTC+1.
Environment
- Home Assistant release with the issue: 0.105.3
- Last working Home Assistant release (if known): N/A (new feature)
- Operating environment (Hass.io/Docker/Windows/etc.): N/A
- Integration causing this issue: evohome
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/evohome
Problem-relevant configuration.yaml
Traceback/Error logs
For example, the following call works (note: duration=minutes=10), but is in UTC+0:
2020-02-11 18:52:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=evohome, service=set_zone_override, service_data=entity_id=climate.bathroom, setpoint=5.5, duration=minutes=10>
… should result in (setpoint_mode=TemporaryOverride, until=2020-02-11T19:02:26+00:00):
2020-02-11 18:52:29 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=climate.bathroom, ... new_state=<state climate.bathroom=off; hvac_modes=['off', 'heat'], min_temp=5.5, max_temp=24.5, preset_modes=['none', 'temporary', 'permanent'], current_temperature=19.7, temperature=5.5, hvac_action=off, preset_mode=temporary, status=setpoints=this_sp_from=2020-02-11T18:00:00+00:00, this_sp_temp=19.5, next_sp_from=2020-02-11T19:10:00+00:00, next_sp_temp=18.5, zone_id=3449703, active_faults=[], setpoint_status=target_heat_temperature=5.5, setpoint_mode=TemporaryOverride, until=2020-02-11T19:02:26+00:00, temperature_status=temperature=19.5, is_available=True, friendly_name=Bathroom, icon=mdi:radiator, supported_features=17 @ 2020-02-11T18:52:29.250006+00:00>>
2020-02-11 18:53:00 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=climate.bathroom, ... new_state=<state climate.bathroom=off; hvac_modes=['off', 'heat'], min_temp=5.5, max_temp=24.5, preset_modes=['none', 'temporary', 'permanent'], current_temperature=19.7, temperature=5.5, hvac_action=off, preset_mode=temporary, status=setpoints=this_sp_from=2020-02-11T18:00:00+00:00, this_sp_temp=19.5, next_sp_from=2020-02-11T19:10:00+00:00, next_sp_temp=18.5, zone_id=3449703, active_faults=[], setpoint_status=target_heat_temperature=5.5, setpoint_mode=TemporaryOverride, until=2020-02-11T19:02:00+00:00, temperature_status=temperature=19.5, is_available=True, friendly_name=Bathroom, icon=mdi:radiator, supported_features=17 @ 2020-02-11T18:52:29.250006+00:00>>
… the second entry is because the vendor rounds the time to the nearest minute.
Additional information
Two users have reported the same issue:
- mentioned in a PR: https://github.com/home-assistant/home-assistant/pull/31697#issuecomment-584200153, and
- in the forum: post
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (11 by maintainers)
@Botap @scstraus @eavanvalkenburg
There is a fix at https://github.com/home-assistant/home-assistant/pull/32120 that I’d love people to test for me.
Direct link: https://github.com/zxdavb/home-assistant/tree/bugfix_evohome
All help is appreciated - this code is getting so complicated now, maybe one of the most complicated climate integrations going…