nspanel-lovelace-ui icon indicating copy to clipboard operation
nspanel-lovelace-ui copied to clipboard

[Feature Request] - Display an entity with JSON format attributes

Open diginfo opened this issue 2 years ago • 5 comments

I have a sensor, that is managed thru an appdaemon script, the result is an entity with JSON format attributes i.e.:

next: {
"RECYCLING": "XXXXXX"
"REFUSE": "XXXXXX"
"GARDEN": "XXXXXX"
}

I can pull the data into the developer tools templates no problem with:

{{ state_attr("sensor.bindata","next")["RECYCLING"] }}

But how do I pull it into a card entity ?

      - type: cardEntities
        title: Refuse Collection
        key: refuse
        entities:
          - entity: sensor.bindata
            state: '{{ state_attr("sensor.bindata","next")["RECYCLING"] }}'
            icon: recycle
            name: Recycling

diginfo avatar Jun 10 '22 03:06 diginfo

Also, I really appreciate the work you are doing and fully understand that it is under constant and considerable development as we speak.

I am also enthusiastic to test & feedback on suggestions and bugs etc etc, but it is very difficult to keep track of new features as well as changes to existing features, that might mean a configuration that worked in the last release may no longer work in the current release, this has happened quite often and is understandable and unavoidable.

But would it be possible to create a new thread on Home Assistant Forum, where we can actively keep abreast of new features and changes etc etc and also provide feedback.

I know that having to document things is 'unproductive' but it would really be helpful instead of having to look at each and every commit that has been made since you last updated.

diginfo avatar Jun 10 '22 11:06 diginfo

This is a feature request not a bug, this is currently not possible, you need to create a HA Template Sensor for this.

https://www.home-assistant.io/integrations/template/#state-based-template-binary-sensors-buttons-numbers-selects-and-sensors

well as changes to existing features, that might mean a configuration that worked in the last release may no longer work in the current release

What do you mean breaking changes should be simply mentioned in the release notes, also which breaking changes do you mean, last breaking change of the config format was in version 2.4, which was mentioned in the title of the release?

Release Notes always mentioned the changes between releases and also mentioned breaking changes.

joBr99 avatar Jun 10 '22 15:06 joBr99

Thanks;

Yes if youre using the official release and not the bleeding edge version then there are release notes.

But I am using the development version ("main") just a couple of examples:

AutoWeather: auto

Changed to:

autoWeather: true

and

 - entity: iText.Password.mypass
   icon: key

Changed to:

 - entity: iText.mypass
   name: Password
   icon: key

These are not big issues but unless you read every commit, you just would not know

:-)

diginfo avatar Jun 10 '22 23:06 diginfo

you don't need to read the commits for this, just take a look at the issues assinged to the next release milestone, the upcoming release notes are based on them

https://github.com/joBr99/nspanel-lovelace-ui/milestone/10

the readme is also usally up to date and you can view commits on this file only or display a diff between last release and current readme

joBr99 avatar Jun 10 '22 23:06 joBr99

do you have an example on how to configure this in offical homeassistant UI?

joBr99 avatar Sep 08 '22 17:09 joBr99

  • action_name for scripts has been removed

  • name config option is now rendered as homeassistant template

  • a new value config option has been added which is also rendered as HA template and can be used to display any attributes

joBr99 avatar Jan 22 '23 13:01 joBr99