mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,167 @@
|
||||
alias: 'Goodnight Kids TTS'
|
||||
id: automation_goodnight_kids_tts
|
||||
initial_state: off
|
||||
trigger:
|
||||
platform: time
|
||||
at: input_datetime.kids_bedtime_announcement_time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.announce_bedtime
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.kids_bedtime
|
||||
|
||||
- service: media_player.volume_set
|
||||
data_template:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
- media_player.bathroom_mini
|
||||
- media_player.front_room_hub
|
||||
- media_player.kitchen
|
||||
- media_player.nursery_hub
|
||||
- media_player.master_bedroom_clock
|
||||
volume_level: 0.7
|
||||
|
||||
- delay: '00:00:01'
|
||||
|
||||
- service: tts.google_translate_say
|
||||
entity_id: media_player.all_speakers
|
||||
data_template:
|
||||
message: >
|
||||
It is time for bed.
|
||||
{% if is_state('input_boolean.emmett_home', 'on') %}
|
||||
Good night Emmett
|
||||
{% if is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
Good night Bridget and good night Ebin
|
||||
{% else %}
|
||||
and good night Bridget
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.ebin_home','on') %}
|
||||
and good night Ebin
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
Good night Bridget and good night Ebin
|
||||
{% else %}
|
||||
Good Night Bridget
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.ebin_home', 'on') %}
|
||||
Good night Ebin
|
||||
{% endif %}
|
||||
- delay: '00:00:10'
|
||||
|
||||
- service: homeassistant.turn_off
|
||||
entity_id:
|
||||
- media_player.all_speakers
|
||||
- media_player.front_room_tv
|
||||
- media_player.downstairs_roku
|
||||
- switch.shelly_projector
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: Dimmed
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id:
|
||||
- light.black_bed_wled
|
||||
- light.white_bed_wled
|
||||
brightness_pct: 50
|
||||
effect: random
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: 'Nightlight'
|
||||
|
||||
- delay: "00:15:00"
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: 'Off'
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
|
||||
#- service: input_select.select_option
|
||||
# data:
|
||||
# entity_id: input_select.google_home
|
||||
# option: 'Nursery'
|
||||
#- service: input_select.select_option
|
||||
# data:
|
||||
# entity_id: input_select.ambient_sound
|
||||
# option: 'Random Kids Noise'
|
||||
#- service: input_number.set_value
|
||||
# data:
|
||||
# entity_id: input_number.volume_ambientsounds
|
||||
# value: '0.40'
|
||||
#- service: script.ambientsounds
|
||||
- delay: "00:30:00"
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
- service: light.turn_off
|
||||
data:
|
||||
entity_id:
|
||||
- light.black_bed_wled
|
||||
- light.white_bed_wled
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: 'Off'
|
||||
Reference in New Issue
Block a user