jparthum
(Jason Parthum)
June 19, 2019, 6:17am
1
This, {{states.sensor.jparthum.attributes['Formatted Address']}}
, works in HA’s dev-template, but I’m having trouble figuring out how (or if?) I can reference this attribute from a template in the data
field of a Call Service node in node-red-contrib-home-assistant-websocket .
Any advice would be much appreciated.
Kermit
June 19, 2019, 7:28am
2
{{entity.sensor.jparthum.attributes.Formatted Address}}
HA and node-red-contrib-home-assistant-websocket use a different template system
1 Like
jparthum
(Jason Parthum)
June 19, 2019, 7:47am
3
OK, I feel dumb. Hours of trial-and-error and I didn’t even try the simplest method.
Thank you, Kermit .
Phil406
(KAT)
December 11, 2023, 1:09pm
4
Hi
Just wanted to link these 2 topics
Again I reply to my previous post.
I have managed to get rid of the original measurment unit by adding [:-3] to the end of my formula as given here:
Now everything is working, even with the measurment_unit. Here below my final code:
qnap_djeev_memory_used_gb:
friendly_name: "Qnap TS-453A used memory in GB rounded"
unit_of_measurement: "GB"
value_template: "{{ (((state_attr('sensor.qnap_djeev_memory_usage', 'Memory Size'))[:-3] | float) }}"
Now it looks like this
[image]