I am trying to write a scene for bedtime. Is it possible to send a command to Ecobee to switch the mode to “Sleep”? Ecobee has modes for Home, Away and Sleep. Not sure if it’s something I can configure or if the component needs to add that part.
Currently not via HA. The best you could do is a temperature hold until you wake up and resume the program.
There is work currently in progress to add hold home on top of hold away and hold temperature.
Browsing the code there is some commented code for sleep mode. Maybe I’ll play with it later tonight.
Thanks for your reply. It would be nice to have the sleep mode at some point but for now I’ll try to use the temp hold.
so, if you pull down the code in the pull request above, uncomment the turn_on_sleep_mode function, update it so it matches the home/away functions of the same name, and then add it to the set_hold_mode function then it works.
I may start some work on this.
Ok thanks. I’ll give it a try on the weekend
So, I implemented a nice version and I am going to submit a pull request later (especially since I haven’t looked into any extra work I should do like improving the unit tests). Most of my work is an extension of Duoxillian’s, but since I’m in the process of learning how to use git I just copied his code for now instead of actually working off of what he did. But for now you can grab the code from my ecobee_hold branch if you are interested.
Ecobee comes with 3 climates by default (home, away, sleep), but you can add a lot of them (I don’t know what the limit is). Whatever name you give them doesn’t matter, but you can create a hold with them by setting the hold mode to “smart1”, “smart2”, etc…
I am also working on vacation support within HA, but that will rely on getting a pull request in to python-ecobee-api first.
Very nice! ok, I will definitely try before the weekend now. So I just clone your branch into the current location of the ecobee component?
yeah, just be aware that any updates to HA will override anything you put in those folders, so feel free to experiment, but the earliest this can make it in is 0.38 at this point
or you could follow this
https://home-assistant.io/developers/component_loading/
but I don’t think it’ll work due to the changes in helpers/state.py
Was this updated in 0.38 or is it coming in a future release? Thanks
As a new Ecobee customer, I found it difficult to follow some of these threads. While this one is a bit old, I felt adding some closure could help other new users - so, as of 0.46 (tested version); Yes.
Hold modes are implemented without custom components simply by calling:
- service: climate.set_hold_mode
data:
entity_id: climate.ecobee
hold_mode: 'sleep'
Just found this entry because my ecobee was not accepting the names of any of my custom “comfort settings” (like “Good Morning”) when I tried service calls from the front end. Turns out if I use “smart4” it works! (On the ecobee web site, my “Good Morning” comfort setting has a 4 icon next to it.) Can this information to use "smart_X_"be added to the documentation, or is my own custom name “Good Morning” supposed to work?
The “climate.set_hold_mode” works great for pulling in the correct temperature. However, it does not actually change the mode of the thermostat. Different modes can use different sets of remote sensors. This functionality is lost with the current home assistant implementation.
That would be a limitation on the ecobee side.
I’m actually not sure if you can remotely change the sensors that are being used.
If we could just change the mode it seems that everything would work seamlessly. Is there a reason for the implementation of a “set_hold_mode” instead of a “set_mode”? Is that an ecobee limitation or a home assistant limitation?
My understanding is that you would have to make a complete scheduler, which is significantly more complicated and not something anyone wants to undertake (or it would be done )
The Ecobee has a list of climates, and whenever you enter a period in the schedule it references the climate list and takes all of the current settings (and then applies any holds/events on top of it). There is no way in the API to set the current climate without changing the schedule. There is no way to change the list of active sensors without either changing the climate or the schedule.
Not sure I understand whats not working for you with set_hold_mode. I use it to pick my Good Morning Comfort Setting, which is configured on my ecobee to use only certain sensors. Isn’t that what you’re looking for?
Use home assistants “set_hold_mode” function with your “Good Morning” setting. Then go check your ecobee thermostat (via the ecobee app or it’s physical interface) and I believe you will see that it is using different sensors than you expect. (assumes the Good Morning setting uses a different number of room sensors than are being used when this experiment starts)
yea i agree. this has been working for awhile for me…
bedtime:
alias: "bedtime"
sequence:
- service: homeassistant.turn_on
entity_id:
- light.bedroom
- service: homeassistant.turn_off
entity_id: automation.doorbell_motion
- service: homeassistant.turn_off
entity_id: automation.plex_spy_notification
- service: homeassistant.turn_off
entity_id: automation.arrive_home
- service: climate.set_hold_mode
entity_id: climate.ecobee
data:
hold_mode: 'sleep'
- service: script.say_sonos
data_template:
volume: '0.50'
where: 'living_room, media_player.basement, media_player.bedroom'
what:
- delay:
seconds: '60'
- service: script.watch_tv_bed
- delay:
seconds: '300'
- service: scene.shut_down_house
Ok. Now that I look closer you are right. I’m not getting exactly what I thought I was. I don’t know about the sensors being used, but the thermostat clearly is just holding a temp.
Did you ever verify if this is working as expected. I’d like to set my mode to sleep when I go to bed, away, when everyone leaves, and home when anyone gets home.
I also want the hold mode to be set to until next schedule.
I have a pretty standard schedule, so the ecobee schedule itself is pretty good, but if I leave early, why not put it into way, and if I come home early, why not just put it to home vs waiting for the motion sensor to set it as home, etc.
Bedtime is probably the one I care most about, I don’t want to wait until ecobee thinks I’m in bed, I want to tell it I’m in bed with my goodnight routine.