Skip to content
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

device_registry.async_get_or_create referencing a non existing `via_device #551

Open
toto25550 opened this issue Jan 3, 2025 · 8 comments

Comments

@toto25550
Copy link

Hello,
See log

Detected code that calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat04D7C5'), with device info: {'identifiers': {('wiser', 'WiserHeat04D7C5 Wiser Chambre Eva')}, 'manufacturer': 'Drayton Wiser', 'model': 'Room', 'name': 'Wiser Chambre Eva', 'via_device': ('wiser', 'WiserHeat04D7C5')}. This will stop working in Home Assistant 2025.12.0, please report this issue

Regards

@sbrewster2
Copy link

`Logger: homeassistant.helpers.frame
Source: helpers/frame.py:324
First occurred: 06:59:54 (47 occurrences)
Last logged: 07:54:21

Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat05EBA4'), with device info: {'identifiers': {('wiser', 'WiserHeat05EBA4 Wiser HeatHub (WiserHeat05EBA4)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat05EBA4)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat05EBA4')} at custom_components/wiser/switch.py, line 231: async_add_entities(wiser_switches). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat05EBA4'), with device info: {'identifiers': {('wiser', 'WiserHeat05EBA4 Wiser hot_water')}, 'manufacturer': 'Drayton Wiser', 'model': 'Hot Water', 'name': 'Wiser Hot Water', 'via_device': ('wiser', 'WiserHeat05EBA4')} at custom_components/wiser/select.py, line 58: async_add_entities(wiser_selects). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat05EBA4'), with device info: {'identifiers': {('wiser', 'WiserHeat05EBA4 Wiser HeatHub (WiserHeat05EBA4)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat05EBA4)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat05EBA4')} at custom_components/wiser/button.py, line 47: async_add_entities(wiser_buttons, True). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat05EBA4'), with device info: {'identifiers': {('wiser', 'WiserHeat05EBA4 Wiser HeatHub (WiserHeat05EBA4)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat05EBA4)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat05EBA4')} at custom_components/wiser/number.py, line 55: async_add_entities(wiser_numbers). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues`

msp1974 added a commit that referenced this issue Jan 4, 2025
…nc_get_or_create` referencing a non existing `via_device #551
@andyblac
Copy link

andyblac commented Jan 5, 2025

@msp1974 just tried the code update, but still getting...

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:234
First occurred: 15:01:10 (1 occurrences)
Last logged: 15:01:10

Detected code that calls `device_registry.async_get_or_create` referencing a non existing `via_device` ('wiser', 'WiserHeat04F8A0'), with device info: {'identifiers': {('wiser', 'WiserHeat04F8A0 Wiser Lounge')}, 'manufacturer': 'Drayton Wiser', 'model': 'Room', 'name': 'Wiser Lounge', 'via_device': ('wiser', 'WiserHeat04F8A0')}. This will stop working in Home Assistant 2025.12.0, please report this issue
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:324
First occurred: 15:01:06 (6 occurrences)
Last logged: 15:01:07

Detected that custom integration 'wiser' calls `device_registry.async_get_or_create` referencing a non existing `via_device` ('wiser', 'WiserHeat04F8A0'), with device info: {'identifiers': {('wiser', 'WiserHeat04F8A0 Wiser HeatHub (WiserHeat04F8A0)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat04F8A0)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat04F8A0')} at custom_components/wiser/sensor.py, line 241: async_add_entities(wiser_sensors, True). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls `device_registry.async_get_or_create` referencing a non existing `via_device` ('wiser', 'WiserHeat04F8A0'), with device info: {'identifiers': {('wiser', 'WiserHeat04F8A0 Wiser HeatHub (WiserHeat04F8A0)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat04F8A0)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat04F8A0')} at custom_components/wiser/switch.py, line 231: async_add_entities(wiser_switches). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls `device_registry.async_get_or_create` referencing a non existing `via_device` ('wiser', 'WiserHeat04F8A0'), with device info: {'identifiers': {('wiser', 'WiserHeat04F8A0 Wiser Smart Plug')}, 'manufacturer': 'Drayton Wiser', 'model': 'SmartPlug', 'name': 'Wiser Smart Plug', 'sw_version': '0.0.32', 'via_device': ('wiser', 'WiserHeat04F8A0')} at custom_components/wiser/select.py, line 58: async_add_entities(wiser_selects). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls `device_registry.async_get_or_create` referencing a non existing `via_device` ('wiser', 'WiserHeat04F8A0'), with device info: {'identifiers': {('wiser', 'WiserHeat04F8A0 Wiser HeatHub (WiserHeat04F8A0)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat04F8A0)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat04F8A0')} at custom_components/wiser/button.py, line 47: async_add_entities(wiser_buttons, True). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls `device_registry.async_get_or_create` referencing a non existing `via_device` ('wiser', 'WiserHeat04F8A0'), with device info: {'identifiers': {('wiser', 'WiserHeat04F8A0 Wiser HeatHub (WiserHeat04F8A0)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat04F8A0)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat04F8A0')} at custom_components/wiser/number.py, line 55: async_add_entities(wiser_numbers). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues

manually changed the code in __init__.py , removed the pycache folder and restarted HA.

changed to:

async def async_update_device_registry(hass: HomeAssistant, config_entry):
    """Update device registry."""
    data = hass.data[DOMAIN][config_entry.entry_id][DATA]
    device_registry = dr.async_get(hass)
    device_registry.async_get_or_create(
        config_entry_id=config_entry.entry_id,
        connections={
            (CONNECTION_NETWORK_MAC, data.wiserhub.system.network.mac_address)
        },
        identifiers={(DOMAIN, data.wiserhub.system.name)},
        manufacturer=MANUFACTURER,
        name=get_device_name(data, 0),
        model=data.wiserhub.system.model,
        sw_version=data.wiserhub.system.firmware_version,
    )

@toto25550
Copy link
Author

After HACS update and restart

Source: helpers/frame.py:324

Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat04D7C5'), with device info: {'identifiers': {('wiser', 'WiserHeat04D7C5 Wiser Chambre Lorine')}, 'manufacturer': 'Drayton Wiser', 'model': 'Room', 'name': 'Wiser Chambre Lorine', 'via_device': ('wiser', 'WiserHeat04D7C5')} at custom_components/wiser/climate.py, line 138: async_add_entities(wiser_rooms, True). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat04D7C5'), with device info: {'identifiers': {('wiser', 'WiserHeat04D7C5 Wiser HeatHub (WiserHeat04D7C5)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat04D7C5)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat04D7C5')} at custom_components/wiser/sensor.py, line 241: async_add_entities(wiser_sensors, True). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat04D7C5'), with device info: {'identifiers': {('wiser', 'WiserHeat04D7C5 Wiser HeatHub (WiserHeat04D7C5)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat04D7C5)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat04D7C5')} at custom_components/wiser/switch.py, line 231: async_add_entities(wiser_switches). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat04D7C5'), with device info: {'identifiers': {('wiser', 'WiserHeat04D7C5 Wiser HeatHub (WiserHeat04D7C5)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat04D7C5)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat04D7C5')} at custom_components/wiser/button.py, line 47: async_add_entities(wiser_buttons, True). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat04D7C5'), with device info: {'identifiers': {('wiser', 'WiserHeat04D7C5 Wiser HeatHub (WiserHeat04D7C5)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat04D7C5)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat04D7C5')} at custom_components/wiser/number.py, line 55: async_add_entities(wiser_numbers). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues

@andyblac
Copy link

andyblac commented Jan 6, 2025

@msp1974 after 2nd restart of HA, the error has gone, so your fix does seem to fix the issue.

@msp1974
Copy link
Collaborator

msp1974 commented Jan 6, 2025

Yes I had the same experience. Not sure why but probably to do with when the device gets updated versus when entities created.

@msp1974
Copy link
Collaborator

msp1974 commented Jan 6, 2025

@toto25550 , this is not yet released, o ly in dev so will not be implemented via HACs update until it is released.

@kiat-huang
Copy link

Same problem as reported by OP in my logs.
Wiser HeatHub twozone.
Screenshot_2025-01-07-01-02-10-03_f2ce54a928ead7f219cf2ec402235094

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:324
First occurred: 00:51:57 (9 occurrences)
Last logged: 00:52:10

Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat02CC0D'), with device info: {'identifiers': {('wiser', 'WiserHeat02CC0D Wiser HeatHub (WiserHeat02CC0D)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat02CC0D)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat02CC0D')} at custom_components/wiser/sensor.py, line 241: async_add_entities(wiser_sensors, True). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat02CC0D'), with device info: {'identifiers': {('wiser', 'WiserHeat02CC0D Wiser HeatHub (WiserHeat02CC0D)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat02CC0D)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat02CC0D')} at custom_components/wiser/switch.py, line 231: async_add_entities(wiser_switches). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat02CC0D'), with device info: {'identifiers': {('wiser', 'WiserHeat02CC0D Wiser hot_water')}, 'manufacturer': 'Drayton Wiser', 'model': 'Hot Water', 'name': 'Wiser Hot Water', 'via_device': ('wiser', 'WiserHeat02CC0D')} at custom_components/wiser/select.py, line 58: async_add_entities(wiser_selects). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat02CC0D'), with device info: {'identifiers': {('wiser', 'WiserHeat02CC0D Wiser HeatHub (WiserHeat02CC0D)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat02CC0D)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat02CC0D')} at custom_components/wiser/button.py, line 47: async_add_entities(wiser_buttons, True). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat02CC0D'), with device info: {'identifiers': {('wiser', 'WiserHeat02CC0D Wiser HeatHub (WiserHeat02CC0D)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat02CC0D)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat02CC0D')} at custom_components/wiser/number.py, line 55: async_add_entities(wiser_numbers). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues with

@tonyspence
Copy link

Updated to core 2025.1.2 this afternoon and got the following log messages:

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:234
First occurred: 18:46:38 (1 occurrences)
Last logged: 18:46:38

Detected code that calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat036D84'), with device info: {'identifiers': {('wiser', 'WiserHeat036D84 Wiser Living room ')}, 'manufacturer': 'Drayton Wiser', 'model': 'Room', 'name': 'Wiser Living room ', 'via_device': ('wiser', 'WiserHeat036D84')}. This will stop working in Home Assistant 2025.12.0, please report this issue

and:

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:324
First occurred: 18:46:35 (6 occurrences)
Last logged: 18:46:37

Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat036D84'), with device info: {'identifiers': {('wiser', 'WiserHeat036D84 Wiser HeatHub (WiserHeat036D84)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat036D84)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat036D84')} at custom_components/wiser/sensor.py, line 241: async_add_entities(wiser_sensors, True). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat036D84'), with device info: {'identifiers': {('wiser', 'WiserHeat036D84 Wiser HeatHub (WiserHeat036D84)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat036D84)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat036D84')} at custom_components/wiser/switch.py, line 231: async_add_entities(wiser_switches). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat036D84'), with device info: {'identifiers': {('wiser', 'WiserHeat036D84 Wiser hot_water')}, 'manufacturer': 'Drayton Wiser', 'model': 'Hot Water', 'name': 'Wiser Hot Water', 'via_device': ('wiser', 'WiserHeat036D84')} at custom_components/wiser/select.py, line 58: async_add_entities(wiser_selects). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat036D84'), with device info: {'identifiers': {('wiser', 'WiserHeat036D84 Wiser HeatHub (WiserHeat036D84)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat036D84)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat036D84')} at custom_components/wiser/button.py, line 47: async_add_entities(wiser_buttons, True). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues
Detected that custom integration 'wiser' calls device_registry.async_get_or_create referencing a non existing via_device ('wiser', 'WiserHeat036D84'), with device info: {'identifiers': {('wiser', 'WiserHeat036D84 Wiser HeatHub (WiserHeat036D84)')}, 'manufacturer': 'Drayton Wiser', 'model': 'Controller', 'name': 'Wiser HeatHub (WiserHeat036D84)', 'sw_version': '3.18.3', 'via_device': ('wiser', 'WiserHeat036D84')} at custom_components/wiser/number.py, line 55: async_add_entities(wiser_numbers). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/asantaga/wiserHomeAssistantPlatform/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants