Honeywell: set end time - noob code change included

Honeywell Evohome’s UI allows you to set an end time for a temperature change, after that it goes back to its normal schedule. I find this very useful.

Adding an ‘until’ parameter seems trivial as it’s supported by the evohomeclient library. I’ve tested it with changes here:

I’m not sure if it’s okay that it adds a property to the parent climate component which is not used by any sub-component other than honeywell?

Would appreciate any feedback please.

I’ve tested it from a script ‘boost room x by 1 degree for 1 hour’.

Oh this is very good, I was looking for that and wanted it for me. If a PIR detects somebody at home, the temperature should be set to normal temperature for 1 hour. It is partly implemented in the evohome component, but not in the climate component.

I changed

homeassistant/components/climate/__init__.py
homeassistant/components/climate/const.py
homeassistant/components/climate/services.yaml
homeassistant/components/climate/reproduce_state.py

and now it works :slight_smile:

One thing is still a little bit tricky: the evohome/climate.py does the following:

until = kwargs.get('until')
        if until:
            until = datetime.strptime(until, EVO_STRFTIME)

that means that it expects “until” as a string. But currently “until” is defined as cv.datetime in components/climate/.
So I did a temporary patch:

until = kwargs.get('until')
#        if until:
#           until = datetime.strptime(until, EVO_STRFTIME)

This is my automation action:

- alias: athome
  id: '000111000111'
  trigger:
  - entity_id: binary_sensor.aeotec_multi_sensor_gen5_sensor
    platform: state
    from: 'off'
    to: 'on'
  - entity_id: binary_sensor.centralite_3305_s_11087971_2_1030
    platform: state
    from: 'off'
    to: 'on'
  - entity_id: binary_sensor.rexense_rh3040_0e4f0d78_1_1280
    platform: state
    from: 'off'
    to: 'on'
  condition:
    - condition: time
      after: '07:00:00'
      before: '23:00:00'
    - condition: template
      value_template: >
        {{ state_attr('climate.thermostat','temperature')<21.5 }}
action:
    - service: climate.set_temperature
      data_template:
        entity_id: climate.thermostat
        temperature: 21.5
        until: >
            {{ (now().timestamp() | int+3600)| timestamp_custom('%Y-%m-%dT%H:%M:%SZ',false) }}