gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
169 stars 13 forks source link

xtra_attrs error #334

Closed chupacabra71 closed 2 months ago

chupacabra71 commented 2 months ago

Just updated to 3.0.5.8 and getting this error in the logs

2024-09-08 15:04:32.951 ERROR (MainThread) [custom_components.icloud3] name 'xtra_attrs' is not defined
Traceback (most recent call last):
File "/config/custom_components/icloud3/device_tracker.py", line 394, in _get_extra_attributes
xtra_attrs[f"{'-'*5} ICLOUD3 CONFIGURATION {'-'*19}"] = ''
^^^^^^^^^^
NameError: name 'xtra_attrs' is not defined. Did you mean: 'extra_attrs'?
2024-09-08 15:04:32.952 ERROR (MainThread) [custom_components.icloud3] ►INTERNAL ERROR (Create device_tracker object-name 'xtra_attrs' is not defined)
2024-09-08 15:04:32.965 ERROR (MainThread) [custom_components.icloud3] name 'xtra_attrs' is not defined
Traceback (most recent call last):
File "/config/custom_components/icloud3/device_tracker.py", line 394, in _get_extra_attributes
xtra_attrs[f"{'-'*5} ICLOUD3 CONFIGURATION {'-'*19}"] = ''
^^^^^^^^^^
NameError: name 'xtra_attrs' is not defined. Did you mean: 'extra_attrs'?
2024-09-08 15:04:32.966 ERROR (MainThread) [custom_components.icloud3] ►INTERNAL ERROR (Create device_tracker object-name 'xtra_attrs' is not defined)
2024-09-08 15:04:32.976 ERROR (MainThread) [custom_components.icloud3] name 'xtra_attrs' is not defined
Traceback (most recent call last):
File "/config/custom_components/icloud3/device_tracker.py", line 394, in _get_extra_attributes
xtra_attrs[f"{'-'*5} ICLOUD3 CONFIGURATION {'-'*19}"] = ''
^^^^^^^^^^
NameError: name 'xtra_attrs' is not defined. Did you mean: 'extra_attrs'?
2024-09-08 15:04:32.977 ERROR (MainThread) [custom_components.icloud3] ►INTERNAL ERROR (Create device_tracker object-name 'xtra_attrs' is not defined)
2024-09-08 15:04:32.980 INFO (MainThread) [custom_components.icloud3] Setting up iCloud3 v3.0.5.8, Complete
jata1 commented 2 months ago

I can confirm the same issue after upgrading to 3.0.5.8

andyblac commented 2 months ago

same

This error originated from a custom integration.

Logger: custom_components.icloud3
Source: custom_components/icloud3/helpers/messaging.py:467
integration: iCloud3 v3 (documentation, issues)
First occurred: 8 September 2024 at 23:37:21 (657 occurrences)
Last logged: 11:04:20

►INTERNAL ERROR (Create device_tracker object-name 'xtra_attrs' is not defined)
andyblac commented 2 months ago

typo in custom_components/icloud3/device_tracker.py line 394

            xtra_attrs[f"{'-'*5} ICLOUD3 CONFIGURATION {'-'*19}"] = ''

change to

            extra_attrs[f"{'-'*5} ICLOUD3 CONFIGURATION {'-'*19}"] = ''

remove __pycache__ folder and restart HA.

gcobb321 commented 2 months ago

Fixed in v3.0.5.9