I'm finally exploring HSM and getting leak sensors set up. I'm using a Zigbee button to cancel any repeating alerts that might go off while I am home. This is working fine.
What I would like to do, for fun, is have the Cancel Alert button on the fridge make the system say something funny if it's pressed while the system is not in an alert state. ("Please do not touch this important button. Thank you.")
In RM, I can test for a water leak state in Conditions, but I can't negate the test, to set up the button playing a sound when there is not a leak alert to cancel.
Indeed, though it is a simplification with a cost. I have set my leak sensor in HSM to sound a persistent alarm if it gets wet, even if it then becomes dry. In that scenario HSM would be in an alert state and pressing the button would cancel the alert AND say "please don't touch the button."
OK, that is not a big deal--none of this is a big deal--but I am curious now about how to do it.
In Triggers, here's what is offered for HSM Alerts.
So there is the problem: we have access to HSM Status in Conditions, but the statuses all have to do with arming, not alerts. Developers hate it when product guys say this, but it seems like it would be relatively easy for the team to add the HSM Alerts to Conditions, as they are in Triggers.
I did not think about using the button itself as the trigger, I was fixated on the system state, but it's obvious now. Probably you are right and testing for wetness is the best way forward with the tools at hand.
Understand everything is essentially a subset of rule machine and HSM is a very small subset. Some things like that you would be better off with either button controller or button controller/Rule Machine.
I'm not sure if this would directly solve your issue, but I've set up two hub variables that store the last status and last alert from HSM so I can refer to them in rule machine.
I use the hsm_last_alert hub variable in a couple of rules. In one case, I play an alert sound over my speakers when HSM reports 'intrusion - delay'. I loop/repeat the sound while the hsm_last_alert variable contains the word 'delay'. That way the loop ends when the pending alert is either canceled (hsm_last_alert="cancel") or the delay ends (hsm_last_alert="intrusion")
I also use it as a required expression in some rules that I don't want to run while HSM is in an alert status like this:
You could modify that to have a rule and hub variable that only stores the water alerts and cancel status if you're only interested in the leak sensors.