I am trying to create an automation where notification is sent when the alarm is tripped. In the notification, I want to include which entity triggers the alarm. Referring to Automation Templating, this is what I put in my automation…
- alias: 'Alarm tripped'
trigger:
- platform: state
entity_id: sensor.frontdoor
state: 'Open'
- platform: state
entity_id: sensor.entrancemotion
state: 'Active'
condition:
- condition: state
entity_id: alarm_control_panel.zone_a
state: armed_away
action:
service: notify.notify
data:
message: "Alarm tripped at {{ trigger.entity_id }}"
title: ""
But it is not working. Can anyone tell me what is the correct way to use {{ trigger.entity_id }} ? Thanks.
Do you care to elaborate on this? I am currently working on alexa integration myself. Althogh I have to do the “Alexa” device myself as well, as it’s not available in Germany right now. But it’s always good to hear what others are doing to get some ideas
I have an intent set up to activate scenes and another to check on the status of the front door lock.
What I’d like to do is set the manual alarm in HA, but have Alexa tell me if one or more of my sensors are currently on and if so, which ones. If all sensors are reported off, then Alexa should set the alarm in away mode and tell me I have XX amount of seconds before it’s armed.
I’m kind of hoping some of the answers I got from @aimc as well as your new piece of info will let me do this. Even just querying the state of all the sensors and returning the names of the ones that are on would be good enough for me.
What you trying to do should be perfectly doable. If you need any help with your setup I’d be glad to help you out. What maybe does help you is making a template sensor called something like “alexa_response”
You can just call a script in your intent set the state of the “sensor.alexa_response” to what you want alexa to say after the script and add that to your alexa like this
That’s how I implemented my custom kodi commands which rely on an external python script. (For playing latest episode of x or playing season y episode z of x)
The Alexa voice service is available here, at least the developer console is.
And I already have a RaspberryPi set up using the AlexaPi github repo and even added voice activation over in my fork/branch https://github.com/PhyberApex/AlexaPi/tree/voice-activated for anyone wondering.
I’m doing like 4 things at once so I think I need to re-read this post when I am in dev mode.
I’m trying to clean house and get things sorted for a new couch being delivered and at the same time struggling with an Aeotec Multisensor 6 and trying to get it set up proper for HA. I probably should take a break…
But I’m going to come back to this - and I wanted to take the time to thank you for your guidance and your offer of help. Cheers!
Dredging up an old topic! But could you clarify how you’re setting the state of a sensor? I was under the impression that they were read-only. Or are you using a command-line sensor and manipulating things that way? I’d love to find a way to store small bits of text.
wow…geezus I just now have seen that I did not answer that. Really sorry! I set the state of this sensor over the REST API from a python script. I think there really should be a way to write sensor data within HA tho.