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 Dash Buttons](http://amzn.to/2dPKZhM)
|
||||
* [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)
|
||||
* 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.
|
||||
|
@ -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:
|
||||
friendly_name: 'Alert Mode'
|
||||
emulated_hue: True
|
||||
hidden: False
|
||||
icon: mdi:alert-octagram
|
||||
|
||||
|
||||
|
||||
input_boolean.color_tornado:
|
||||
friendly_name: 'Color Tornado'
|
||||
emulated_hue: True
|
||||
hidden: False
|
||||
icon: mdi:invert-colors
|
||||
|
||||
|
||||
|
||||
input_boolean.flash:
|
||||
friendly_name: 'Flash'
|
||||
emulated_hue: True
|
||||
hidden: False
|
||||
icon: mdi:yin-yang
|
||||
|
||||
input_boolean.guard_dog:
|
||||
friendly_name: 'Guard Dog'
|
||||
|
||||
|
||||
input_boolean.garage_check:
|
||||
friendly_name: 'Garage Check'
|
||||
emulated_hue: True
|
||||
hidden: False
|
||||
icon: mdi:paw
|
||||
|
||||
|
||||
|
||||
|
||||
input_boolean.good_morning:
|
||||
friendly_name: 'Good Morning'
|
||||
@ -33,6 +37,7 @@ input_boolean.good_morning:
|
||||
icon: mdi:weather-sunset-up
|
||||
|
||||
|
||||
|
||||
input_boolean.good_night:
|
||||
friendly_name: 'Good Night'
|
||||
emulated_hue: False
|
||||
@ -40,6 +45,15 @@ input_boolean.good_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:
|
||||
friendly_name: 'Guest Mode'
|
||||
emulated_hue: True
|
||||
@ -47,6 +61,7 @@ input_boolean.guest_mode:
|
||||
icon: mdi:account-alert
|
||||
|
||||
|
||||
|
||||
input_boolean.home_stats:
|
||||
friendly_name: 'Home Stats'
|
||||
emulated_hue: True
|
||||
@ -54,6 +69,15 @@ input_boolean.home_stats:
|
||||
icon: mdi:chart-bar
|
||||
|
||||
|
||||
|
||||
input_boolean.inside_weather:
|
||||
friendly_name: 'Inside Weather'
|
||||
emulated_hue: False
|
||||
hidden: False
|
||||
|
||||
|
||||
|
||||
|
||||
input_boolean.last_message:
|
||||
friendly_name: 'Last Message'
|
||||
emulated_hue: True
|
||||
@ -61,6 +85,15 @@ input_boolean.last_message:
|
||||
icon: mdi:repeat-once
|
||||
|
||||
|
||||
|
||||
input_boolean.lights_status:
|
||||
friendly_name: 'Lights Status'
|
||||
emulated_hue: False
|
||||
hidden: False
|
||||
|
||||
|
||||
|
||||
|
||||
input_boolean.meal_time:
|
||||
friendly_name: 'Meal Time'
|
||||
emulated_hue: True
|
||||
@ -68,6 +101,23 @@ input_boolean.meal_time:
|
||||
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:
|
||||
friendly_name: 'Responsibilities'
|
||||
emulated_hue: True
|
||||
@ -75,6 +125,7 @@ input_boolean.responsibilities:
|
||||
icon: mdi:delete-sweep
|
||||
|
||||
|
||||
|
||||
input_boolean.school_mode:
|
||||
friendly_name: 'School Mode'
|
||||
emulated_hue: True
|
||||
@ -82,6 +133,7 @@ input_boolean.school_mode:
|
||||
icon: mdi:school
|
||||
|
||||
|
||||
|
||||
input_boolean.speech_notifications:
|
||||
friendly_name: 'Speech Notifications'
|
||||
emulated_hue: True
|
||||
@ -89,6 +141,7 @@ input_boolean.speech_notifications:
|
||||
icon: mdi:speaker-wireless
|
||||
|
||||
|
||||
|
||||
input_boolean.tv_time:
|
||||
friendly_name: 'Tv Time'
|
||||
emulated_hue: True
|
||||
@ -96,6 +149,7 @@ input_boolean.tv_time:
|
||||
icon: mdi:television-guide
|
||||
|
||||
|
||||
|
||||
input_boolean.work:
|
||||
friendly_name: 'Work'
|
||||
emulated_hue: True
|
||||
|
@ -17,8 +17,3 @@ speech_notifications:
|
||||
name: Speech Notifications
|
||||
icon: mdi:speaker-wireless
|
||||
initial: on
|
||||
|
||||
last_message:
|
||||
name: Last Notification
|
||||
icon: mdi:repeat-once
|
||||
initial: off
|
@ -29,6 +29,9 @@ voice_notify:
|
||||
- condition: state
|
||||
entity_id: input_boolean.alert_mode
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.medicine
|
||||
state: 'off'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
@ -41,6 +44,9 @@ voice_notify:
|
||||
- condition: state
|
||||
entity_id: input_boolean.alert_mode
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.medicine
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.speech_notifications
|
||||
state: 'on'
|
||||
@ -57,11 +63,11 @@ voice_notify:
|
||||
data_template:
|
||||
volume_level: >
|
||||
{% 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%}
|
||||
0.45
|
||||
0.6
|
||||
{% else %}
|
||||
0.20
|
||||
0.3
|
||||
{% endif %}
|
||||
|
||||
- service: tts.amazon_polly_say
|
||||
@ -124,6 +130,11 @@ voice_notify:
|
||||
{% endif %}
|
||||
{%- 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 }}
|
||||
|
||||
@ -147,18 +158,18 @@ voice_notify:
|
||||
{% if is_state('input_boolean.lights_status', 'on') %}
|
||||
{{lights_status()}}
|
||||
{%endif%}
|
||||
{% if is_state('input_boolean.responsibilities', 'on') %}
|
||||
{{responsibilities()}}
|
||||
{%endif%}
|
||||
{% if now().strftime("%H")|int > 22 %}
|
||||
{{Medicine()}}
|
||||
{%endif%}
|
||||
|
||||
{{ value1 }}"
|
||||
cache: true
|
||||
|
||||
- service: mqtt.publish
|
||||
data_template:
|
||||
payload: '{{ value1 }}'
|
||||
topic: 'polly/lastmsg'
|
||||
retain: true
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.last_message
|
||||
- input_boolean.alert_mode
|
||||
- input_boolean.home_stats
|
||||
- input_boolean.responsibilities
|
||||
|
@ -2,10 +2,6 @@
|
||||
## Various MQTT sensors
|
||||
###################################################
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: "polly/lastmsg"
|
||||
name: "polly_lastmsg"
|
||||
|
||||
- platform: mqtt
|
||||
state_topic: "ifttt/rachio/watering_time"
|
||||
name: "Rachio_watering_time"
|
||||
|
Loading…
x
Reference in New Issue
Block a user