dannytsang / homeassistant-config

🏑 My Home Assistant Configs.
https://dannytsang.com
31 stars 0 forks source link

Day / Local Trips πŸš—πŸš† #87

Open dannytsang opened 1 year ago

dannytsang commented 1 year ago

Have a way to tell when the house will be unoccupied for hours. This will let things power down to turning off heating for a period of time.

This is different to holiday mode where you're expected to be away for one night or more.

The criteria are as follows:

  1. Duration - Return within 24 hours. It doesn't matter if that 24 hours span more than a day e.g. Wednesday 7pm to Tuesday 6pm.
  2. Participants - No one is at home during the time period.
  3. Exceptions - Exclude/handle short trips. E.g. it should not trigger for pick up / drop off trips.

If such an event occurs, the types of things Home Assistant can do are:

  1. Turn off central heating
  2. Turn off hot water
  3. Notify of travel time / traffic

Example scenarios this should detect:

Stages

Breaking down the above to 3 stages:

  1. Before the event starts.
  2. During the event.
  3. When the event ends.

1. Before the event starts

The following can be used to match range of criteria:

  1. Duration: A non all day calendar invite.
  2. Participants: The calendar the event belongs to has some indication.
  3. Exceptions: A combination of the above two.

Other things to consider is the if a location is set, you can fact in travel time.

2. During the event

  1. Duration: A non all day calendar invite.
  2. Participants: Geo-location.
  3. Exceptions: Travel time / distance as well as calendar invite duration.

3 When the event ends

  1. Duration: Calendar end event and geo-location to see if people are leaving (yet).
  2. Participants: Geo-location.
  3. Exceptions: N/A

Factoring travel time and the time would be a bonus #57

Challenges

In order of things to solve, top being important:

  1. No sensors for calendar events - The only reliable way to tell a non all event is occurring is to use calendar start and end Home Assistant events. ~2. Overlapping calendar events~ No longer an issue with the get_events service call: https://www.home-assistant.io/integrations/calendar/#service-calendarget_events
  2. Location will play a role but it won't know how long you will be away except using travel time as an indicator.