mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
AsusWRT fix keyerror when firmver is missing from info (#51499)
Co-authored-by: Franck Nijhof <git@frenck.dev> Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
a3146ad150
commit
ab2951f124
@ -228,10 +228,10 @@ class AsusWrtRouter:
|
|||||||
|
|
||||||
# System
|
# System
|
||||||
model = await _get_nvram_info(self._api, "MODEL")
|
model = await _get_nvram_info(self._api, "MODEL")
|
||||||
if model:
|
if model and "model" in model:
|
||||||
self._model = model["model"]
|
self._model = model["model"]
|
||||||
firmware = await _get_nvram_info(self._api, "FIRMWARE")
|
firmware = await _get_nvram_info(self._api, "FIRMWARE")
|
||||||
if firmware:
|
if firmware and "firmver" in firmware and "buildno" in firmware:
|
||||||
self._sw_v = f"{firmware['firmver']} (build {firmware['buildno']})"
|
self._sw_v = f"{firmware['firmver']} (build {firmware['buildno']})"
|
||||||
|
|
||||||
# Load tracked entities from registry
|
# Load tracked entities from registry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user