akasma74 / Hass-Custom-Alarm

It is a fork of "Yet another take on a home assistant custom alarm" that will exist until its author is back to our Earth
80 stars 31 forks source link

Alarm triggered only on specific state change for each entity #69

Closed matgad closed 4 years ago

matgad commented 4 years ago

Is your feature request related to a problem? Please describe. Currently the alarm is triggered for every supported state change and for all the entities in the delayed or immediate lists. It would be really helpful to be able to trigger the alarm only for specific state change for certain entities. For example, I have a motion sensor with "on" and "off" states, and it triggers the alarm for both state changes. I've tried several configurations but I wasn't able to avoid the trigger for the on -> off transition.

Describe the solution you'd like A good solution could be to add specific state transitions for each sensor in the sensor list section of the config file. CURRENT CONFIGURATION (bwalarm.yaml): [...] armed_home: immediate:

PROPOSED CONFIGURATION (bwalarm.yaml): [...] armed_home: immediate:

This solution will also make the custom_supported_statuses_on/off parameters unnecessary, and will provide a more granular control over specific state changes.

Describe alternatives you've considered It seems not possible to implement this behavior in bwalarm at the moment (or maybe I'm wrong). The only solution is to implement an AppDaemon automation on top of the manual alarm component of HA.

akasma74 commented 4 years ago

First of all, it would be nice to see a relevant part of your config for this integration (from bwalarm.yaml). Second, I doubt the integration reacts to both off->on and on->off sensors' state changes so I need some real evidence.

I don't quite get what you call "this behaviour" and how it can be implemented. Let's discuss it further.

akasma74 commented 4 years ago

I'm closing this issue because of no response. Feel free to open a new one.