Makin-Things / platinum-weather-card

This is a fully customisable weather card for Home Assistant with a graphical configuration.
MIT License
147 stars 33 forks source link

Difficulties adding attribute to Extended Section #5

Closed Sudo-Rob closed 2 years ago

Sudo-Rob commented 2 years ago

Checklist:

Release with the issue:

Last working release (if known):

Unk

Browser and Operating System:

Firefox 101.0.1

There are no expected entities in the drop-down menu when entering an attribute in the Extended Section. Moreover, when the proper attribute is typed in, either in the long form or the friendly format, there is no displayed attribute text as expected.

image

image

When attempting the above, the following appears in the HA log:

`2022-06-15 09:39:52 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:11782:17 TypeError: property "extended_name_attr" is non-configurable and can't be deleted

Javascript errors shown in the web inspector (if applicable):

Additional information:

ozmutley commented 2 years ago

It's working for me on my card.

I believe you may have the wrong details in the entity box at the top of the page. If you choose summary_0 in the Entity Daily Summary dropdown (where you currently have nws_daily_summary), this should then allow the Attribute dropdown to populate with several choices (based from your screenshot) of detailed_forecast and friendly_name

Makin-Things commented 2 years ago

From the images it looks like you have it misconfigured. The entity name should be summary_0 and the attribute name should be detailed_forecast. I am still trying to figure out why you get an error though. Can you show me the details of the nws_daily_summary entity.

Makin-Things commented 2 years ago

I did find an issue in the daily forecast use of attributes and a minor problem if you used an attribute that didn't exist. I am still looking through the code looking for other possible issues.

Makin-Things commented 2 years ago

I just pushed another update that stop some exceptions occurring if you enter a non-existent entity name in the areas where you can also select attributes. Can you retest with the latest.

Sudo-Rob commented 2 years ago

OK. Using sensor.summary_0 (resolves summary_0) with attribute detailed_forecast works now that it's configured correctly. That said, the 5-day forecasts don't work with summary_1 when the entries are similar. When using nws_daily_summary, it's the equivalent of summary_0, except text is a entity. It's what I used to get the Extended Section working.

image

Here's one of many configurations I've tried for the 5-day forecast. Many, if not all, log errors occur when I'm editing card configuration.

image

Here's the full card:

image

2022-06-15 19:53:49 ERROR (MainThread) [homeassistant.components.automation.updates_pending] Updates Pending: Update Persistent Notification: choice 1: Error executing script. Error for call_service at pos 1: Error rendering data template: TypeError: 'NoneType' object is not iterable
2022-06-15 19:53:49 ERROR (MainThread) [homeassistant.components.automation.updates_pending] Updates Pending: Error executing script. Error for choose at pos 1: Error rendering data template: TypeError: 'NoneType' object is not iterable
2022-06-15 19:53:49 ERROR (MainThread) [homeassistant.components.automation.updates_pending] Error while executing automation automation.updates_pending: Error rendering data template: TypeError: 'NoneType' object is not iterable
2022-06-15 20:10:48 ERROR (MainThread) [frontend.js.latest.202206010] http://192.168.1.21:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:56 TypeError: Unable to delete property.
2022-06-15 20:48:06 ERROR (MainThread) [homeassistant.components.automation.updates_pending] Updates Pending: Update Persistent Notification: choice 1: Error executing script. Error for call_service at pos 1: Error rendering data template: TypeError: 'NoneType' object is not iterable
2022-06-15 20:48:06 ERROR (MainThread) [homeassistant.components.automation.updates_pending] Updates Pending: Error executing script. Error for choose at pos 1: Error rendering data template: TypeError: 'NoneType' object is not iterable
2022-06-15 20:48:06 ERROR (MainThread) [homeassistant.components.automation.updates_pending] Error while executing automation automation.updates_pending: Error rendering data template: TypeError: 'NoneType' object is not iterable
2022-06-15 21:42:36 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12062:17 TypeError: 2 is read-only
2022-06-15 21:46:02 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "daily_extended_name_attr" is non-configurable and can't be deleted
2022-06-15 21:46:18 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "daily_extended_name_attr" is non-configurable and can't be deleted
2022-06-15 21:54:07 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_extended_1" is non-configurable and can't be deleted
2022-06-15 21:56:20 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_pos_1" is non-configurable and can't be deleted
2022-06-15 22:10:10 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_pos_1" is non-configurable and can't be deleted
2022-06-15 22:10:12 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_extended_1" is non-configurable and can't be deleted
2022-06-15 22:11:58 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_extended_1" is non-configurable and can't be deleted
2022-06-15 22:12:05 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_pos_1" is non-configurable and can't be deleted
2022-06-15 22:12:30 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_pos_1" is non-configurable and can't be deleted
2022-06-15 22:12:34 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_extended_1" is non-configurable and can't be deleted
2022-06-15 22:13:14 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_pos_1" is non-configurable and can't be deleted
2022-06-15 22:14:18 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_extended_1" is non-configurable and can't be deleted
2022-06-15 22:14:24 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_pos_1" is non-configurable and can't be deleted
2022-06-15 22:15:05 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_pos_1" is non-configurable and can't be deleted
2022-06-15 22:15:17 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_extended_1" is non-configurable and can't be deleted
2022-06-15 22:17:54 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_pos_1" is non-configurable and can't be deleted
2022-06-15 22:18:05 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_extended_1" is non-configurable and can't be deleted
2022-06-15 22:18:23 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12042:17 TypeError: property "entity_pos_1" is non-configurable and can't be deleted
Makin-Things commented 2 years ago

Have you updated to the latest version? Line 12042 in all pushes I have made today couldn't possibly throw those errors?

Sudo-Rob commented 2 years ago

I did update to the latest version. It's possible I didn't clear the log before copying the diagnostic errors.

I just update to 4465d0a and tried to edit the Daily Forecast section and came up with this:

2022-06-16 09:54:27 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12045:17 TypeError: property "entity_extended_1" is non-configurable and can't be deleted
2022-06-16 09:54:31 ERROR (MainThread) [frontend.js.latest.202206010] http://homeassistant.local:8123/hacsfiles/makin-things-weather-card/weather-card.js:12045:17 TypeError: property "entity_pos_1" is non-configurable and can't be deleted

I wish it was more obvious what I'm doing wrong. Take a look"

This...

image

...results in this:

image

What works for sensor.summary_0 doesn't seem to work for sensor.summary_1.

Makin-Things commented 2 years ago

Ok, that line number could cause that error. Can you show the details of summary_1 (state and attributes) using the dev tools in HA.

Sudo-Rob commented 2 years ago

Easy, enough. Here ya go:

image

Makin-Things commented 2 years ago

I've added an extra debug message in front of the line I think is causing the problem, but I have no idea why. Try updating and see if you get more info in the browser console log, just before the exception occurs.

Sudo-Rob commented 2 years ago

I've played a bit with forcing misconfigurations. So far, I haven't seen any exceptions in the log. If any surface, I'll let you know.

Makin-Things commented 2 years ago

@Sudo-Rob is this still an issue?

Sudo-Rob commented 2 years ago

I don't believe so. I think it can be closed.

Sudo-Rob commented 2 years ago

No, it’s been working. You can close it.

Thanks.

On Jul 3, 2022, at 12:27 AM, Simon @.***> wrote:

 @Sudo-Rob is this still an issue?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.