# Get Attributes of a given entity

**URL:** <https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395>\
**Category:** General\
**Created:** [28 January 2022 10:24 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395 "2022-01-28T10:24:12Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 January 2022 21:34 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/21 "2022-01-28T21:34:27Z")

</div>

That's what I was working towards. 🙂

You might also want to set the MQTT output to 'attribute\_and\_json' so that you get individual sensor data as well as the combined object. See down the bottom of [MQTT | Zigbee2MQTT](https://www.zigbee2mqtt.io/guide/configuration/mqtt.html#mqtt-behaviour)

If you install MQTTExplorer on your PC and connect to the MQTT broker then you can easily see all the topics that your device publishes to.

I recommend setting up Friendly Names for the sensors in MQTT, it makes life much easier, and also means you just have to change the device ids in the conf file if you have to change a device. Node red does not need to use the device ids directly.

In case you didn't know, zigbee2mqtt comes with a useful web front end at IP:8080, where you can setup the friendly names, see a device map and other things. You may have to enable the frontend in the conf file.

**[Edit]** Oh, I see you have already found the web i/f 🙂

---

<div class="post-metadata">

**Author:** ![graphicsxp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/graphicsxp/32/55183_2.png) [@graphicsxp](https://discourse.nodered.org/u/graphicsxp)\
**Post date:** [28 January 2022 22:14 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/22 "2022-01-28T22:14:41Z")

</div>

well.. turned out I found the time to investigate further. And in the end I don't even need to use the mqtt node, because using mqtt instead of deconz has solved my intial issue.  
now in the attributes of the payload I see everything related to the actual device triggering the flow , incluing the illuminance\_lux value 🙂  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/9/995ca543b2b13f42e48143af15f1d94ac6a2f639.png)

Regarding what you wrote above, yes I do know the webui. I have also edited the firendly name directly from the devices.yaml file. However what I have noticed (and i don't like) is that HA does not pick up the friendly name to name entity ids. I had to override them one by one manually otherwise in Node-Red I'd see the guid ids generated by mqtt instead of the friendly names ☹

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 January 2022 08:52 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/23 "2022-01-29T08:52:50Z")

</div>

> [@graphicsxp](#):
>
> using mqtt instead of deconz

Do you mean using zigbee2mqtt instead of deconz?

> [@graphicsxp](#):
>
> HA does not pick up the friendly name to name entity ids

That is something you would have to raise on an HA forum.

---

<div class="post-metadata">

**Author:** ![graphicsxp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/graphicsxp/32/55183_2.png) [@graphicsxp](https://discourse.nodered.org/u/graphicsxp)\
**Post date:** [29 January 2022 12:32 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/24 "2022-01-29T12:32:13Z")

</div>

yes, sorry for the misleading shortcut, I meant zigbee2mqtt

ok, I'll seek help on HA forum for the last remaing issue.

Thanks so much for all the help

---

<div class="post-metadata">

**Author:** ![hdehaseleer](https://avatars.discourse-cdn.com/v4/letter/h/d6d6ee/32.png) [@hdehaseleer](https://discourse.nodered.org/u/hdehaseleer)\
**Post date:** [2 February 2022 14:58 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/25 "2022-02-02T14:58:30Z")

</div>

I'm still too stupid. And I've searched several hours.

In Node-red, I can already send an email with a text message.

But how can I send a mail with text and data?  
Something like:

{  
"title": "A lot of info",  
"message": "Temp. living is: " & sensor.temp\_living & "Temp. bathroom is: " & sensor.temp\_bathroom  
}

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 February 2022 20:25 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/26 "2022-02-02T20:25:37Z")

</div>

What does the help text for the email node say about sending title and content?

---

<div class="post-metadata">

**Author:** ![hdehaseleer](https://avatars.discourse-cdn.com/v4/letter/h/d6d6ee/32.png) [@hdehaseleer](https://discourse.nodered.org/u/hdehaseleer)\
**Post date:** [3 February 2022 07:35 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/27 "2022-02-03T07:35:13Z")

</div>

Hi

At this moment I've problems with my Central Heating.  
So my idea is, when I'm abroad, to send an email with some information about all the temperatures.

The title of the email could be "Temperatures dropped".

The body of the email should be something like:

- The temperature in the living is 15°C
- The temperature in the kitchen is 10°C
- The temperature in the boiler is 11°C  
etc.  
And of course, the temperature values are coming from some sensors in my Home Assistant

As mentioned, today I can already send an email notify with only a text message, like:  
{  
"title": "Verwarming",  
"message": "Temp. boiler warm water te laag"  
}

But, I don't arrive to concatenate the explaining text with the corresponding sensor values

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 February 2022 09:15 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/29 "2022-02-03T09:15:03Z")

</div>

OK, I understand. How are your sensor values available in node-red?

---

<div class="post-metadata">

**Author:** ![hdehaseleer](https://avatars.discourse-cdn.com/v4/letter/h/d6d6ee/32.png) [@hdehaseleer](https://discourse.nodered.org/u/hdehaseleer)\
**Post date:** [3 February 2022 09:42 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/30 "2022-02-03T09:42:54Z")

</div>

This is one example how I'm reading a sensor from Home assistant in Nodered.  
So with the Entity ID

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/1/011444d7a718fcf587adbfcf8d6396cdf18f37d1.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 February 2022 10:13 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/31 "2022-02-03T10:13:09Z")

</div>

I am still not sure what question you are asking? Are you able to get the values from HA? If that is the problem then you would probably be better asking on an HA 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:** [17 February 2022 10:13 UTC](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395/32 "2022-02-17T10:13:23Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/get-attributes-of-a-given-entity/57395.md?page=1)
