mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-13 13:29:12 +00:00
Closes #122 - Added verbal warning when I come home and haven't taken my medicine.
This commit is contained in:
parent
f281bd45bc
commit
6db6c8753c
@ -19,6 +19,7 @@ SSL via [SSLS](https://SSLS.com) - 5 Bucks A Year! - Keeps me safe!
|
|||||||
* [Amazon Echo](http://amzn.to/2dSVbK4) and [DOT](http://amzn.to/2e3vHFQ)
|
* [Amazon Echo](http://amzn.to/2dSVbK4) and [DOT](http://amzn.to/2e3vHFQ)
|
||||||
* [Amazon Dash Buttons](http://amzn.to/2dPKZhM)
|
* [Amazon Dash Buttons](http://amzn.to/2dPKZhM)
|
||||||
* [Amazon Fire TV](http://amzn.to/2iiuaNT)
|
* [Amazon Fire TV](http://amzn.to/2iiuaNT)
|
||||||
|
* [Wink Hub](http://amzn.to/2orGEWo) - Used to connect certain Zwave outlets etc.
|
||||||
* [Phillips Hue Hub Gen 2](http://amzn.to/2eoQTJy)
|
* [Phillips Hue Hub Gen 2](http://amzn.to/2eoQTJy)
|
||||||
* Mixture of [Hue Colored lights](http://amzn.to/2l2viGK), [White Lights](http://amzn.to/2lEf4Xq) and GE Link bulbs.
|
* Mixture of [Hue Colored lights](http://amzn.to/2l2viGK), [White Lights](http://amzn.to/2lEf4Xq) and GE Link bulbs.
|
||||||
* [Hue Go](http://amzn.to/2iB36Ii) - Great lights for the kids since they have an actual button on them for control.
|
* [Hue Go](http://amzn.to/2iB36Ii) - Great lights for the kids since they have an actual button on them for control.
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
######################################################################
|
|
||||||
## What did she say? REPEAT THE LAST MESSAGE.
|
|
||||||
######################################################################
|
|
||||||
- alias: 'tts_repeat'
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: input_boolean.last_message
|
|
||||||
state: 'on'
|
|
||||||
from: 'off'
|
|
||||||
|
|
||||||
action:
|
|
||||||
- service: script.Voice_notify
|
|
||||||
data_template:
|
|
||||||
value1: "{{states('sensor.polly_lastmsg')}}"
|
|
@ -1,30 +1,34 @@
|
|||||||
###################################
|
|
||||||
## Input_Booleans Section
|
|
||||||
###################################
|
|
||||||
|
|
||||||
input_boolean.alert_mode:
|
input_boolean.alert_mode:
|
||||||
friendly_name: 'Alert Mode'
|
friendly_name: 'Alert Mode'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
hidden: False
|
hidden: False
|
||||||
icon: mdi:alert-octagram
|
icon: mdi:alert-octagram
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.color_tornado:
|
input_boolean.color_tornado:
|
||||||
friendly_name: 'Color Tornado'
|
friendly_name: 'Color Tornado'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
hidden: False
|
hidden: False
|
||||||
icon: mdi:invert-colors
|
icon: mdi:invert-colors
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.flash:
|
input_boolean.flash:
|
||||||
friendly_name: 'Flash'
|
friendly_name: 'Flash'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
hidden: False
|
hidden: False
|
||||||
icon: mdi:yin-yang
|
icon: mdi:yin-yang
|
||||||
|
|
||||||
input_boolean.guard_dog:
|
|
||||||
friendly_name: 'Guard Dog'
|
|
||||||
|
input_boolean.garage_check:
|
||||||
|
friendly_name: 'Garage Check'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
hidden: False
|
hidden: False
|
||||||
icon: mdi:paw
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.good_morning:
|
input_boolean.good_morning:
|
||||||
friendly_name: 'Good Morning'
|
friendly_name: 'Good Morning'
|
||||||
@ -33,6 +37,7 @@ input_boolean.good_morning:
|
|||||||
icon: mdi:weather-sunset-up
|
icon: mdi:weather-sunset-up
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.good_night:
|
input_boolean.good_night:
|
||||||
friendly_name: 'Good Night'
|
friendly_name: 'Good Night'
|
||||||
emulated_hue: False
|
emulated_hue: False
|
||||||
@ -40,6 +45,15 @@ input_boolean.good_night:
|
|||||||
icon: mdi:weather-night
|
icon: mdi:weather-night
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
input_boolean.guard_dog:
|
||||||
|
friendly_name: 'Guard Dog'
|
||||||
|
emulated_hue: True
|
||||||
|
hidden: False
|
||||||
|
icon: mdi:paw
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.guest_mode:
|
input_boolean.guest_mode:
|
||||||
friendly_name: 'Guest Mode'
|
friendly_name: 'Guest Mode'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
@ -47,6 +61,7 @@ input_boolean.guest_mode:
|
|||||||
icon: mdi:account-alert
|
icon: mdi:account-alert
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.home_stats:
|
input_boolean.home_stats:
|
||||||
friendly_name: 'Home Stats'
|
friendly_name: 'Home Stats'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
@ -54,6 +69,15 @@ input_boolean.home_stats:
|
|||||||
icon: mdi:chart-bar
|
icon: mdi:chart-bar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
input_boolean.inside_weather:
|
||||||
|
friendly_name: 'Inside Weather'
|
||||||
|
emulated_hue: False
|
||||||
|
hidden: False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.last_message:
|
input_boolean.last_message:
|
||||||
friendly_name: 'Last Message'
|
friendly_name: 'Last Message'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
@ -61,6 +85,15 @@ input_boolean.last_message:
|
|||||||
icon: mdi:repeat-once
|
icon: mdi:repeat-once
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
input_boolean.lights_status:
|
||||||
|
friendly_name: 'Lights Status'
|
||||||
|
emulated_hue: False
|
||||||
|
hidden: False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.meal_time:
|
input_boolean.meal_time:
|
||||||
friendly_name: 'Meal Time'
|
friendly_name: 'Meal Time'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
@ -68,6 +101,23 @@ input_boolean.meal_time:
|
|||||||
icon: mdi:food
|
icon: mdi:food
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
input_boolean.medicine:
|
||||||
|
friendly_name: 'Medicine'
|
||||||
|
emulated_hue: True
|
||||||
|
hidden: False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
input_boolean.outside_weather:
|
||||||
|
friendly_name: 'Outside Weather'
|
||||||
|
emulated_hue: True
|
||||||
|
hidden: False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.responsibilities:
|
input_boolean.responsibilities:
|
||||||
friendly_name: 'Responsibilities'
|
friendly_name: 'Responsibilities'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
@ -75,6 +125,7 @@ input_boolean.responsibilities:
|
|||||||
icon: mdi:delete-sweep
|
icon: mdi:delete-sweep
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.school_mode:
|
input_boolean.school_mode:
|
||||||
friendly_name: 'School Mode'
|
friendly_name: 'School Mode'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
@ -82,6 +133,7 @@ input_boolean.school_mode:
|
|||||||
icon: mdi:school
|
icon: mdi:school
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.speech_notifications:
|
input_boolean.speech_notifications:
|
||||||
friendly_name: 'Speech Notifications'
|
friendly_name: 'Speech Notifications'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
@ -89,6 +141,7 @@ input_boolean.speech_notifications:
|
|||||||
icon: mdi:speaker-wireless
|
icon: mdi:speaker-wireless
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.tv_time:
|
input_boolean.tv_time:
|
||||||
friendly_name: 'Tv Time'
|
friendly_name: 'Tv Time'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
@ -96,6 +149,7 @@ input_boolean.tv_time:
|
|||||||
icon: mdi:television-guide
|
icon: mdi:television-guide
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input_boolean.work:
|
input_boolean.work:
|
||||||
friendly_name: 'Work'
|
friendly_name: 'Work'
|
||||||
emulated_hue: True
|
emulated_hue: True
|
||||||
|
@ -2,23 +2,18 @@ guest_mode:
|
|||||||
name: Guest Mode
|
name: Guest Mode
|
||||||
icon: mdi:account-alert
|
icon: mdi:account-alert
|
||||||
initial: off
|
initial: off
|
||||||
|
|
||||||
school_mode:
|
school_mode:
|
||||||
name: School Mode
|
name: School Mode
|
||||||
icon: mdi:school
|
icon: mdi:school
|
||||||
initial: on
|
initial: on
|
||||||
|
|
||||||
alert_mode:
|
alert_mode:
|
||||||
name: Alert Mode
|
name: Alert Mode
|
||||||
icon: mdi:alert-octagram
|
icon: mdi:alert-octagram
|
||||||
initial: off
|
initial: off
|
||||||
|
|
||||||
speech_notifications:
|
speech_notifications:
|
||||||
name: Speech Notifications
|
name: Speech Notifications
|
||||||
icon: mdi:speaker-wireless
|
icon: mdi:speaker-wireless
|
||||||
initial: on
|
initial: on
|
||||||
|
|
||||||
last_message:
|
|
||||||
name: Last Notification
|
|
||||||
icon: mdi:repeat-once
|
|
||||||
initial: off
|
|
||||||
|
@ -29,6 +29,9 @@ voice_notify:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.alert_mode
|
entity_id: input_boolean.alert_mode
|
||||||
state: 'on'
|
state: 'on'
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.medicine
|
||||||
|
state: 'off'
|
||||||
- condition: or
|
- condition: or
|
||||||
conditions:
|
conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
@ -41,6 +44,9 @@ voice_notify:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.alert_mode
|
entity_id: input_boolean.alert_mode
|
||||||
state: 'on'
|
state: 'on'
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.medicine
|
||||||
|
state: 'off'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.speech_notifications
|
entity_id: input_boolean.speech_notifications
|
||||||
state: 'on'
|
state: 'on'
|
||||||
@ -57,11 +63,11 @@ voice_notify:
|
|||||||
data_template:
|
data_template:
|
||||||
volume_level: >
|
volume_level: >
|
||||||
{% if now().strftime("%H")|int < 12 and now().strftime("%H")|int > 6%}
|
{% if now().strftime("%H")|int < 12 and now().strftime("%H")|int > 6%}
|
||||||
0.25
|
0.4
|
||||||
{% elif now().strftime("%H")|int > 12 and now().strftime("%H")|int < 20%}
|
{% elif now().strftime("%H")|int > 12 and now().strftime("%H")|int < 20%}
|
||||||
0.45
|
0.6
|
||||||
{% else %}
|
{% else %}
|
||||||
0.20
|
0.3
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
- service: tts.amazon_polly_say
|
- service: tts.amazon_polly_say
|
||||||
@ -75,7 +81,7 @@ voice_notify:
|
|||||||
{% else %}
|
{% else %}
|
||||||
"Good evening.
|
"Good evening.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{%- macro responsibilities() -%}
|
{%- macro responsibilities() -%}
|
||||||
{%if now().strftime("%a") == 'Wed' or now().strftime("%a") == 'Sun'%}
|
{%if now().strftime("%a") == 'Wed' or now().strftime("%a") == 'Sun'%}
|
||||||
Today is {{now().strftime("%A")}} and {{now().strftime("%A")}} is garbage day.
|
Today is {{now().strftime("%A")}} and {{now().strftime("%A")}} is garbage day.
|
||||||
@ -124,6 +130,11 @@ voice_notify:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
|
{% macro medicine() %}
|
||||||
|
{% if is_state('input_boolean.medicine', 'off') -%}
|
||||||
|
It looks like Carlo has not taken his medicine yet. Please make sure Carlo takes his medicine now.
|
||||||
|
{% endif -%}
|
||||||
|
{%- endmacro -%}
|
||||||
|
|
||||||
{{ personarriving }}
|
{{ personarriving }}
|
||||||
|
|
||||||
@ -147,18 +158,18 @@ voice_notify:
|
|||||||
{% if is_state('input_boolean.lights_status', 'on') %}
|
{% if is_state('input_boolean.lights_status', 'on') %}
|
||||||
{{lights_status()}}
|
{{lights_status()}}
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
{% if is_state('input_boolean.responsibilities', 'on') %}
|
||||||
|
{{responsibilities()}}
|
||||||
|
{%endif%}
|
||||||
|
{% if now().strftime("%H")|int > 22 %}
|
||||||
|
{{Medicine()}}
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
{{ value1 }}"
|
{{ value1 }}"
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- service: mqtt.publish
|
|
||||||
data_template:
|
|
||||||
payload: '{{ value1 }}'
|
|
||||||
topic: 'polly/lastmsg'
|
|
||||||
retain: true
|
|
||||||
|
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.last_message
|
|
||||||
- input_boolean.alert_mode
|
- input_boolean.alert_mode
|
||||||
- input_boolean.home_stats
|
- input_boolean.home_stats
|
||||||
- input_boolean.responsibilities
|
- input_boolean.responsibilities
|
||||||
|
@ -2,10 +2,6 @@
|
|||||||
## Various MQTT sensors
|
## Various MQTT sensors
|
||||||
###################################################
|
###################################################
|
||||||
|
|
||||||
- platform: mqtt
|
|
||||||
state_topic: "polly/lastmsg"
|
|
||||||
name: "polly_lastmsg"
|
|
||||||
|
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
state_topic: "ifttt/rachio/watering_time"
|
state_topic: "ifttt/rachio/watering_time"
|
||||||
name: "Rachio_watering_time"
|
name: "Rachio_watering_time"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user