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

user_given_name is obsolete, how show friendly_name? #26

Open rossbcan opened 3 years ago

rossbcan commented 3 years ago

zha-network-card.js change:

change all occurances of "user_given_name" to "friendly_name" not working.

How can I achieve this?

// collect the "raw" data from the requested source(s) if ("attr" in col) { return col.attr in this.device.attributes ? this.device.attributes[col.attr] : null; } else if ("prop" in col) { if (col.prop == "object_id") { return this.device.attributes.device_reg_id; } else if (col.prop == "name") { // handle device name customization if ( "user_given_name" in this.device.attributes && this.device.attributes["user_given_name"] ) { return this.device.attributes.user_given_name; } else { return this.device.attributes.name; } } else if (col.prop == "nwk") {