-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
json_attributes for RESTful sensor not working on nested values #12235
Comments
This would be a good addition as many json responses include a status and response dictionary instead of just responding with parent values |
Also facing this issues with nested JSON. Any update to an updated fix? |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 |
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍 |
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (
hass --version
):0.61.1 (newer versions do not include changes to this sensor)
Python release (
python3 --version
):3.6.3
Component/platform:
RESTful sensor (HA installed with AiO installer on a RPi3)
Description of problem:
json_attributes
in config seem to be ignored when trying to access nested values.Expected:
List of
json_attributes
should allow to retrieve any value within the JSON response, just likevalue_template
does.Problem-relevant
configuration.yaml
entries and steps to reproduce:The JSON result returned by the resource above is as follows (relevant bit at the end):
This is what the sensor looks like:
Traceback (if applicable):
No errors to be found in the log.
Additional info:
I'm basically just interested in 2 values within the
State
JSON object:Status
as the state andStartedAt
as as attribute of the sensor. I don't want to use the entireState
object in either case because it would pollute the recorder with information I don't want/need. Additionally, theState
object exceeds 255 characters so it couldn't be set as the state of the sensor anyway.I looked at #10753 but didn't find any evidence that I'm doing something wrong. Searching around the community forum seems to indicate that this issue is caused by the fact that I'm trying to access a property inside an object, rather than a property directly. I hope my wording here makes sense, as I'm not familiar with the correct terminology.
The text was updated successfully, but these errors were encountered: