How to show a value of a sensor. Nice widget program

There is a nice Android program
Jason Respons Widget.

Problem is that when I input the below code

https://xxx.duckdns.org/api/states/switch.plug_158d0001530?api_password=xxx

I receive
{“attributes”: {“battery_level”: 100.0, “custom_ui_state_card”: “state-card-custom-ui”, “friendly_name”: “TV power plug”, “icon”: “mdi:power-plug”, “in_use”: 1, “load_power”: 2.89, “power_consumed”: 263259.0}, “entity_id”: “switch.plug_158d0001530”, “last_changed”: “2018-02-24T16:04:58.974465+00:00”, “last_updated”: “2018-02-25T11:52:13.648598+00:00”, “state”: “on”}

but I want to see only the value of the load power (in my case 2.89)

How can I achieve this?

That looks like a question for Jason.
The widget program would have to be able to parse the JSON to select only the data you want

Home Assistant returns what you have above when using the REST api

So it depends on the app?

Do you know any app that does that?

I found out how to use use it, with template

The URL has to be
https://xxx.duckdns.org/api/template?api_password=xxx

and the POST message as this
{ “template”: “{{ states.sensor.YOURSENSOR.attributes.YOURATTRIBUTE }}” }

That’s a very neat solution!

How and where do you generate the POST message?

YOu can use HTTP SHORTCUT as Android program (not sure if exist Apple), and works pretty well, if you use instructions as per above.

But you need to push the widget to get TOAST or WINDOW message with the sensor value, which is ok. Would be nice to have auto updating widget though.

It can be done, it just needs somebody that programs it,.

Thise are the instructions. I tried also the HomeAssist app widget, but its buggy

To get the STATE enter this in the JSON POST

{
“template”: “{{ states(‘sensor.nextsunrise’) }}”
}