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 integration
This commit is contained in:
parent
459d775ad5
commit
c920d7d5e0
1 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,9 @@ async def async_get_config_entry_diagnostics(
|
||||||
diag["deconz_config"] = async_redact_data(
|
diag["deconz_config"] = async_redact_data(
|
||||||
gateway.api.config.raw, REDACT_DECONZ_CONFIG
|
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["deconz_ids"] = gateway.deconz_ids
|
||||||
diag["entities"] = gateway.entities
|
diag["entities"] = gateway.entities
|
||||||
diag["events"] = {
|
diag["events"] = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue