Modifications to make sure we are not sending too many calls to Amazon #955

This commit is contained in:
ccostan 2020-12-19 21:57:47 -05:00
parent 63712a9b67
commit 70932718bd
2 changed files with 31 additions and 25 deletions

View File

@ -10,12 +10,13 @@
###################################################################### ######################################################################
## Show Camera on Echo Shows for 20 minutes after garage door opens. ## Show Camera on Echo Shows for 20 minutes after garage door opens.
## Show Image based on where Home Assistant thinks we are.
###################################################################### ######################################################################
automation: automation:
- alias: 'Garage Camera on Alexa Shows' - alias: 'Garage Camera on Alexa Shows'
id: 4373df2a-77f2-4e19-be7c-46c7b27ca583 id: 4373df2a-77f2-4e19-be7c-46c7b27ca583
mode: restart mode: single
trigger: trigger:
- platform: state - platform: state
entity_id: entity_id:
@ -30,14 +31,8 @@ automation:
to: 'on' to: 'on'
action: action:
- service: media_player.play_media
data:
entity_id: media_player.kitchen_show
media_content_id: 'show garage camera'
media_content_type: custom
- choose: - choose:
- conditions: "{{ binary_sensor.sleepnumber_carlo_stacey_is_in_bed == 'on' }}" - conditions: "{{ is_state('binary_sensor.sleepnumber_carlo_stacey_is_in_bed','on') }}"
sequence: sequence:
- service: media_player.play_media - service: media_player.play_media
data: data:
@ -45,22 +40,33 @@ automation:
- media_player.stacey_bedroom - media_player.stacey_bedroom
media_content_id: 'show garage camera' media_content_id: 'show garage camera'
media_content_type: custom media_content_type: custom
- delay: '00:10:00'
- service: media_player.play_media
data:
entity_id:
- media_player.stacey_bedroom
media_content_id: 'hide garage camera'
media_content_type: custom
- conditions: "{{ is_state('switch.kitchen_accent_1','on') }}"
sequence:
- service: media_player.play_media
data:
entity_id:
- media_player.alarm_panel_1
media_content_id: 'show garage camera'
media_content_type: custom
default: default:
- service: media_player.play_media - service: media_player.play_media
data: data:
entity_id: media_player.alarm_panel_1 entity_id: media_player.kitchen_show
media_content_id: 'show garage camera' media_content_id: 'show garage camera'
media_content_type: custom media_content_type: custom
- delay: '00:20:00'
- delay: '00:20:00' - service: media_player.play_media
data:
- service: media_player.play_media entity_id:
data: - media_player.stacey_bedroom
entity_id: media_content_id: 'hide garage camera'
- media_player.kitchen_show media_content_type: custom
- media_player.upstairs
- media_player.stacey_bedroom
- media_player.alarm_panel_1
media_content_id: 'hide garage camera'
media_content_type: custom

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB