-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Device tracker entities lost after 2.1.3 upgrade #301
Comments
I'm not using device tracking feature, but I noticed this error popping up in HA logs on every restart: Logger: homeassistant.components.device_tracker
Source: custom_components/mikrotik_router/device_tracker.py:72
Integration: Device Tracker (documentation, issues)
First occurred: 04:42:10 (2 occurrences)
Last logged: 05:07:10
Error while setting up mikrotik_router platform for device_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/mikrotik_router/device_tracker.py", line 110, in async_setup_entry
await async_add_entities(hass, config_entry, dispatcher)
File "/config/custom_components/mikrotik_router/device_tracker.py", line 89, in async_add_entities
await async_update_controller(
File "/config/custom_components/mikrotik_router/device_tracker.py", line 72, in async_update_controller
data = coordinator.data[entity_description.data_path]
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
Software versions:
|
Order didnt changed, thats looks like device hostname was renamed. can you give more examples? |
The thing is that I did not change a bit on my MT setup. I have watchdogs setup to notify me when device trackers go offline, and they kicked in after reboot because of the entity_id changes. @tomaae I'll enable debug for the component and attach it here if you need that. |
Check why there are 2 names, what defines the device as "attic light" and "light attic" in mikrotik. |
|
yes, entity id is derivated from device name. thats how it always been. there is no separate way to specify entity id to be different from device name |
Understood. Then it means upgrade de HA 2023.9 triggered the changes actually. Thanks! |
no, you have misunderstood. it was like that before, nothing should have changed. |
Then I don't get what happened on my system, really. I upgraded Mikrotik from 2.1.2 to 2.1.3 then HA from 2023.8.? to 2023.09.2. |
no idea really, we will need to run it in debug. possibly there will be a clue |
@clau-bucur can you test it now with 2.1.4 and include debugs and diagnostics? |
Enabled debug for component, upgraded to 2.14, then rebooted HA. |
can you also share your integration diagnostics? |
"attic light" is not mentioned anywhere, except generated entity id. |
All these changes seem to be caused by changes in the Tasmota integration, starting with HA 2023.09. Some info can be found under: home-assistant/core#100089 I have adjusted my device names to account for the changes. We can close this one as seems it's not related to this integration. |
well, that explains why we could not find it anywhere, no matter how fine comb we used :) |
I seem to have the same with Shelly devices. |
Describe the issue
After upgrading to 2.1.3 the already existing device_tracker entities got disabled and new entites were created with different entiy_id.
How to reproduce the issue
Expected behavior
The order defined in #86 to remain in place.
Screenshots
New device tracker: device_tracker.attic_light
Old, now unavailable, device tracker: device_tracker.light_attic
Software versions
The text was updated successfully, but these errors were encountered: