Closed clau-bucur closed 10 months ago
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?
can you give more examples?
This happened at last restart, couple of hours ago:
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. The things changed as soon as I upgraded from 2.1.2 to 2.1.3 and rebooted HA.
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. Based on that I can check it.
can you give more examples?
This happened at last restart, couple of hours ago:
This is not related, I have opened it as new issue #302
Check why there are 2 names, what defines the device as "attic light" and "light attic" in mikrotik. Based on that I can check it.
I don't really get it. I can't find anywhere in Mikrotik where it's refered as attic light
.
The same is for all the rest of my similar light devices:
Looking at other devices I think that the device tracker entity_id is now derived from the HomeAssistant device name.
Take for example this HomeAssistant device called Garden
. In Mikrotik it's named Light Garden
as you can see above.
Earlier it's device tracker entity was device_tracker.light_garden
.
Now it looks like this:
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. HA upgrade triggered a restart, after which the changed entities appeared 😕
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. Here are the logs. Let me know if more details are neede. home-assistant_mikrotik_router_2023-09-18T11-41-13.585Z.log
can you also share your integration diagnostics?
"attic light" is not mentioned anywhere, except generated entity id. I have a suspicion that this was not defined by integration, as I dont see any possibility of that. If could be caused by new HA device linking. So it could be attac taken from device name and light from entity and truncating "attac" at the end as some sort of name consolidation. Can you rest of the screen from your first screenshot and also setting pages for both entities you underscored as red? Also can you test if that tracker entity really reacts to correct device?
All these changes seem to be caused by changes in the Tasmota integration, starting with HA 2023.09. Some info can be found under: https://github.com/home-assistant/core/issues/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. Thank you for your time!
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. But there was no change on the side of the Shelly integration.
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