# Help: current state-node - unspecified entity (hass.io)

**URL:** https://discourse.nodered.org/t/help-current-state-node-unspecified-entity-hass-io/8008
**Category:** General
**Created:** [15 February 2019 12:59 UTC](https://discourse.nodered.org/t/help-current-state-node-unspecified-entity-hass-io/8008 "2019-02-15T12:59:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![folrewef](https://avatars.discourse-cdn.com/v4/letter/f/e47774/32.png) [@folrewef](https://discourse.nodered.org/u/folrewef)
#### Post date: [15 February 2019 12:59 UTC](https://discourse.nodered.org/t/help-current-state-node-unspecified-entity-hass-io/8008/1 "2019-02-15T12:59:12Z")

</div>

Hi,

I use node-red (add-on) with [hass.io](http://hass.io). I am truly a beginner so excuse me if I am asking for something that is trivial or for something that has already been solved. I have not been able to fins it.

I want notifications when entity become unavailable. However, sometimes they are unavailable for a very short time and then I do not need to be notified.

I check this with my mediaplayers (sonos).

My flow start with an events: all-node. I first verify that the state of the object has actually changed using an rbe-node. I then check that the state-change refers to a media-player (using a switch-node).  
I the check that the new\_state is unavailable. If so a notification is sent to me.

Now I would like to delay the message one minute and only send a notification if the state remains unavailable.

I have four different sonos players why I do not know which player that is unavailable unless I check the entity\_id in the message.

It seems logical to first insert a wait-node that waits one minute (no other conditions) and then to use a current-state node to verify that it is still unavailable. This poses a problems as I like the idea of not messing up the flow by having different nodes for each entity. Also if I add a new sonos unit I have to amend my flow unless I can solve this problem.

I do not know how to tell the current-state node which entity to check unless I first insert a switch node that checks the entity and then send it on to different current state-nodes depending on which sonos player is unavailable.

I would simply like to refer to the entity in the previous payload (msg.payload.entity\_id) and have the current state-node check if the state is still unavailable. Is this possible?
