Skip to content

remove local device #2542

@HillKTON

Description

@HillKTON

Unable to delete device added via ip and token. Unknown error.

Image

home-assistant.log

2025-06-13 12:39:47.986 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140249113689056] Error handling message: Unknown error (unknown_error) .......... from ***
Traceback (most recent call last):                                                                                      
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response                                                                                                             
    await func(hass, connection, msg)                                                                                
  File "/usr/src/homeassistant/homeassistant/components/config/device_registry.py", line 134, in websocket_remove_config_entry_from_device
    if not await component.async_remove_config_entry_device(                                 
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                              
        hass, config_entry, device_entry                                                                  
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                
    ):                                                                                                                                                                                                                               
    ^                                                                                            
  File "/config/custom_components/xiaomi_miot/__init__.py", line 610, in async_remove_config_entry_device               
    cloud_device = await entry.get_cloud_device(mac=mac.upper())                             
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                          
  File "/config/custom_components/xiaomi_miot/core/hass_entry.py", line 132, in get_cloud_device          
    devices = await self.get_cloud_devices()                                           
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                    
  File "/config/custom_components/xiaomi_miot/core/hass_entry.py", line 125, in get_cloud_devices
    self.cloud_devices = await cloud.async_get_devices_by_key('did', filters=config) or {}                
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                    
AttributeError: 'NoneType' object has no attribute 'async_get_devices_by_key'  

I guess it's confusing cloud device and local device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedbug fixed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions