diff --git a/homeassistant/components/tradfri/const.py b/homeassistant/components/tradfri/const.py index 88225d3282a..ffb5d64f6d7 100644 --- a/homeassistant/components/tradfri/const.py +++ b/homeassistant/components/tradfri/const.py @@ -9,6 +9,7 @@ ATTR_TRADFRI_GATEWAY = "Gateway" ATTR_TRADFRI_GATEWAY_MODEL = "E1526" ATTR_TRADFRI_MANUFACTURER = "IKEA of Sweden" ATTR_TRANSITION_TIME = "transition_time" +ATTR_MODEL = "model" CONF_ALLOW_TRADFRI_GROUPS = "allow_tradfri_groups" CONF_IDENTITY = "identity" CONF_IMPORT_GROUPS = "import_groups" diff --git a/homeassistant/components/tradfri/cover.py b/homeassistant/components/tradfri/cover.py index d978e512920..744ba2e13b1 100644 --- a/homeassistant/components/tradfri/cover.py +++ b/homeassistant/components/tradfri/cover.py @@ -3,7 +3,7 @@ from homeassistant.components.cover import ATTR_POSITION, CoverDevice from .base_class import TradfriBaseDevice -from .const import CONF_GATEWAY_ID, KEY_API, KEY_GATEWAY +from .const import ATTR_MODEL, CONF_GATEWAY_ID, KEY_API, KEY_GATEWAY async def async_setup_entry(hass, config_entry, async_add_entities): @@ -29,6 +29,12 @@ class TradfriCover(TradfriBaseDevice, CoverDevice): self._refresh(device) + @property + def device_state_attributes(self): + """Return the state attributes.""" + attr = {ATTR_MODEL: self._device.device_info.model_number} + return attr + @property def current_cover_position(self): """Return current position of cover.