-
Notifications
You must be signed in to change notification settings - Fork 11
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
Nested Attributes? #19
Comments
What do you mean by nested attibutes? in HA each entity has subset off attibutes in only one level. As far as i know there are no nested. Could you please post an example? |
it was only an assumption. The display in Home Assistant States view had some indentation and there are duplicate attribute names (not shown in subset below) that led me to suspect that may be the case. Here is a subset of the data from a zwift integration entity (it also may be, since this is a third-party integration entity and not official, that they sort of slapped in an API result set without formatting it well) where i'm trying to get at the data that constitutes the latest_activity, specifically attributes like totalElevation. Those that had that nested feel here don't show resolve the values but those that don't seem like they'd be a sub collection work fine. latest_activity: |
i can't see indentions from your log, could you please do a screenshot? i can only think of JSON being nested - if this is the case then this custom component will not work. Have you tried it already? |
thanks for screenshot, this is first time i see indented attributes. You could perhaps ask the author of the component how to extract these atributes with |
Thanks. Will do.
From: Pavel S <notifications@github.com>
Sent: Wednesday, July 1, 2020 2:35 AM
To: pilotak/homeassistant-attributes <homeassistant-attributes@noreply.github.com>
Cc: mikerenna <mike.renna@live.com>; Author <author@noreply.github.com>
Subject: Re: [pilotak/homeassistant-attributes] Nested Attributes? (#19)
thanks for screenshot, this is first time i see indented attributes. You could perhaps ask the author of the component how to extract these atributes with template sensor (native component in HA) and we can proceed from there
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpilotak%2Fhomeassistant-attributes%2Fissues%2F19%23issuecomment-652247314&data=02%7C01%7C%7C3261564993ec4dca92c308d81d915202%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637291857258795675&sdata=qfrdN4d7SBE1YO3z3LAdTvAKE5ti6RKrGlQfVg6QtFk%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKWHHRW5DINWGVWNRPOVFHTRZLRLZANCNFSM4OLTQ5WQ&data=02%7C01%7C%7C3261564993ec4dca92c308d81d915202%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637291857258805669&sdata=7PXJpxRjP3fShkljKE34RVhVYaS0ZfHIb37eD07Qq9g%3D&reserved=0>.
|
Did we ever get anywhere with this? i'm facing the same problem. different app. |
@generalk25 same apply to you
i had no response from anyone so far |
"nested" attributes happen in many integrations. To do this manually:
this will break out all entities provided by the solaredge_inverters sensor in an array for "Inverter 1"
|
thanks for providing an example. It should be possible to adjust this integration to add additional field ie.: sensor:
- platform: attributes
friendly_name: "Batteries"
attribute: battery_level
nested: "[0]['model']"
entities:
- sensor.myslipo_1_0
- sensor.myslipo_2_0
- sensor.myslipo_3_0
- sensor.myslipo_4_0 is this what you need? |
Did this nested functionality ever get added? I don't see an updated build with it. |
no, nobody responded |
That's a shame, I only just discovered it and would love it. :-( |
@loryanstrant i will look into it if you can test as i don't have such an entity |
Is there a syntax that would support what appear to be nested attributes? Thanks in advance. -Mike
The text was updated successfully, but these errors were encountered: