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,22 @@
|
||||
alias: Clint travel sensor
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: input_text.set_value
|
||||
data_template:
|
||||
entity_id: input_text.person_clint
|
||||
value: >-
|
||||
{% if is_state('input_boolean.clint_home', 'on') %}
|
||||
{% if is_state('input_boolean.clint_is_awake','off') %}
|
||||
sleeping
|
||||
{% elif is_state('input_boolean.clint_in_bed','on') %}
|
||||
in bed
|
||||
{% else %}
|
||||
{{ states("input_select.clint_status_dropdown") }}
|
||||
{% endif %}
|
||||
{% elif is_state('device_tracker.pixel_7', 'home') and is_state('input_boolean.clint_home', 'off') %}
|
||||
near home ({{ states('input_select.clint_status_dropdown') }})
|
||||
{% elif not is_state('device_tracker.pixel_7', 'not_home') %}
|
||||
at {{ states('device_tracker.pixel_7') }}
|
||||
{% else %}
|
||||
somewhere
|
||||
{% endif %}
|
||||
@@ -0,0 +1,9 @@
|
||||
alias: Clint traveltime
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: Clint Traveltime
|
||||
entity_id: script.clint_traveltime
|
||||
message: >
|
||||
{{ states("sensor.date_time_iso") }} Updated travel time for Clint
|
||||
@@ -0,0 +1,46 @@
|
||||
alias: Take Meds
|
||||
sequence:
|
||||
- alias: "Check the input_booleans and react accordingly"
|
||||
choose:
|
||||
- conditions:
|
||||
- alias: "Morning meds needed"
|
||||
condition: state
|
||||
entity_id: input_boolean.clint_needs_am_meds
|
||||
state: "on"
|
||||
sequence:
|
||||
- alias: "Turn off AM meds"
|
||||
service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.clint_needs_am_meds
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/Sounds/tts/taking_morning_meds.mp3
|
||||
media_content_type: "audio/mpeg"
|
||||
- conditions:
|
||||
- alias: "Afternoon meds needed"
|
||||
condition: state
|
||||
entity_id: input_boolean.clint_needs_pm_meds
|
||||
state: "on"
|
||||
sequence:
|
||||
- alias: "Turn off PM meds"
|
||||
service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.clint_needs_pm_meds
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/Sounds/tts/taking_afternoon_meds.mp3
|
||||
media_content_type: "audio/mpeg"
|
||||
default:
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/Sounds/tts/meds_not_needed.mp3
|
||||
media_content_type: "audio/mpeg"
|
||||
Reference in New Issue
Block a user