# Get a warning when binary\_sensor is unavailable

**URL:** <https://discourse.nodered.org/t/get-a-warning-when-binary-sensor-is-unavailable/44674>\
**Category:** General\
**Created:** [24 April 2021 21:44 UTC](https://discourse.nodered.org/t/get-a-warning-when-binary-sensor-is-unavailable/44674 "2021-04-24T21:44:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![neoyang](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/neoyang/32/35846_2.png) [@neoyang](https://discourse.nodered.org/u/neoyang)\
**Post date:** [24 April 2021 21:44 UTC](https://discourse.nodered.org/t/get-a-warning-when-binary-sensor-is-unavailable/44674/1 "2021-04-24T21:44:12Z")

</div>

I am working on get a warning when any one of the binary\_sensors becomes unavailable.  
my code is as below, my question is that I can get a warning but I am not able to show which sensors they are?

```auto
[{"id":"525511a0.bb89b","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"8fdbcc12.5bab1","type":"server-state-changed","z":"525511a0.bb89b","name":"","server":"a569b9ca.7bfcc8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"^binary_sensor\\..*","entityidfiltertype":"regex","outputinitially":false,"state_type":"str","haltifstate":"unavailable","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"10","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":180,"y":180,"wires":[["17bb3395.53464c"],[]],"info":"^sensor\\..*battery_level"},{"id":"17bb3395.53464c","type":"api-call-service","z":"525511a0.bb89b","name":"Send push","server":"a569b9ca.7bfcc8","version":1,"debugenabled":false,"service_domain":"notify","service":"persistent_notification","entityId":"","data":"{\"message\":\"{{payload.results[0].formatted}}The garage door\",\"title\":\"binary_sensor{{msg.payload}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":570,"y":200,"wires":[[]]},{"id":"a569b9ca.7bfcc8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [25 April 2021 09:15 UTC](https://discourse.nodered.org/t/get-a-warning-when-binary-sensor-is-unavailable/44674/2 "2021-04-25T09:15:12Z")

</div>

You might want to ask this on the home automation forum.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 June 2021 09:15 UTC](https://discourse.nodered.org/t/get-a-warning-when-binary-sensor-is-unavailable/44674/3 "2021-06-24T09:15:57Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
