i have recently made an automation to notify al the alexas around the house if there is motion at the front door but i am wondering if its possible to make a card so if need be i can unselect specific devices from being notified? i am very new to coding so i have no idea how to do it if its possible
maybe something like a device button selection card so all devices that are selected will be notified?
would enabling that do not disturb affect anything else with the alexa devices though? also i do prefer tts as it doesn’t include the dong sounds at the beginning of the messages
As far as I could experience: no. But if you don’t like the announce dong, one approach would be to create input booleans corresponding to the object_id of your Alexa mediaplayers:
input_boolean.bri
input_boolean.living_room
…
and so on. After that, replace your automation action with:
The code above checks if any of your corresponding input bools are turned on. If so, the domain gets replaced with media_player to get the list of target players. The if-statement ensures that a notification is always played if you forget to activate the UI buttons.
thanks a lot i gave this a shot straight up copy and pasting as i am quite clueless on how to code haha but i have gotten an error back in return any help?
In your last post the code begins at line 1 of the editor, this cannot be right. Compare with your original automation code. May code example goes in the action part.
thanks a lot im stupid i got this down now except no messages are being sent to the alexa devices? when run manually through the script nothing happens?
alias: New Automation motion dec 2
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.front_door_camera_person
from: "off"
to: "on"
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- service: notify.alexa_media
data:
message: blabla
target: >
{% set players =
[
'input_boolean.bri',
'input_boolean.craig_s_echo_show',
]
|select('is_state', 'on')
|list |replace('input_boolean', 'media_player') %}
{{ players if players != '[]' else
'media_player.your_fallback_alexa_mediaplayer' }}
mode: single
also from the looks of it whenever you talk to alexa it automatically disables do not disturb?
The automation works flawless here. Are the booleans activated?
Go to your automation, hit the 3 vertical dots top right, choose „traces“ and look into traces steps one by one. What is it telling?
I assume, no input boolean was activated because according to the trace protocol the target mediaplayer is the example fallback one. No offense but you really should take a look into the code and not only copy and paste. It’s on you to define an existing fallback mediaplayer.
no yea i totally get it now thats on me for overlooking it hahah unfortunately trying to run it is only running the fallback player so i think i might have to give up on it considering I’m not great at this stuff and have no knowledge on getting it to work thanks so much for the help though
this is what i have gotten from the template and i am doing this through the alexa media player component, like i said the ffallback media plays fine but any boolian target doesnt play