minor fixes
This commit is contained in:
parent
dab0d91303
commit
b9b9f14ead
|
@ -17,13 +17,14 @@ homeassistant:
|
||||||
|
|
||||||
allowlist_external_dirs:
|
allowlist_external_dirs:
|
||||||
- /config/www/downloads/camera/patio/
|
- /config/www/downloads/camera/patio/
|
||||||
|
- /config/www/downloads/camera/porch/
|
||||||
- /config/www/downloads/camera/garage/
|
- /config/www/downloads/camera/garage/
|
||||||
- /config/www/downloads/camera/playarea/
|
- /config/www/downloads/camera/playarea/
|
||||||
- /config/www/downloads/camera/driveway/
|
- /config/www/downloads/camera/driveway/
|
||||||
- /config/www/downloads/camera/frontdoor/
|
- /config/www/downloads/camera/frontdoor/
|
||||||
- /config/www/downloads/camera/kitchen/
|
- /config/www/downloads/camera/kitchen/
|
||||||
- /config/www/downloads/camera/frontroom/
|
- /config/www/downloads/camera/frontroom/
|
||||||
- /config/www/downloads/camera/3dprinter/
|
- /config/www/downloads/camera/3d/
|
||||||
|
|
||||||
sun:
|
sun:
|
||||||
alexa:
|
alexa:
|
||||||
|
|
|
@ -82,4 +82,4 @@ cards:
|
||||||
show_header_toggle: true
|
show_header_toggle: true
|
||||||
entities:
|
entities:
|
||||||
- switch.frontyard_light
|
- switch.frontyard_light
|
||||||
- switch.wemobackyardlightswitch
|
- switch.backyard_light
|
||||||
|
|
|
@ -51,6 +51,22 @@ cards:
|
||||||
domain: script
|
domain: script
|
||||||
action: stream_patio_camera_to_chromecast
|
action: stream_patio_camera_to_chromecast
|
||||||
|
|
||||||
|
- type: "custom:button-card"
|
||||||
|
name: Porch
|
||||||
|
entity: input_label.current_stream
|
||||||
|
icon: mdi:cctv
|
||||||
|
color_type: card
|
||||||
|
style:
|
||||||
|
- font-weight: bold
|
||||||
|
- color: rgb(0, 0, 5)
|
||||||
|
state:
|
||||||
|
- value: "porch"
|
||||||
|
color: var(--primary-color)
|
||||||
|
action: service
|
||||||
|
service:
|
||||||
|
domain: script
|
||||||
|
action: stream_porch_camera_to_chromecast
|
||||||
|
|
||||||
- type: "custom:button-card"
|
- type: "custom:button-card"
|
||||||
name: Playarea
|
name: Playarea
|
||||||
entity: input_label.current_stream
|
entity: input_label.current_stream
|
||||||
|
@ -105,7 +121,7 @@ cards:
|
||||||
tap_action:
|
tap_action:
|
||||||
action: more-info
|
action: more-info
|
||||||
entities:
|
entities:
|
||||||
- switch.wemobackyardlightswitch
|
- switch.backyard_light
|
||||||
- binary_sensor.patio_camera_motion
|
- binary_sensor.patio_camera_motion
|
||||||
|
|
||||||
- type: picture-glance
|
- type: picture-glance
|
||||||
|
@ -129,7 +145,7 @@ cards:
|
||||||
tap_action:
|
tap_action:
|
||||||
action: more-info
|
action: more-info
|
||||||
entities:
|
entities:
|
||||||
- switch.wemobackyardlightswitch
|
- switch.backyard_light
|
||||||
- binary_sensor.playarea_camera_motion
|
- binary_sensor.playarea_camera_motion
|
||||||
|
|
||||||
- type: picture-glance
|
- type: picture-glance
|
||||||
|
|
|
@ -1051,7 +1051,7 @@ automation:
|
||||||
- platform: time_pattern
|
- platform: time_pattern
|
||||||
minutes: "/15"
|
minutes: "/15"
|
||||||
action:
|
action:
|
||||||
- service_template: "script.{{- ['driveway', 'patio', 'playarea'] | random -}}_cam"
|
- service_template: "script.{{- ['driveway', 'patio', 'playarea', 'porch'] | random -}}_cam"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
frontdoor_cam:
|
frontdoor_cam:
|
||||||
|
@ -1078,8 +1078,119 @@ script:
|
||||||
data_template:
|
data_template:
|
||||||
url: !secret playarea_camera_stream_url
|
url: !secret playarea_camera_stream_url
|
||||||
name: "playarea"
|
name: "playarea"
|
||||||
|
porch_cam:
|
||||||
|
sequence:
|
||||||
|
- service: script.stream2chromecast
|
||||||
|
data_template:
|
||||||
|
url: !secret porch_camera_stream_url
|
||||||
|
name: "porch"
|
||||||
|
|
||||||
reset_camera_stream:
|
reset_camera_stream:
|
||||||
alias: Reset Camera Stream
|
alias: Reset Camera Stream
|
||||||
sequence:
|
sequence:
|
||||||
- service: shell_command.reset_camera_stream
|
- service: shell_command.reset_camera_stream
|
||||||
- service_template: "script.{{- ['frontdoor', 'driveway', 'patio', 'playarea'] | random -}}_cam"
|
- service_template: "script.{{- ['frontdoor', 'driveway', 'patio', 'playarea'] | random -}}_cam"
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# On-Demand camera stream to chromecast scripts
|
||||||
|
#
|
||||||
|
stream_frontdoor_camera_to_chromecast:
|
||||||
|
sequence:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
|
||||||
|
- service: script.stream2chromecast
|
||||||
|
data_template:
|
||||||
|
url: !secret frontdoor_camera_stream_url
|
||||||
|
name: "frontyard"
|
||||||
|
|
||||||
|
stream_driveway_camera_to_chromecast:
|
||||||
|
sequence:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
|
||||||
|
- service: script.stream2chromecast
|
||||||
|
data_template:
|
||||||
|
url: !secret driveway_camera_stream_url
|
||||||
|
name: "driveway"
|
||||||
|
|
||||||
|
stream_patio_camera_to_chromecast:
|
||||||
|
sequence:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
|
||||||
|
- service: script.stream2chromecast
|
||||||
|
data_template:
|
||||||
|
url: !secret patio_camera_stream_url
|
||||||
|
name: "patio"
|
||||||
|
|
||||||
|
stream_playarea_camera_to_chromecast:
|
||||||
|
sequence:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
|
||||||
|
- service: script.stream2chromecast
|
||||||
|
data_template:
|
||||||
|
url: !secret playarea_camera_stream_url
|
||||||
|
name: "playarea"
|
||||||
|
|
||||||
|
stream_porch_camera_to_chromecast:
|
||||||
|
sequence:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
|
||||||
|
- service: script.stream2chromecast
|
||||||
|
data_template:
|
||||||
|
url: !secret porch_camera_stream_url
|
||||||
|
name: "porch"
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# _____ ____ _
|
||||||
|
# / ____| / __ \ | |
|
||||||
|
# | | __ _ _ __ ___ ___ _ __ __ _ | | | |_ _____ _ __| | __ _ _ _
|
||||||
|
# | | / _` | '_ ` _ \ / _ \ '__/ _` | | | | \ \ / / _ \ '__| |/ _` | | | |
|
||||||
|
# | |___| (_| | | | | | | __/ | | (_| | | |__| |\ V / __/ | | | (_| | |_| |
|
||||||
|
# \_____\__,_|_| |_| |_|\___|_| \__,_| \____/ \_/ \___|_| |_|\__,_|\__, |
|
||||||
|
# __/ |
|
||||||
|
# |___/
|
||||||
|
#
|
||||||
|
# Camera Text Overlay Script - sets a given text as an overlay on camera feed
|
||||||
|
###############################################################################
|
||||||
|
frontdoor_camera_text_overlay:
|
||||||
|
sequence:
|
||||||
|
- service: rest_command.set_frontdoor_camera_text_left_bottom
|
||||||
|
data_template:
|
||||||
|
message: "{{text}}"
|
||||||
|
|
||||||
|
driveway_camera_text_overlay:
|
||||||
|
sequence:
|
||||||
|
- service: rest_command.set_driveway_camera_text_left_bottom
|
||||||
|
data_template:
|
||||||
|
message: "{{text}}"
|
||||||
|
|
||||||
|
patio_camera_text_overlay:
|
||||||
|
sequence:
|
||||||
|
- service: rest_command.set_patio_camera_text_left_bottom
|
||||||
|
data_template:
|
||||||
|
message: "{{text}}"
|
||||||
|
|
||||||
|
playarea_camera_text_overlay:
|
||||||
|
sequence:
|
||||||
|
- service: rest_command.set_playarea_camera_text_left_bottom
|
||||||
|
data_template:
|
||||||
|
message: "{{text}}"
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Stream2Chromecast script streams a given URL to Chromecast
|
||||||
|
# But before it streams, it turns ON the media player if it is OFF, and after
|
||||||
|
# streaming the URL, it saves the current stream name
|
||||||
|
# BY calling media_player.turn_off, it forces Chromecast stream onto be active
|
||||||
|
# on TV as soon as it turns ON TV
|
||||||
|
stream2chromecast:
|
||||||
|
sequence:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_label.current_stream') != name }}"
|
||||||
|
- service: media_player.play_media
|
||||||
|
data_template:
|
||||||
|
entity_id: media_player.attic_tv
|
||||||
|
media_content_id: "{{ url }}"
|
||||||
|
media_content_type: "video"
|
||||||
|
- service: input_label.set_value
|
||||||
|
data_template:
|
||||||
|
entity_id: input_label.current_stream
|
||||||
|
value: "{{ name }}"
|
|
@ -108,9 +108,9 @@ automation:
|
||||||
state: "on"
|
state: "on"
|
||||||
action:
|
action:
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
entity_id: switch.frontyard
|
entity_id: switch.frontyard_light
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
entity_id: switch.backyard
|
entity_id: switch.backyard_light
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Turn OF Kitchen Lights after 3 hours of wake up time during school/work days
|
# Turn OF Kitchen Lights after 3 hours of wake up time during school/work days
|
||||||
|
@ -162,9 +162,9 @@ automation:
|
||||||
state: "on"
|
state: "on"
|
||||||
action:
|
action:
|
||||||
- service: switch.turn_on
|
- service: switch.turn_on
|
||||||
entity_id: switch.frontyard
|
entity_id: switch.frontyard_light
|
||||||
- service: switch.turn_on
|
- service: switch.turn_on
|
||||||
entity_id: switch.backyard
|
entity_id: switch.backyard_light
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Turn indoor lights on 30 minutes before sunset
|
# Turn indoor lights on 30 minutes before sunset
|
||||||
|
|
|
@ -27,7 +27,6 @@ speedtestdotnet:
|
||||||
sensor:
|
sensor:
|
||||||
- platform: uptime
|
- platform: uptime
|
||||||
name: Home Assistant Up Time
|
name: Home Assistant Up Time
|
||||||
unit_of_measurement: hours
|
|
||||||
|
|
||||||
- platform: rest
|
- platform: rest
|
||||||
resource: http://icanhazip.com
|
resource: http://icanhazip.com
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
homeassistant:
|
homeassistant:
|
||||||
customize:
|
customize:
|
||||||
switch.frontyard:
|
switch.frontyard_light:
|
||||||
icon: mdi:lightbulb
|
icon: mdi:lightbulb
|
||||||
friendly_name: Front Porch Lights
|
friendly_name: Front Porch Lights
|
||||||
emulated_hue_name: Front Yard Lights
|
emulated_hue_name: Front Yard Lights
|
||||||
|
@ -18,7 +18,7 @@ homeassistant:
|
||||||
emulated_hue_name: Wemo Outlet
|
emulated_hue_name: Wemo Outlet
|
||||||
homebridge_name: Wemo Outlet
|
homebridge_name: Wemo Outlet
|
||||||
|
|
||||||
switch.backyard:
|
switch.backyard_light:
|
||||||
icon: mdi:lightbulb
|
icon: mdi:lightbulb
|
||||||
friendly_name: Backyard Lights
|
friendly_name: Backyard Lights
|
||||||
emulated_hue_name: Backyard Lights
|
emulated_hue_name: Backyard Lights
|
||||||
|
|
|
@ -124,101 +124,6 @@ script:
|
||||||
- switch.upstairs_fragrance
|
- switch.upstairs_fragrance
|
||||||
- switch.officeroom_accent_lights
|
- switch.officeroom_accent_lights
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# _____ ____ _
|
|
||||||
# / ____| / __ \ | |
|
|
||||||
# | | __ _ _ __ ___ ___ _ __ __ _ | | | |_ _____ _ __| | __ _ _ _
|
|
||||||
# | | / _` | '_ ` _ \ / _ \ '__/ _` | | | | \ \ / / _ \ '__| |/ _` | | | |
|
|
||||||
# | |___| (_| | | | | | | __/ | | (_| | | |__| |\ V / __/ | | | (_| | |_| |
|
|
||||||
# \_____\__,_|_| |_| |_|\___|_| \__,_| \____/ \_/ \___|_| |_|\__,_|\__, |
|
|
||||||
# __/ |
|
|
||||||
# |___/
|
|
||||||
#
|
|
||||||
# Camera Text Overlay Script - sets a given text as an overlay on camera feed
|
|
||||||
###############################################################################
|
|
||||||
frontdoor_camera_text_overlay:
|
|
||||||
sequence:
|
|
||||||
- service: rest_command.set_frontdoor_camera_text_left_bottom
|
|
||||||
data_template:
|
|
||||||
message: "{{text}}"
|
|
||||||
|
|
||||||
driveway_camera_text_overlay:
|
|
||||||
sequence:
|
|
||||||
- service: rest_command.set_driveway_camera_text_left_bottom
|
|
||||||
data_template:
|
|
||||||
message: "{{text}}"
|
|
||||||
|
|
||||||
patio_camera_text_overlay:
|
|
||||||
sequence:
|
|
||||||
- service: rest_command.set_patio_camera_text_left_bottom
|
|
||||||
data_template:
|
|
||||||
message: "{{text}}"
|
|
||||||
|
|
||||||
playarea_camera_text_overlay:
|
|
||||||
sequence:
|
|
||||||
- service: rest_command.set_playarea_camera_text_left_bottom
|
|
||||||
data_template:
|
|
||||||
message: "{{text}}"
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# On-Demand camera stream to chromecast scripts
|
|
||||||
#
|
|
||||||
stream_frontdoor_camera_to_chromecast:
|
|
||||||
sequence:
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
|
|
||||||
- service: script.stream2chromecast
|
|
||||||
data_template:
|
|
||||||
url: !secret frontdoor_camera_stream_url
|
|
||||||
name: "frontyard"
|
|
||||||
|
|
||||||
stream_driveway_camera_to_chromecast:
|
|
||||||
sequence:
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
|
|
||||||
- service: script.stream2chromecast
|
|
||||||
data_template:
|
|
||||||
url: !secret driveway_camera_stream_url
|
|
||||||
name: "driveway"
|
|
||||||
|
|
||||||
stream_patio_camera_to_chromecast:
|
|
||||||
sequence:
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
|
|
||||||
- service: script.stream2chromecast
|
|
||||||
data_template:
|
|
||||||
url: !secret patio_camera_stream_url
|
|
||||||
name: "patio"
|
|
||||||
|
|
||||||
stream_playarea_camera_to_chromecast:
|
|
||||||
sequence:
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
|
|
||||||
- service: script.stream2chromecast
|
|
||||||
data_template:
|
|
||||||
url: !secret playarea_camera_stream_url
|
|
||||||
name: "playarea"
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Stream2Chromecast script streams a given URL to Chromecast
|
|
||||||
# But before it streams, it turns ON the media player if it is OFF, and after
|
|
||||||
# streaming the URL, it saves the current stream name
|
|
||||||
# BY calling media_player.turn_off, it forces Chromecast stream onto be active
|
|
||||||
# on TV as soon as it turns ON TV
|
|
||||||
stream2chromecast:
|
|
||||||
sequence:
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ states('input_label.current_stream') != name }}"
|
|
||||||
- service: media_player.play_media
|
|
||||||
data_template:
|
|
||||||
entity_id: media_player.attic_tv
|
|
||||||
media_content_id: "{{ url }}"
|
|
||||||
media_content_type: "video"
|
|
||||||
- service: input_label.set_value
|
|
||||||
data_template:
|
|
||||||
entity_id: input_label.current_stream
|
|
||||||
value: "{{ name }}"
|
|
||||||
|
|
||||||
stop_hass:
|
stop_hass:
|
||||||
sequence:
|
sequence:
|
||||||
- service: shell_command.stop_hass
|
- service: shell_command.stop_hass
|
||||||
|
|
|
@ -82,8 +82,8 @@ automation:
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.backyard
|
- switch.backyard_light
|
||||||
- switch.frontyard
|
- switch.frontyard_light
|
||||||
to: "on"
|
to: "on"
|
||||||
for:
|
for:
|
||||||
minutes: 5
|
minutes: 5
|
||||||
|
|
|
@ -242,6 +242,8 @@ automation:
|
||||||
input_boolean.super_heavy_wind_alert
|
input_boolean.super_heavy_wind_alert
|
||||||
{%- elif ( windspeed > 60 ) %}
|
{%- elif ( windspeed > 60 ) %}
|
||||||
input_boolean.hurricane_wind_alert
|
input_boolean.hurricane_wind_alert
|
||||||
|
{% else %}
|
||||||
|
input_boolean.dummy
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# #Turn off those wind speed alert booleans automatically after 15 minutes.
|
# #Turn off those wind speed alert booleans automatically after 15 minutes.
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
"switch.kids_bedroom",
|
"switch.kids_bedroom",
|
||||||
"switch.kitchen",
|
"switch.kitchen",
|
||||||
"switch.office_room",
|
"switch.office_room",
|
||||||
"switch.wemobackyardlightswitch"] %}
|
"switch.backyard_light"] %}
|
||||||
{% for item in lights_switches -%}
|
{% for item in lights_switches -%}
|
||||||
{%- if states[item.split('.')[0]][item.split('.')[1]].state == "on" -%}
|
{%- if states[item.split('.')[0]][item.split('.')[1]].state == "on" -%}
|
||||||
{%- set friendly_name = states[item.split('.')[0]][item.split('.')[1]].attributes.friendly_name -%}
|
{%- set friendly_name = states[item.split('.')[0]][item.split('.')[1]].attributes.friendly_name -%}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"switch.kids_bedroom",
|
"switch.kids_bedroom",
|
||||||
"switch.kitchen",
|
"switch.kitchen",
|
||||||
"switch.office_room",
|
"switch.office_room",
|
||||||
"switch.wemobackyardlightswitch"] %}
|
"switch.backyard_light"] %}
|
||||||
{%- for item in lights_switches -%}
|
{%- for item in lights_switches -%}
|
||||||
{%- if states[item.split('.')[0]][item.split('.')[1]].state == "on" -%}
|
{%- if states[item.split('.')[0]][item.split('.')[1]].state == "on" -%}
|
||||||
{%- set friendly_name = states[item.split('.')[0]][item.split('.')[1]].attributes.friendly_name %}
|
{%- set friendly_name = states[item.split('.')[0]][item.split('.')[1]].attributes.friendly_name %}
|
||||||
|
|
Loading…
Reference in New Issue