mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Add tradfri cover model to the cover entity attributes (#33674)
* Ikea Blind Battery * Ikea Blind Battery * Ikea Blind Battery * Ikea Blind Battery * IKEA Blinds Battery * IKEA Blinds Battery * Update cover.py * Clean up * Remove unused import Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
This commit is contained in:
parent
c651ce06c5
commit
f2fbe657c4
@ -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"
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user