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

Warning then immediate should trigger the alarm #38

Closed golfvert closed 4 years ago

golfvert commented 4 years ago

There is a behaviour I find a bit strange. Say, I have two sensors:

Sensor1 with Immediate - so as soon as Sensor1 is triggered the alarm goes on Sensor2 with delayed - so it waits warning time to trigger the alarm In the following scenario:

Alarm is in Away mode Sensor2 is on - the alarm goes in warning Before the end of the warning time Sensor1 is on In my opinion, in this case, the alarm should goes on immediately as Sensor1 is “immediate”. However, at the moment the alarm stays in warning state and is only triggered (if not disarmed) at the end of the warning time, despite Sensor1 being on.

Is there something that I missed? Is this the expected behaviour?

akasma74 commented 4 years ago

Well, currently it is designed that the integration changes its state from ARM_XXX to WARNING or TRIGGERED (depending on a sensor's group) and ignores all subsequent active sensors, that's why you see what you described.

I do agree that the situation you described can happen and it's reasonable to expect a different behaviour.

It should be fairly easy to fix and I hope to get it done as soon as I'm back to my HA, most likely in September ;)