home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.14k stars 2.82k forks source link

device enable button does not work anymore #11573

Closed hklages closed 2 years ago

hklages commented 2 years ago

Checklist

Describe the issue you are experiencing

I disabled a fritzbox device named hkSmartphone Internet Access. Unfortunately that devices als disables the entity device_tracker.hksmartphone . Now it is not anymore possible to enable the device in the device dialog. Neither the "enable" button nor the dialog let me enable the device.

Clicking on the button: no reaction at all.

Using the edit properties pencil let me enable the button but the dialog does not dissappear and stays on the screen. See the update/cancel button tuning to grey.

main enable device

Describe the behavior you expected

obvious.

Steps to reproduce the issue

  1. disable device
  2. try to enable the device in 2 different ways - the provide button and the pencil and the switch enable.
  3. ...

What version of Home Assistant Core has the issue?

core-2022.2.2

What was the last working version of Home Assistant Core?

dont know

In which browser are you experiencing the issue with?

Edge and Firefox

Which operating system are you using to run this browser?

Home Assistant OS 7.2

State of relevant entities

`{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.2.2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.9.7",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "5.10.63-v8",
    "supervisor": "2022.01.1",
    "host_os": "Home Assistant OS 7.2",
    "docker_version": "20.10.9",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "rademacher": {
      "version": "1.4.0",
      "requirements": [
        "pyrademacher==0.1.1"
      ]
    },
    "alexa_media": {
      "version": "3.10.15",
      "requirements": [
        "alexapy==1.25.3",
        "packaging>=20.3",
        "wrapt>=1.12.1"
      ]
    },
    "hacs": {
      "version": "1.21.0",
      "requirements": [
        "aiogithubapi>=21.11.0"
      ]
    },
    "nodered": {
      "version": "1.0.6",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "fritz",
    "name": "AVM FRITZ!Box Tools",
    "documentation": "https://www.home-assistant.io/integrations/fritz",
    "requirements": [
      "fritzconnection==1.8.0",
      "xmltodict==0.12.0"
    ],
    "dependencies": [
      "network"
    ],
    "codeowners": [
      "@mammuth",
      "@AaronDavidSchneider",
      "@chemelli74",
      "@mib1185"
    ],
    "config_flow": true,
    "ssdp": [
      {
        "st": "urn:schemas-upnp-org:device:fritzbox:1"
      }
    ],
    "iot_class": "local_polling",
    "is_built_in": true
  },
  "data": {
    "entry": {
      "entry_id": "0ad245d88adc62fca488c788d92a735a",
      "version": 1,
      "domain": "fritz",
      "title": "hkfbox",
      "data": {
        "host": "192.168.178.1",
        "password": "**REDACTED**",
        "port": 49000,
        "username": "**REDACTED**"
      },
      "options": {
        "consider_home": 180.0
      },
      "pref_disable_new_entities": true,
      "pref_disable_polling": false,
      "source": "ssdp",
      "unique_id": "123402409-bccb-40e7-8e6c-2C3AFDC49A1D",
      "disabled_by": null
    },
    "device_info": {
      "model": "FRITZ!Box 7530",
      "current_firmware": "164.07.29",
      "latest_firmware": "",
      "update_available": false,
      "is_router": true,
      "mesh_role": "master",
      "last_update success": true,
      "last_exception": null,
      "discovered_services": [
        "any1",
        "WANCommonIFC1",
        "WANDSLLinkC1",
        "WANIPConn1",
        "WANIPv6Firewall1",
        "DeviceInfo1",
        "DeviceConfig1",
        "Layer3Forwarding1",
        "LANConfigSecurity1",
        "ManagementServer1",
        "Time1",
        "UserInterface1",
        "X_AVM-DE_Storage1",
        "X_AVM-DE_WebDAVClient1",
        "X_AVM-DE_UPnP1",
        "X_AVM-DE_Speedtest1",
        "X_AVM-DE_RemoteAccess1",
        "X_AVM-DE_MyFritz1",
        "X_VoIP1",
        "X_AVM-DE_OnTel1",
        "X_AVM-DE_Dect1",
        "X_AVM-DE_TAM1",
        "X_AVM-DE_AppSetup1",
        "X_AVM-DE_Homeauto1",
        "X_AVM-DE_Homeplug1",
        "X_AVM-DE_Filelinks1",
        "X_AVM-DE_Auth1",
        "X_AVM-DE_HostFilter1",
        "WLANConfiguration1",
        "WLANConfiguration2",
        "WLANConfiguration3",
        "Hosts1",
        "LANEthernetInterfaceConfig1",
        "LANHostConfigManagement1",
        "WANCommonInterfaceConfig1",
        "WANDSLInterfaceConfig1",
        "WANDSLLinkConfig1",
        "WANEthernetLinkConfig1",
        "WANPPPConnection1",
        "WANIPConnection1"
      ],
      "client_devices": [
        {
          "connected_to": "hkfbox",
          "connection_type": "LAN",
          "hostname": "hkHA",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:11.610632+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "LAN",
          "hostname": "hkNas",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:11.697588+00:00",
          "wan_access": true
        },
        {
          "connected_to": "fritz.repeater",
          "connection_type": "WLAN",
          "hostname": "sonosbeam",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:11.746659+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "sonosplay5",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:11.795178+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "hkHomepilot",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:11.842188+00:00",
          "wan_access": true
        },
        {
          "connected_to": "fritz.repeater",
          "connection_type": "WLAN",
          "hostname": "sonosplay3",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:11.890687+00:00",
          "wan_access": true
        },
        {
          "connected_to": "fritz.repeater",
          "connection_type": "WLAN",
          "hostname": "GoogleTV",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:11.930372+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "echodotneu",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:11.976850+00:00",
          "wan_access": true
        },
        {
          "connected_to": "fritz.repeater",
          "connection_type": "WLAN",
          "hostname": "echodot",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:11.995450+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "hkRing",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.043258+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "Miele-001D63FFFE0AD0B4",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.083676+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "shelly1-A4CF12F4221F",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.169692+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "shelly1-500291F09F65",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.216566+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "shellyswitch25-98F4ABF2C975",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.266138+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "shellyplug-s-F8CD47",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.314096+00:00",
          "wan_access": true
        },
        {
          "connected_to": "fritz.repeater",
          "connection_type": "WLAN",
          "hostname": "shelly1-F4CFA2764514",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.361337+00:00",
          "wan_access": true
        },
        {
          "connected_to": "fritz.repeater",
          "connection_type": "WLAN",
          "hostname": "shelly1-A4CF12F421A2",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.408249+00:00",
          "wan_access": true
        },
        {
          "connected_to": "fritz.repeater",
          "connection_type": "WLAN",
          "hostname": "hkNetatmo",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.454106+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "echoplus",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.472356+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "hkSmartphone",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.519628+00:00",
          "wan_access": true
        },
        {
          "connected_to": "fritz.repeater",
          "connection_type": "WLAN",
          "hostname": "hkTablet",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.567574+00:00",
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "WLAN",
          "hostname": "echoshow8",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.649832+00:00",
          "wan_access": true
        },
        {
          "connected_to": "",
          "connection_type": "",
          "hostname": "hkWatch",
          "is_connected": false,
          "last_activity": null,
          "wan_access": true
        },
        {
          "connected_to": "",
          "connection_type": "",
          "hostname": "PC-192-168-178-72",
          "is_connected": false,
          "last_activity": null,
          "wan_access": true
        },
        {
          "connected_to": "",
          "connection_type": "",
          "hostname": "PC-192-168-178-73",
          "is_connected": false,
          "last_activity": null,
          "wan_access": true
        },
        {
          "connected_to": "",
          "connection_type": "",
          "hostname": "PC-192-168-178-74",
          "is_connected": false,
          "last_activity": null,
          "wan_access": true
        },
        {
          "connected_to": "",
          "connection_type": "",
          "hostname": "sonosplay1",
          "is_connected": false,
          "last_activity": null,
          "wan_access": true
        },
        {
          "connected_to": "hkfbox",
          "connection_type": "LAN",
          "hostname": "hkLaptop",
          "is_connected": true,
          "last_activity": "2022-02-06T08:11:12.921394+00:00",
          "wan_access": true
        }
      ],
      "wan_link_properties": {
        "NewWANAccessType": "DSL",
        "NewLayer1UpstreamMaxBitRate": 49516000,
        "NewLayer1DownstreamMaxBitRate": 261011000,
        "NewPhysicalLinkStatus": "Up"
      }
    }
  }
}`

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

hklages commented 2 years ago

The following error logs maybe related to that issue:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/config/device_registry.py:66
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 08:48:21 (39 occurrences)
Last logged: 09:31:08

[546963408064] Error handling message: Unknown error
[547407440720] Error handling message: Unknown error
[547229337152] Error handling message: Unknown error
[546961402992] Error handling message: Unknown error
[547458847744] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/config/device_registry.py", line 66, in websocket_update_device
    msg["disabled_by"] = DeviceEntryDisabler(msg["disabled_by"])
  File "/usr/local/lib/python3.9/enum.py", line 384, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.9/enum.py", line 702, in __new__
    raise ve_exc
ValueError: None is not a valid DeviceEntryDisabler
Logger: homeassistant
Source: components/websocket_api/connection.py:143
First occurred: 08:48:21 (39 occurrences)
Last logged: 09:31:08

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/config/device_registry.py", line 66, in websocket_update_device
    msg["disabled_by"] = DeviceEntryDisabler(msg["disabled_by"])
  File "/usr/local/lib/python3.9/enum.py", line 384, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.9/enum.py", line 702, in __new__
    raise ve_exc
ValueError: None is not a valid DeviceEntryDisabler

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 29, in _handle_async_response
    connection.async_handle_exception(msg, err)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 143, in async_handle_exception
    self.send_message(messages.error_message(msg["id"], code, err_message))
KeyError: 'id'
hklages commented 2 years ago

Seems to be a general problem, not related to fritzbox. There are multiple issues openend in core