Use homeassistant.const instead of integration const for device_info ATTR_ (#53703)
This commit is contained in:
parent
4f96f05a75
commit
8ab3d9cc12
20 changed files with 66 additions and 90 deletions
|
@ -18,8 +18,11 @@ from homeassistant.const import (
|
|||
ATTR_BATTERY_LEVEL,
|
||||
ATTR_DEVICE_CLASS,
|
||||
ATTR_ENTITY_ID,
|
||||
ATTR_MANUFACTURER,
|
||||
ATTR_MODEL,
|
||||
ATTR_SERVICE,
|
||||
ATTR_SUPPORTED_FEATURES,
|
||||
ATTR_SW_VERSION,
|
||||
ATTR_UNIT_OF_MEASUREMENT,
|
||||
CONF_NAME,
|
||||
CONF_TYPE,
|
||||
|
@ -43,9 +46,6 @@ from homeassistant.util.decorator import Registry
|
|||
from .const import (
|
||||
ATTR_DISPLAY_NAME,
|
||||
ATTR_INTEGRATION,
|
||||
ATTR_MANUFACTURER,
|
||||
ATTR_MODEL,
|
||||
ATTR_SOFTWARE_VERSION,
|
||||
ATTR_VALUE,
|
||||
BRIDGE_MODEL,
|
||||
BRIDGE_SERIAL_NUMBER,
|
||||
|
@ -231,8 +231,8 @@ class HomeAccessory(Accessory):
|
|||
model = self.config[ATTR_MODEL]
|
||||
else:
|
||||
model = domain.title()
|
||||
if ATTR_SOFTWARE_VERSION in self.config:
|
||||
sw_version = format_sw_version(self.config[ATTR_SOFTWARE_VERSION])
|
||||
if ATTR_SW_VERSION in self.config:
|
||||
sw_version = format_sw_version(self.config[ATTR_SW_VERSION])
|
||||
else:
|
||||
sw_version = __version__
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue