dmulcahey / zha-network-card

Custom Lovelace card that displays ZHA network and device information
GNU General Public License v3.0
95 stars 20 forks source link

WIP: implement retrieving sw_build_id attribute from Basic cluster #23

Open pdecat opened 3 years ago

pdecat commented 3 years ago

This is marked as WIP as it works but retrieving cluster attributes is slow for unreachable devices (mostly battery powered ones), and this blocks the rendering of the table.

I'd like to alter the way the table rendering is done to accept Promises from get_raw_data() and update the tables cells asynchronously when the promises are fulfilled.

Submitted early as draft PR to get feedback if something like this would be accepted, and if so to get advice on how to improve this.

Sample configuration for ui-lovelace.yaml:

          - id: zigbee-zha-network
            type: "custom:zha-network-card"
            clickable: true
            sort_by: last_seen-
            columns:
              - name: Name
                prop: name
              - attr: available
                id: available
                modify: x || "false"
                name: Online
              - attr: manufacturer
                name: Manufacturer
              - attr: model
                name: Model
              - attr: ieee
                name: IEEE
              - name: NWK
                prop: nwk
              - attr: rssi
                name: RSSI
              - attr: lqi
                name: LQI
              - attr: last_seen
                name: Last Seen
              - attr: power_source
                name: Power Source
              - attr: quirk_class
                name: Quirk
              - prop: sw_build_id
                name: SW

Resulting output:

image

rasmusbe commented 2 years ago

Any more progress with this? Do you need any help finishing it?

pdecat commented 2 years ago

Well, it works for me, but I'm unsure there's any hope to see this merged.