Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announce Sensor that Triggered Alarm #15

Open
andjones132 opened this issue Oct 16, 2022 · 0 comments
Open

Announce Sensor that Triggered Alarm #15

andjones132 opened this issue Oct 16, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@andjones132
Copy link

Announce Sensor that Triggered Alarm

Is your feature request related to a problem? No

If so, then add a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution/feature you'd like

When the Alarm is triggered, announce what sensor triggered the alarm. This can be more helpful in the middle of the night than just a loud noise. Plus in the case that someone does break it would be rather disturbing that the system announces the location intruder based on what sensor was triggered.

As an example, I currently have my alarm Konnected system set up in NR and a function that derives the announcement that will be sent to all my google home speakers based on the event that triggered the alarm. It would be nice if this AD addin could do something similar. I have been thinking about tackling this myself, but my AD coding skills are not on par with yours. For example, I have yet to understand how to use async and await functions effectively, but see you use them quite extensively. I assume this is to basically setup a separate "thread" for each entity. Anyway, I thought I would make the suggestion here in case you would be willing to do the changes necessary to get it working as described.

var ghmsgPending='A-Pending-Alarm-has-been-triggered-by-the-' + msg.sensorName + '.';
var ghmsgTriggered='The-Security-Alarm-has-been-triggered-by-the-' + msg.sensorName + '.';
var ghmsgDisarmed='The-Security-Alarm-has-been-Disarmed.';

flow.set('textMessage', null);
var textMessage
if (msg.payload == 'pending') {
	textMessage = ghmsgPending;
    } 
if (msg.payload == 'triggered') {
	textMessage = ghmsgTriggered;
    } 
if (msg.payload == 'disarmed'){
	textMessage = ghmsgDisarmed;
    }


flow.set('textMessage', textMessage);
msg.textMessage=flow.get('textMessage');
return msg;

Describe alternatives you've considered

Node-Red

A clear and concise description of any alternative solutions or features you've considered.

Node-Red Flows, but I would prefer migrating this to AD so that I could have test cases that I could run after each HA update just to make sure nothing is broken by the latest release. I recently discovered that my alarm hadn't been working since May when apparently there was some breaking change related to tts.google_say.

Additional context

Add any other context or screenshots about the feature request here.

@andjones132 andjones132 added the enhancement New feature or request label Oct 16, 2022
@andjones132 andjones132 changed the title [FEATURE REQUEST] Announce Sensor that Triggered Alarm [FEATURE REQUEST] Oct 17, 2022
@andjones132 andjones132 changed the title Announce Sensor that Triggered Alarm [FEATURE REQUEST] Announce Sensor that Triggered Alarm Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants