-
Notifications
You must be signed in to change notification settings - Fork 12
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 |
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: