1 """Platform for cover integration."""
3 from __future__
import annotations
15 from .
import DevoloHomeControlConfigEntry
16 from .devolo_multi_level_switch
import DevoloMultiLevelSwitchDeviceEntity
21 entry: DevoloHomeControlConfigEntry,
22 async_add_entities: AddEntitiesCallback,
24 """Get all cover devices and setup them via config entry."""
29 device_instance=device,
30 element_uid=multi_level_switch,
32 for gateway
in entry.runtime_data
33 for device
in gateway.multi_level_switch_devices
34 for multi_level_switch
in device.multi_level_switch_property
35 if multi_level_switch.startswith(
"devolo.Blinds")
40 """Representation of a cover device within devolo Home Control."""
42 _attr_supported_features = (
43 CoverEntityFeature.OPEN
44 | CoverEntityFeature.CLOSE
45 | CoverEntityFeature.SET_POSITION
47 _attr_device_class = CoverDeviceClass.BLIND
51 """Return the current position. 0 is closed. 100 is open."""
56 """Return if the blind is closed or not."""
64 """Close the blind."""
68 """Set the blind to the given position."""
None open_cover(self, **Any kwargs)
None close_cover(self, **Any kwargs)
None set_cover_position(self, **Any kwargs)
_multi_level_switch_property
None async_setup_entry(HomeAssistant hass, DevoloHomeControlConfigEntry entry, AddEntitiesCallback async_add_entities)