mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix key error upon missing node (#14460)
* This is needed after gateway ready message generates an update while persistence is off, or while the gateway node hasn't been presented yet.
This commit is contained in:
parent
cf44b77225
commit
7562b4164b
@ -495,8 +495,9 @@ def gw_callback_factory(hass):
|
|||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"Node update: node %s child %s", msg.node_id, msg.child_id)
|
"Node update: node %s child %s", msg.node_id, msg.child_id)
|
||||||
|
|
||||||
child = msg.gateway.sensors[msg.node_id].children.get(msg.child_id)
|
try:
|
||||||
if child is None:
|
child = msg.gateway.sensors[msg.node_id].children[msg.child_id]
|
||||||
|
except KeyError:
|
||||||
_LOGGER.debug("Not a child update for node %s", msg.node_id)
|
_LOGGER.debug("Not a child update for node %s", msg.node_id)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user