Improved method for detecting last Alexa device
This commit is contained in:
Submodule node-red/projects/NerdFlows updated: fce1603353...52e6913c0e
@ -126,7 +126,7 @@ automation:
|
|||||||
- service: script.kallen_desktop_wake
|
- service: script.kallen_desktop_wake
|
||||||
- service: script.status_annc
|
- service: script.status_annc
|
||||||
data:
|
data:
|
||||||
who: "{{ states('sensor.last_alexa') }}"
|
who: "{{ states('sensor.last_alexa_entity_id') }}"
|
||||||
call_confirmation: 1
|
call_confirmation: 1
|
||||||
- if:
|
- if:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
@ -134,7 +134,7 @@ automation:
|
|||||||
then:
|
then:
|
||||||
- service: script.status_annc
|
- service: script.status_annc
|
||||||
data:
|
data:
|
||||||
who: "{{ states('sensor.last_alexa') }}"
|
who: "{{ states('sensor.last_alexa_entity_id') }}"
|
||||||
call_confirm_no: 1
|
call_confirm_no: 1
|
||||||
|
|
||||||
- id: d1edfcf7-2712-49f4-b8f1-17f5b184b5ce
|
- id: d1edfcf7-2712-49f4-b8f1-17f5b184b5ce
|
||||||
@ -168,7 +168,7 @@ automation:
|
|||||||
then:
|
then:
|
||||||
- service: script.status_annc
|
- service: script.status_annc
|
||||||
data:
|
data:
|
||||||
who: "{{ states('sensor.last_alexa') }}"
|
who: "{{ states('sensor.last_alexa_entity_id') }}"
|
||||||
call_security_not_armed: 1
|
call_security_not_armed: 1
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
@ -167,22 +167,3 @@ mqtt:
|
|||||||
sensor:
|
sensor:
|
||||||
- name: "Room Presence"
|
- name: "Room Presence"
|
||||||
state_topic: "house/presence/current_room"
|
state_topic: "house/presence/current_room"
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
sensors:
|
|
||||||
alexa_audio:
|
|
||||||
friendly_name: "Alexa Audio"
|
|
||||||
value_template: >-
|
|
||||||
{%- if is_state('sensor.last_alexa', 'media_player.living_room_echo_dot') %}
|
|
||||||
Living Room Echo Dot
|
|
||||||
{% elif is_state('sensor.last_alexa', 'media_player.basement_echo_dot') %}
|
|
||||||
Basement Echo Dot
|
|
||||||
{% elif is_state('sensor.last_alexa', 'media_player.master_bedroom_echo_dot') %}
|
|
||||||
Master Bedroom Echo Dot
|
|
||||||
{% else %}
|
|
||||||
Living Room Echo Dot
|
|
||||||
{%- endif %}
|
|
||||||
last_alexa:
|
|
||||||
value_template: >
|
|
||||||
{{ states.media_player | selectattr('attributes.last_called','eq',True) | map(attribute='entity_id') | first }}
|
|
@ -27,7 +27,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- service: script.status_annc
|
- service: script.status_annc
|
||||||
data:
|
data:
|
||||||
who: "{{ states('sensor.last_alexa')}}"
|
who: "{{ states('sensor.last_alexa_entity_id')}}"
|
||||||
call_confirmation: 1
|
call_confirmation: 1
|
||||||
|
|
||||||
google_interjection:
|
google_interjection:
|
||||||
|
@ -1731,7 +1731,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- service: script.speech_engine_simplified
|
- service: script.speech_engine_simplified
|
||||||
data:
|
data:
|
||||||
who: '{{ states(''sensor.last_alexa'') }}'
|
who: '{{ states(''sensor.last_alexa_entity_id'') }}'
|
||||||
message: >
|
message: >
|
||||||
At {{ states('sensor.jarvis_last_msg_time') }}
|
At {{ states('sensor.jarvis_last_msg_time') }}
|
||||||
in the {{ states('sensor.jarvis_last_location') }}
|
in the {{ states('sensor.jarvis_last_location') }}
|
||||||
|
@ -42,7 +42,7 @@ give_me_darkness:
|
|||||||
text: <voice name='Brian'><prosody rate='150%'>Would you like me to arm
|
text: <voice name='Brian'><prosody rate='150%'>Would you like me to arm
|
||||||
the security system?</prosody></voice>
|
the security system?</prosody></voice>
|
||||||
event_id: actionable_notification_night_security_arm
|
event_id: actionable_notification_night_security_arm
|
||||||
alexa_device: '{{ states(''sensor.last_alexa'') }}'
|
alexa_device: '{{ states(''sensor.last_alexa_entity_id'') }}'
|
||||||
alias: Ask to arm security
|
alias: Ask to arm security
|
||||||
alias: Ask to arm security if both adults are home
|
alias: Ask to arm security if both adults are home
|
||||||
alias: If guest mode is off
|
alias: If guest mode is off
|
||||||
|
Reference in New Issue
Block a user