Ecobee temperature hold behavior change since HA 0.86

Up until HA 0.85, changing the thermostat temperature in the UI used to cause the Ecobee to place a “temperature hold” that would follow the ecobee’s “default hold action”

image

… which can be set to “hold until the next transition in the schedule”, hold for 2 hours etc. This had worked in my installation since I first implemented HA, back in July last year.

My preference is set to hold the change for 2 hours, and then resume the normal schedule.

Since HA 0.86 (just updated yesterday), I noticed that when changing the temperature from HA (e.g. via lovelace card, or via alexa etc), the change is set in the thermostat as “Hold until the Next Transition in the schedule” regardless of what I configured in my ecobee’s settings.

I looked at the code and it appears that the current behavior was actually intended per-design (hold till the Next Transition in the schedule, regardless of the thermostat setting) so not sure why it has been working differently for me up until yesterday.

Since I don’t really like the current behavior I found a very quick&dirty way to restore my preferred “hold the change for 2 hours” behavior.

Sharing the ugly hack here for other lost people that might need it and want to save some time.

Please note that doing the change below can wreck your Home Assistant installation (no warranties), so use with care.

The guidelines below apply to a “python virtual environment” HA deployment but are easy to translate to other deployment modes.

  • Edit the file that handles the Ecobee API; it’s in a python package by itself:

home/your_username/homeassistant/lib/python3.5/site-packages/pyecobee

  • Look for the function:

def set_hold_temp(self, index, cool_temp, heat_temp,
hold_type=“nextTransition”)

Change the “holdType” and add the “holdHours” parameter and value per the below:

    ''' Set a hold '''
    body = {"selection": {
                "selectionType": "thermostats",
                "selectionMatch": self.thermostats[index]['identifier']},
            "functions": [{"type": "setHold", "params": {
                "holdType": "holdHours",
                "holdHours": 2,
                "coolHoldTemp": int(cool_temp * 10),
                "heatHoldTemp": int(heat_temp * 10)
            }}]}
    log_msg_action = "set hold temp"
    return self.make_request(body, log_msg_action)
  • Save the file and restart HA from the front end

  • Reference: Ecobee API documentation used: ecobee API

This will give you 2 hours of hold time. Adapt as desired.

Note - this very ugly hack will be overwritten the next time you update your HA installation.

Submitting a patch to add an Ecobee parameter to set the desired Hold Type and the Hold Time (as applicable) would be the ideal approach but that’s a bit out of my league, ideally HA should allow people to decide what type of temperature hold to send.

Feature request submitted for affected ppl to vote: Ecobee: support Hold Type and Hold Hours for Temperature Holds

1 Like

Any possible way to get this to work with hassio in a docker container?

@lbrasi did you figure this out for docker? I am in the same situation and would like to do this.