Improve typing of deCONZ diagnostics (#69491)
* Improve typing of deCONZ diagnostics homeassistant/components/deconz/diagnostics.py:28: error: Item "None" of "Optional[WSClient]" has no attribute "state" [union-attr] homeassistant/components/deconz/diagnostics.py:40: error: Unpacking a string is disallowed [misc] homeassistant/components/deconz/diagnostics.py:40: error: Cannot determine type of "k" [has-type] homeassistant/components/deconz/diagnostics.py:40: error: Cannot determine type of "v" [has-type] homeassistant/components/deconz/diagnostics.py:42: error: Unpacking a string is disallowed [misc] homeassistant/components/deconz/diagnostics.py:42: error: Cannot determine type of "k" [has-type] homeassistant/components/deconz/diagnostics.py:42: error: Cannot determine type of "v" [has-type] * Fix review comments * These mypy ignores arent useful until py.typed is introduced with the library which I will do once I resolve as much as possible in the integrationpull/70068/head
parent
459d775ad5
commit
c920d7d5e0
|
@ -25,7 +25,9 @@ async def async_get_config_entry_diagnostics(
|
|||
diag["deconz_config"] = async_redact_data(
|
||||
gateway.api.config.raw, REDACT_DECONZ_CONFIG
|
||||
)
|
||||
diag["websocket_state"] = gateway.api.websocket.state
|
||||
diag["websocket_state"] = (
|
||||
gateway.api.websocket.state if gateway.api.websocket else "Unknown"
|
||||
)
|
||||
diag["deconz_ids"] = gateway.deconz_ids
|
||||
diag["entities"] = gateway.entities
|
||||
diag["events"] = {
|
||||
|
|
Loading…
Reference in New Issue