Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to fetch only value of entity from api, not detailed info? #462

Closed
harvey637 opened this issue Apr 8, 2022 · 3 comments
Closed

how to fetch only value of entity from api, not detailed info? #462

harvey637 opened this issue Apr 8, 2022 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@harvey637
Copy link

Hi, how do I get only the value of an entity via api?

the documented simple fetch does result in detailed info about entity, not only value ;.(

/usr/bin/wget --no-check-certificate -q http://ems-esp/api/thermostat/hc1/seltemp -O -
{
  "name": "seltemp",
  "fullname": "hc1 selected room temperature",
  "circuit": "hc1",
  "value": 20,
  "type": "number",
  "min": 5,
  "max": 29,
  "uom": "°C",
  "readable": true,
  "writeable": true,
  "visible": true
}

I hope to get only "20"

cu
Harvey

@harvey637 harvey637 added the question Question about something label Apr 8, 2022
@proddy
Copy link
Contributor

proddy commented Apr 9, 2022

you can't, but we can consider adding a "/value" after the entity to bring only the value back.

@proddy proddy added the enhancement New feature or request label Apr 9, 2022
@harvey637
Copy link
Author

Hi Proddy,
excellent idea, thank you
looking forward to test :-)
cu
Harvey

@proddy proddy added this to the v3.4.1 milestone Apr 9, 2022
proddy added a commit to proddy/EMS-ESP32 that referenced this issue May 2, 2022
@proddy proddy modified the milestones: v3.4.1, v3.4 May 2, 2022
@proddy
Copy link
Contributor

proddy commented May 2, 2022

in b16

Format is for example http://ems-esp.local/api/boiler/wwseltemp/value

or any of the other attributes, like http://ems-esp.local/api/boiler/wwseltemp/fullname

@proddy proddy closed this as completed May 2, 2022
@proddy proddy removed the question Question about something label May 2, 2022
proddy added a commit that referenced this issue May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants