Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95419

Dynamic, personal bedtime/wakeup sensors and alarm clock/bedtime notification, ideas/tips needed

$
0
0

@forschi wrote:

I need some help to start off my latest idea in my quest for a automated (not remote controlled) house :slight_smile:
Right now I’m unable to wrap my head around how I will do this exactly, so I’m thinking that maybe by sharing my idea and writing it down I will either figure it out myself and can share the result.
Or that this community has some great tips or already working solutions to help me on the way

Goal:
The idea is that I will never need to worry about setting an alarm clock and to have events trigger when I “should be awake, but is asleep” or “should be asleep, but is awake”.

I have working input_booleans and sensors to set our “states” currently that I will be comparing to this new sensor that will be the suggested “awake/asleep”-sensor.

Existing and working:

  • input_number.person_x_sleep_wanted
    • Preset amout of hours I want to sleep
  • input_number.person_x_morning_routine
    • time to add to sleep hours before a calendar event or office hours start
  • input_boolean.person_x_awake
    • controlled by google routine, bedside button - this will tell if I’m actually awake or not, automation takes care of it if I forget it (if it is night and no movements in the house, no chromecast playing, computer is idle etc it will switch this one to off )

Need to create:

  • binary_sensor.person_x_awake_recommended
    • Template from below sensors: if after bedtime and before wakeup -> asleep, else -> awake
  • sensor.person_x_next_bedtime (template sensor)
    • timestamp of next recommended bedtime, if still awake negative values until next wakeup time is within 1 hour (for example)
    • first to occur from:
      • calendar event start time - morning routines - sleep wanted
      • if workday: office hour start time - morning_routine - sleep wanted
      • latest time to wake up if no event/workday - sleep wanted
  • sensor.person_x_next_wakeup (template sensor)
    • negative values if person is asleep and time for next bedtime has not passed
    • first to occur from:
      • first calendar event+morning routine
      • if workday: office hour start time + morning_routine
      • time when input_boolean.person_x_awake was switched off + sleep_wanted
      • latest time to wake up if no events (preset time)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95419

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>