mirror of
https://github.com/skalavala/mysmarthome.git
synced 2025-09-13 15:05:00 +00:00
misc minor updates
This commit is contained in:
@@ -851,14 +851,31 @@ automation:
|
||||
name: "frontyard"
|
||||
|
||||
#
|
||||
# Every 15 minutes, change stream to alternate view
|
||||
# Every 15 minutes, change stream to alternate view with random cameras
|
||||
#
|
||||
- alias: Reset Stream On Chromecast
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
minutes: "/15"
|
||||
action:
|
||||
- service_template: "script.{{- ['driveway', 'patio', 'playarea'] | random -}}_cam"
|
||||
|
||||
script:
|
||||
driveway_cam:
|
||||
sequence:
|
||||
- service: script.stream2chromecast
|
||||
data_template:
|
||||
url: !secret driveway_camera_stream_url
|
||||
name: "driveway"
|
||||
patio_cam:
|
||||
sequence:
|
||||
- service: script.stream2chromecast
|
||||
data_template:
|
||||
url: !secret patio_camera_stream_url
|
||||
name: "patio"
|
||||
playarea_cam:
|
||||
sequence:
|
||||
- service: script.stream2chromecast
|
||||
data_template:
|
||||
url: !secret playarea_camera_stream_url
|
||||
name: "playarea"
|
||||
|
@@ -259,9 +259,9 @@ automation:
|
||||
data_template:
|
||||
message: >
|
||||
{% if trigger.to_state.state | lower == "on" %}
|
||||
Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') -}} is OPEN.
|
||||
Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') |lower -}} is open.
|
||||
{% else %}
|
||||
Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') -}} is CLOSED.
|
||||
Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') |lower -}} is closed.
|
||||
{% endif %}
|
||||
|
||||
- alias: When Front Door Opens Turn Front Room Lights ON
|
||||
|
@@ -39,6 +39,18 @@ script:
|
||||
ringtone_id: 10
|
||||
ringtone_vol: 30
|
||||
|
||||
play_fav_song:
|
||||
sequence:
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.living_room, media_player.upstairs
|
||||
data:
|
||||
volume_level: "0.15"
|
||||
- service: media_player.play_media
|
||||
data:
|
||||
entity_id: media_player.living_room, media_player.upstairs
|
||||
media_content_id: !secret fav_song_url
|
||||
media_content_type: "music"
|
||||
|
||||
play_dog_sounds:
|
||||
sequence:
|
||||
- service: media_player.volume_set
|
||||
|
@@ -1006,3 +1006,86 @@
|
||||
# data_template:
|
||||
# entity_id: climate.cooler_fan
|
||||
# temperature: "{{ states.climate.main_floor.temperature |float }}"
|
||||
|
||||
# automation:
|
||||
# - id: sensor
|
||||
# alias: sensor
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: binary_sensor.door
|
||||
# from: "off"
|
||||
# to: "on"
|
||||
# for: "00:00:10"
|
||||
# action:
|
||||
# - service_template: "homeassistant.turn_{{- 'off' if trigger.to_state.state == 'on' else 'on' }}"
|
||||
# entity_id: switch.luce_corridoio
|
||||
|
||||
# homeassistant:
|
||||
# group:
|
||||
# kitchen:
|
||||
# name: Kitchen
|
||||
# entities:
|
||||
# - light.family_room
|
||||
# - light.gateway_light_34ce008ad65d
|
||||
# - light.hue_color_lamp_1
|
||||
# - light.hue_color_lamp_2
|
||||
# - light.hue_color_lamp_3
|
||||
# - light.master_bedroom
|
||||
# - light.master_bedroom_1
|
||||
# - light.master_bedroom_2
|
||||
|
||||
# - alias: "doods fremme video"
|
||||
# trigger:
|
||||
# platform: state
|
||||
# entity_id: image_processing.doods_fremme
|
||||
# # condition:
|
||||
# # condition: template
|
||||
# # value_template: "{{ 'person' in state_attr('image_processing.doods_fremme', 'summary') }}"
|
||||
# action:
|
||||
# - service: input_boolean.toggle
|
||||
# entity_id: input_boolean.dummy
|
||||
# - service: camera.record
|
||||
# data_template:
|
||||
# entity_id: camera.fremme
|
||||
# filename: "/tmp/{{- trigger.entity_id.split('.')[1].split('_')[1] -}}_{{- states.input_boolean.dummy_fremme.last_updated.strftime('%Y%m%d-%H%M%S') -}}.mp4"
|
||||
# duration: 20
|
||||
# lookback: 10
|
||||
# - delay: "00:00:20"
|
||||
# - service: notify.eirikz_telegram
|
||||
# data_template:
|
||||
# title: "Doods"
|
||||
# message: "fremme"
|
||||
# data:
|
||||
# video:
|
||||
# file: "/tmp/{{- trigger.entity_id.split('.')[1].split('_')[1] -}}_{{- states.input_boolean.dummy_fremme.last_updated.strftime('%Y%m%d-%H%M%S') -}}.mp4"
|
||||
|
||||
# homeassistant:
|
||||
|
||||
# input_boolean:
|
||||
# dummy_fremme:
|
||||
# name: "Dummy Fremme Input Boolean!"
|
||||
# icon: mdi:sticker-emoji
|
||||
# initial: on
|
||||
|
||||
# input_label:
|
||||
# file_1:
|
||||
# file_2:
|
||||
|
||||
# automation:
|
||||
# - alias: "my test"
|
||||
# initial_state: "on"
|
||||
# trigger:
|
||||
# platform: state
|
||||
# entity_id: switch.kitchen
|
||||
# action:
|
||||
# - service: input_boolean.toggle
|
||||
# entity_id: input_boolean.dummy
|
||||
# - service: input_label.set_value
|
||||
# data_template:
|
||||
# entity_id: "input_label.file_1"
|
||||
# value: "/tmp/{{- trigger.entity_id.split('.')[1] -}}_{{- states.input_boolean.dummy.last_updated.strftime('%Y%m%d-%H%M%S') -}}.mp4"
|
||||
# - delay: "00:00:05"
|
||||
# - service: input_label.set_value
|
||||
# data_template:
|
||||
# entity_id: "input_label.file_2"
|
||||
# value: "/tmp/{{- trigger.entity_id.split('.')[1] -}}_{{- states.input_boolean.dummy.last_updated.strftime('%Y%m%d-%H%M%S') -}}.mp4"
|
||||
|
@@ -114,11 +114,9 @@ automation:
|
||||
- switch.office_room
|
||||
- switch.prayer_room
|
||||
- switch.upstairs_fragrance
|
||||
- switch.wemoswitch1
|
||||
- switch.zwave_smart_switch_switch
|
||||
- light.family_room
|
||||
- light.family_room_2
|
||||
- light.gateway_light_34ce008ad65d
|
||||
- light.hue_color_lamp_1
|
||||
- light.hue_color_lamp_2
|
||||
- light.hue_color_lamp_3
|
||||
|
@@ -392,7 +392,7 @@ automation:
|
||||
action:
|
||||
- service_template: >
|
||||
{% if states('input_boolean.home_mode_away') == 'off' %}
|
||||
script.play_ringtone
|
||||
script.play_fav_song
|
||||
{% else %}
|
||||
script.play_dog_sounds
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user