# Array of door sensors -\> filter -\> notif i any open by name

**URL:** <https://community.homey.app/t/array-of-door-sensors-filter-notif-i-any-open-by-name/53754>\
**Category:** Questions & Help\
**Tags:** app, tools, flow\
**Created:** [October 26, 2021, 12:07pm UTC](https://community.homey.app/t/array-of-door-sensors-filter-notif-i-any-open-by-name/53754 "2021-10-26T12:07:11Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 26, 2021, 5:00pm UTC](https://community.homey.app/t/array-of-door-sensors-filter-notif-i-any-open-by-name/53754/11 "2021-10-26T17:00:15Z")

</div>

I think this can be of use (in Dutch though):

Flow:

Action card with HomeyScript tag:

> ![Screenshot_20211026-190150_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/6/7626252f4fed8d392beef600395be42154795d9f.jpeg)

Result:

> ![Screenshot_20211026-185245_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/5/a5c8beeb59d64fccbefefab2bad6816b93f8dc18.jpeg)

Script:

> [@"flow" is uitgeschakeld omdat deze Flow te vaak werd uitgevoerd](https://community.homey.app/t/flow-is-uitgeschakeld-omdat-deze-flow-te-vaak-werd-uitgevoerd/48884/10):
>
> ```auto
> // script deur_raam-nog_open.js
> //
> let devices = await Homey.devices.getDevices();
> let windowText = "";
> let currentText = "";
> let logText = "";
> let windowOpen = false;
> _.some(devices, device => 
> {
> if(device.class == 'sensor')
> {
> if( device.capabilitiesObj &&
> device.capabilitiesObj.alarm_contact &&
> device.capabilitiesObj.alarm_contact.value )
> {
> currentText = "";
> // Vul hier al je contact sensors in, device.name == "Exacte sensornaam"
> // currenText = "Sensornaam"
> if( device.name == "Deur Trap")
> currentText = "Deur trap";
> if( device.name == "Deur Badkamer")
> currentText = "Deur badkamer";
> if( device.name == "Raam Slaapkamer")
> currentText = "Raam slaapkamer";
> if( device.name == "Deur Koelkast")
> currentText = "Deur koelkast";
> if(currentText != ""){
> windowOpen = true;
> if(windowText=="")
> windowText = currentText;
> else
> windowText = windowText + ", " + currentText;
> }
> }
> }
> });
> if(windowOpen == true)
> windowText = "De volgende deuren of ramen staan nog open: " + windowText;
> else
> windowText = "Alle deuren en ramen zijn dicht";
> // console.log(windowText);
> await tag("door_windowText", windowText );
> return windowOpen;
> 
> ```

---

_[View the full topic](https://community.homey.app/t/array-of-door-sensors-filter-notif-i-any-open-by-name/53754)._
