Fix CPUSpeed with missing info (#66339)
This commit is contained in:
parent
8ff987d90c
commit
2f220b27d4
2 changed files with 24 additions and 2 deletions
|
@ -81,8 +81,8 @@ class CPUSpeedSensor(SensorEntity):
|
|||
|
||||
if info:
|
||||
self._attr_extra_state_attributes = {
|
||||
ATTR_ARCH: info["arch_string_raw"],
|
||||
ATTR_BRAND: info["brand_raw"],
|
||||
ATTR_ARCH: info.get("arch_string_raw"),
|
||||
ATTR_BRAND: info.get("brand_raw"),
|
||||
}
|
||||
if HZ_ADVERTISED in info:
|
||||
self._attr_extra_state_attributes[ATTR_HZ] = round(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue