Closes #151 - Use History sensor to track prior day's sleep data.

This commit is contained in:
CCOSTAN 2017-05-03 16:39:11 +00:00
parent 536badc082
commit cdc62908c8
3 changed files with 39 additions and 5 deletions

View File

@ -79,7 +79,7 @@ Lots of my gear comes from [BetaBound](https://goo.gl/0vxT8A) for Beta Testing a
* (IFTTT) Trigger Good Night routine when I step on the [Withings](http://amzn.to/2kr78nW) scale after 10pm.
* Sets up the front lights in the house with preset colors depending on the ~~month~~ day!.
* On motion from [SkyBell HD Doorbell](http://amzn.to/2dcexIB) (IFTTT) Turn front lights to Bright White lights for 10 minutes and then back to original colors. Fake Dog barking when there is motion by the house.
* When someone rings the Doorbell (IFTTT), the backyard and Bathroom lights Flash - Since we might not hear the doorbell. Fake Dog barks as well.
* When someone rings the Doorbell (IFTTT), the backyard and Bathroom lights Flash - Since we might not hear the doorbell. Fake Dog barks as well (which can be snoozed for 30 minutes via Alexa).
* Watch and alert on Home Assistant's Disk usage. Get alerts before Pi runs out of space on the [SD Card](http://amzn.to/2kNttio).
* Digital Cuckoo Clock that goes off each hour and on the half just like a real Cuckoo Clock. Plays across the whole house on my [ChromeCast Audios](http://amzn.to/2lE9gNu)

View File

@ -137,10 +137,6 @@ media_player:
name: Living Room TV
scan_interval: 60
sleepiq:
username: !secret sleepiq_username
password: !secret sleepiq_password
tts:
- platform: amazon_polly
aws_access_key_id: !secret aws_access_key_ID

38
packages/sleepiq.yaml Executable file
View File

@ -0,0 +1,38 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize:
input_boolean.sleepy_dog:
friendly_name: 'Sleepy Dog'
icon: mdi:bell-sleep
emulated_hue: True
hidden: False
#-------------------------------------------
sleepiq:
username: !secret sleepiq_username
password: !secret sleepiq_password
#-------------------------------------------
sensor:
- platform: history_stats
name: Carlo_sleep_hours
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
state: 'on'
type: time
end: '{{ now() }}'
duration:
hours: 24
- platform: history_stats
name: Stacey_sleep_hours
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
state: 'on'
type: time
end: '{{ now() }}'
duration:
hours: 24
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################