I have several aqara sensors around the house and would like to have a flow to be notified that when it rains to get a notification on Google home (audio) and on the phone which states which doors and windows are open.
Please don’t get me wrong but you are asking others to do the brainwork for you in advance.
I suggest now that you are able to define your requirements and you know which devices you would like to use, you should develop the basic framework from initial flow ideas and ask specific questions about the problems where you are stuck.
Break the requirement down into individual problems:
which kind of rain detection?
how to accumulate open aqara sensors? → Here I can give you a solution based on homeyscript.
sending them to Google home as an audio announcement
sending them as a phone notification
For each of these problems you will already find a solution in this forum.
What I’m struggling with is how to report all sensors with “contact alarm on”.
The only way I see it, would be to create several flows. Though that seems like the long way and I wondered if there was an easier way to get the status from all Aqara’s sensors? Right now I have 15 sensors.
I created a HomeyScript for checking open windows.
You could do something like this in a flow started with a rain sensor.
As rain sensor I use a rain sensor board with a aqara window sensor (cables attached at the reed sensor and connected to the rain board.
Here is an example for a script (sorry, only german )
If you want to check each window sensor individual, you will need a flow for each sensor.
I finally sat down and looked at your script. Thanks a lot! At first I was a bit resistant to the idea as I thought since I’m not a dev, I would spend an obscene amount of time trying to decipher your hieroglyphics! Glad I was wrong and thanks again for sharing this script.
I will share my version of your script below in case it helps anyone else who is looking for a similar solution:
The variables are created and filled by the script already.
First, make sure to run the script minimal 1 time in HomeyScript editor, so the variables are getting created and become available and findable from the flow editor.
You can simply run the script from a AND card (go to Homeyscript in the list, and then select the script), and as action, create a notification card and select the variable [windowText], which is grouped under “Homeyscript”.