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
1 changed files with 2 additions and 2 deletions
|
@ -228,10 +228,10 @@ class AsusWrtRouter:
|
|||
|
||||
# System
|
||||
model = await _get_nvram_info(self._api, "MODEL")
|
||||
if model:
|
||||
if model and "model" in model:
|
||||
self._model = model["model"]
|
||||
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']})"
|
||||
|
||||
# Load tracked entities from registry
|
||||
|
|
Loading…
Add table
Reference in a new issue