Comments (6)
Ok. In that case, you can close this FR.
For whoever's interested, this is the script I use to ring a siren + announce which sensor triggered the alarm:
alias: Alarm Siren
sequence:
- service: media_player.play_media
data:
media_content_type: sound
media_content_id: amzn_sfx_scifi_alarm_04
entity_id: media_player.echo_downstairs
entity_id: media_player.echo_downstairs
- service: notify.alexa_media_downstairs
data:
title: Intruder Alert!
message: >
Intruder Alert!
{% for open_sensor in state_attr("alarm_control_panel.alarmo", "open_sensors").keys() |list %}
at {{ state_attr(open_sensor, 'friendly_name') }}
{% endfor %}
data:
method: all
type: announce
target:
- media_player.echo_downstairs
mode: single
(it kinda assumes that usually, only 1 sensor will trigger the alarm. In the case of 2 sensors it will say 'Intruder alert at sensor 1 at sensor 2')
from alarmo.
If you want to create a script, then you can also get the friendly name from the entity properties.
I mean states('binary_sensor.my_sensor')
will give you all info of the sensor.
Why do you think such properties should be published by Alarmo?
from alarmo.
I think the reporting of {{open_sensors}} as a friendly-name array would allow the creation of more powerful scripts than what is currently possible in the Alarmo -> Actions page.
My use case is:
On alarm trigger -> script to play siren on smart speakers + then announce which sensor triggered the alarm.
The script works very well but doesn't have easy access to the friendly name of the sensor that triggered the alarm.
A workaround for me is to create a template sensor that translates the {{open_sensors}} array into the friendly names but it's not very elegant.
When I try to copy-paste my working script into the Alarmo -> Actions -> yaml editor, I cannot save because it's triggering some errors.
from alarmo.
IMO only the entity_id + state is relevant info for the trigger event.
You can easily get all the details you want about the sensors by requesting the state of the entity.
Please check out here: https://www.home-assistant.io/docs/configuration/templating/#states-examples
I'd rather put effort into improving the editor such that it will work with your smart speaker without external scripts.
from alarmo.
Just to add: Love your custom component! Don't let feature requests etc be anything else than a compliment for the already existing features! Keep up the great work
from alarmo.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days
from alarmo.
Related Issues (20)
- Can't modify sensor group HOT 5
- mqtt does not work HOT 2
- DISARMED Output in alarmo/event MQTT HOT 2
- [Feature Request] Support for Duress Code HOT 3
- Breaking changes in HA 2024.1 beta HOT 1
- Group of sensor - access the group's state HOT 1
- Add new Sensors group state - Direction HOT 2
- Alarmo card - display list of currently triggered sensors HOT 2
- Sensor groups a duplicate sensor in the alarmo.storage file causing bugs HOT 7
- FORMAT_NUMBER was used from alarmo, this is a deprecated constant which will be removed in HA Core 2025.1. Use CodeFormat.NUMBER instead HOT 4
- Mysa thermostat control when arming and disarming HOT 1
- Missing permanent activated sabotage alarm function HOT 2
- FORMAT_NUMBER was used from alarmo, this is a deprecated constant which will be removed in HA Core 2025.1.
- access with 30-second delay only on some sensors HOT 4
- Error in log with latest hass docker beta HOT 2
- Area field for notifications cannot be left empty HOT 1
- YAML code not saved in Notification's task under Actions
- FORMAT_NUMBER deprecation in HA Core 2025.1 HOT 2
- Related Scripts Not Listed in Integration Page HOT 1
- Alarmo Homekit won't set HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alarmo.