# Home Assistant "Get Entities" node - how to use?

**URL:** https://discourse.nodered.org/t/home-assistant-get-entities-node-how-to-use/34737
**Category:** General
**Created:** [24 October 2020 07:05 UTC](https://discourse.nodered.org/t/home-assistant-get-entities-node-how-to-use/34737 "2020-10-24T07:05:12Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)
#### Post date: [24 October 2020 07:05 UTC](https://discourse.nodered.org/t/home-assistant-get-entities-node-how-to-use/34737/1 "2020-10-24T07:05:12Z")

</div>

Node Red v1.2.2  
HA core v.0.116.4

No error codes, but the resulting payload isn't what I expect.  
I'm trying to get any, all and/or one specific entity attribute(s) from HA into NR. But no matter what I do, I only and always get just one and the same entity every time (or nothing at all).  
Here's my simple test flow:

```auto
[{"id":"978536f.8a4cbc8","type":"ha-get-entities","z":"3abd6ec5.999042","server":"15c5ca8b.7ac0c5","name":"","rules":[{"property":"","logic":"jsonata","value":"$entity().attributes.\"battery_level\" < 65","valueType":"jsonata"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":390,"y":400,"wires":[["ea71d5b3.f56138"]]},{"id":"ea71d5b3.f56138","type":"debug","z":"3abd6ec5.999042","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":610,"y":400,"wires":[]},{"id":"eca79e1f.702b5","type":"inject","z":"3abd6ec5.999042","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":220,"y":400,"wires":[["978536f.8a4cbc8"]]},{"id":"15c5ca8b.7ac0c5","type":"server","name":"Home Assistant","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

```

Here's the output I get:

```auto
[{"entity_id":"device_tracker.iphone_se","state":"not_home","attributes":{"source_type":"gps","battery_level":40,"latitude":59.91209446294224,"longitude":10.75046873679876,"gps_accuracy":65,"altitude":28.114791870117188,"vertical_accuracy":10,"friendly_name":"iPhone-SE"},"last_changed":"2020-10-22T14:52:53.192988+00:00","last_updated":"2020-10-22T14:52:53.192988+00:00","context":{"id":"43407d71147611eb8c74130d49cd53f5","parent_id":null,"user_id":null},"timeSinceChangedMs":144453187}]

```

I know I have several other sensors with batteries, plus 3 additional cell pones also with the "battery\_level" attribute, but this is the only one I get. Always. I've even tried to rename this entity in HA, assuming that it was the first hit in some alphabetical order, but to no avail.

How do I get hold of any/all/some of my other entities?  
Preferably, I would like to get an array with all of them, that I could work on.  
Please help, anyone?

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [25 October 2020 06:50 UTC](https://discourse.nodered.org/t/home-assistant-get-entities-node-how-to-use/34737/2 "2020-10-25T06:50:09Z")

</div>

The HA nodes are not a standard node, so most people on this form do not use it, Your question is best asked on the HA forum. Or maybe someone here may be using it, and may offer some advice.

---

<div class="post-metadata">

### Author: ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)
#### Post date: [25 October 2020 11:43 UTC](https://discourse.nodered.org/t/home-assistant-get-entities-node-how-to-use/34737/3 "2020-10-25T11:43:44Z")

</div>

@E1cid what forum do you mean ? Do you have a link ?

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [25 October 2020 11:46 UTC](https://discourse.nodered.org/t/home-assistant-get-entities-node-how-to-use/34737/4 "2020-10-25T11:46:14Z")

</div>

> **[Node-RED](https://community.home-assistant.io/c/third-party/node-red)**
>
> The place for Node-RED integrations.

---

<div class="post-metadata">

### Author: ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)
#### Post date: [25 October 2020 12:03 UTC](https://discourse.nodered.org/t/home-assistant-get-entities-node-how-to-use/34737/5 "2020-10-25T12:03:49Z")

</div>

Thank you. I have posted it there as well now.  
But I still hope someone smart stops by here too and perhaps knows the answer to my problem 🙂

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [25 October 2020 12:10 UTC](https://discourse.nodered.org/t/home-assistant-get-entities-node-how-to-use/34737/6 "2020-10-25T12:10:23Z")

</div>

> [@oywino](#):
>
> I still hope someone smart stops by here too

There are lots of smart people here, but not using HA they would be guessing at the answer. Let us know the answer if you get one on other 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 December 2020 12:10 UTC](https://discourse.nodered.org/t/home-assistant-get-entities-node-how-to-use/34737/7 "2020-12-24T12:10:29Z")

</div>

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