So, wondering if there’s a way to configured a homeassistant sensor in esphome to pull attributes from a list? For a weather component I have a state, plus a long list of attributes, like such:
Wondering how I could pull the second temperature, and 3rd, and so on. Normally I’d use jq or yq on the command line, but that’s not possible here. Any idea?
Hopefully I don’t have to create a template sensor for each, in home-assistant.
in "/config/edsw.yaml", line 80, column 5:
- platform: homeassistant
^
expected <block end>, but found '<scalar>'
in "/config/edsw.yaml", line 82, column 19:
attribute: [1].temperature
^
did you find time to go look at the documents while also wondering? Seems like a good place to start. Mostly because it specifically talks about importing attributes and provides an example for importing a sensor attributes…
It works just fine with just adding one attribute from an entity. The question I had here was if the attribute had sub keys and you would
I have an energy entity. It has a lot of attributes some of them like the example below have sub key values like hour, price. Would like to enumerate over them somehow.
I was able to find quite a bit with a couple quick searches. They’re all pretty old going back to 2020,21’ and IDK if they still work. It sounds like the quickest/simplest way would be to break the attributes out of the sensor in HA and then make each of them their own sensor that you import into esphome.