Has anyone used the new ecobee.create_vacation service?

The new ecobee.create_vacation service looks awesome! This is something that has been needed for a long time. Has anyone tried it yet? There are start_date and start_time parameters. I am wondering how/if it can be set to start now (as of the time an automation is fired).

I have a “Vacation Mode” input boolean that triggers a number of actions within Home Assistant. I would love for one of those actions to be to instantly create and start an ecobee vacation.

Thoughts?

Very nice, I hadn’t seen this service before. I just added a vacation input boolean so I"ll look into how to automate those date/time parameters tonight.

1 Like

I just gave this a whirl. By default if you only provide the required fields and don’t specify any dates or times it will create a vacation with a start date/time of now and and end date of 2 weeks in the future. So you shouldn’t need to do anything to make this work (unless your vacation is longer than 2 weeks).

1 Like

I suppose I could have just tried it myself! Thanks for checking it out and giving an update!!

@fahr - I tried this morning and was able to create a vacation. However, I’m unable to delete it using HA. Were you able to do this successfully? If so, would you mind sharing your config? Here is mine:

    - service: ecobee.delete_vacation
      data:
        entity_id: climate.downstairs_ecobee
        vacation_name: 'HA Vacation'

Ignore that question. I was making a really dumb mistake. :slight_smile: Working now!

Yes I’m using it. I tied mine in to Google Calendar so when the event starts it creates the vacation to last until the calendar event is over. I did it in Node Red but it could also be done in YAML automations as well.

1 Like

That’s a great idea to tie it into calendar events!

If anyone finds this useful, I use a calendar that is just for vacations and I have it fire this script whenever there’s a new entry

  ecobee_set_vacation:
    sequence:
      - service: ecobee.create_vacation 
        data_template: 
          entity_id: climate.home 
          vacation_name: '{{states.calendar.holiday_schedule.attributes.message}}'
          start_date: '{{states.calendar.holiday_schedule.attributes.start_time.split(" ")[0]}}'
          start_time: '{{states.calendar.holiday_schedule.attributes.start_time.split(" ")[1]}}' 
          end_date: '{{states.calendar.holiday_schedule.attributes.end_time.split(" ")[0]}}'
          end_time: '{{states.calendar.holiday_schedule.attributes.end_time.split(" ")[1]}}' 
          heat_temp: 19
          cool_temp: 27
3 Likes

NEVER MIND: problem was that start date cannot be in the past.


I tried this from the developer->services tab and ran into 2 problems:

  1. The example data created by the Fill in example data button has incorrect formatting for dates and times.
  2. No vacation is created on the ecobee when dates and times are specified (see screenshot below). It works fine for the default start and end time (i.e. not specified as parameters).

I use the most recent hassio (via docker on a NUC).

When I use create_vacation, it works… But it later gets overwritten by my ecobee daily schedule. I assumed vacation mode would put the schedule on hold. Has anyone else noticed this as well?

I am really struggling to get this to work with dynamic dates. I have a boolean toggle that runs automations for when I go on vacation (and then the runs the opposite for when I get back) so my goal is to create the vacation for 100-days and then it will just be deleted when I get home and turn off my boolean.

service: ecobee.create_vacation
data:
  entity_id: climate.my_ecobee
  vacation_name: autovac
  cool_temp: 76
  fan_mode: auto
  fan_min_on_time: 5
  end_date: '{{ (now() + timedelta( days = 100)).timestamp() | timestamp_custom("%Y-%m-%d") }}'
  start_time: '00:00:00'
  end_time: '23:59:00'
  start_date: '{{ (now().timestamp() | timestamp_custom("%Y-%m-%d") }}'
  heat_temp: 65

When I run that I get the following error: Failed to call service ecobee.create_vacation. template value should be a string for dictionary value @ data[‘sequence’][0][‘data’].

Any help is appreciated.

Have you tried simplifying it to see if you can get it to work? Here is mine, which works well. If you don’t specify dates, it defaults to 2 weeks.

    - service: ecobee.create_vacation
      data:
        entity_id: climate.upstairs_ecobee
        vacation_name: 'Vacation US'
        cool_temp: '80'
        heat_temp: '68'

@_Mike yes that works fine. It also works with hard coded dates. The issue only occurs when trying to use a date template. 14 should almost always be sufficient but I don’t want to have to think about it if I can get this programming to work.

Replace your start_date line with this. You were missing a closing paren.

start_date: '{{ (now().timestamp() | timestamp_custom("%Y-%m-%d")) }}'

Thank you! I fixed it in both end_date and start_date and same error. Also tried to delete the opening and closing paren too but same error.

@_Mike never mind I figured it out. I only needed to fix start_date, you were right. Thanks!!!

1 Like

This works great! One question though - is it possible to create a vacation with two entities?

It’s not the end of the world to do two adds and two deletes, but it’s more elegant if I could add both thermostats to the same vacation like I do from their App

I could be wrong, but I don’t think there is a way to do that in HA. I just have a script that creates vacations for our upstairs and downstairs ecobees. I execute that when we leave for vacation and don’t bother with specifying dates. Then when we arrive home, it automatically runs a separate script that deletes the vacation on both thermostats. It’s worked pretty flawlessly for years.