Replace 'vendor_id' with 'arch' (fixes #7003) (#7023)

This commit is contained in:
Fabian Affolter 2017-04-10 18:43:40 +02:00 committed by GitHub
parent d081e5ab3a
commit 89e8e1a4c7

View file

@ -19,7 +19,7 @@ _LOGGER = logging.getLogger(__name__)
ATTR_BRAND = 'Brand'
ATTR_HZ = 'GHz Advertised'
ATTR_VENDOR = 'Vendor ID'
ATTR_ARCH = 'arch'
DEFAULT_NAME = 'CPU speed'
ICON = 'mdi:pulse'
@ -67,7 +67,7 @@ class CpuSpeedSensor(Entity):
"""Return the state attributes."""
if self.info is not None:
return {
ATTR_VENDOR: self.info['vendor_id'],
ATTR_ARCH: self.info['arch'],
ATTR_BRAND: self.info['brand'],
ATTR_HZ: round(self.info['hz_advertised_raw'][0]/10**9, 2)
}