1 """Support for Lutron Caseta shades."""
8 DOMAIN
as COVER_DOMAIN,
16 from .entity
import LutronCasetaUpdatableEntity
17 from .models
import LutronCasetaConfigEntry
21 """Representation of a Lutron shade with open/close functionality."""
23 _attr_supported_features = (
24 CoverEntityFeature.OPEN
25 | CoverEntityFeature.CLOSE
26 | CoverEntityFeature.STOP
27 | CoverEntityFeature.SET_POSITION
29 _attr_device_class = CoverDeviceClass.SHADE
33 """Return if the cover is closed."""
38 """Return the current position of cover."""
42 """Close the cover."""
58 """Move the shade to a specific position."""
63 """Representation of a Lutron tilt only blind."""
65 _attr_supported_features = (
66 CoverEntityFeature.OPEN_TILT
67 | CoverEntityFeature.CLOSE_TILT
68 | CoverEntityFeature.SET_TILT_POSITION
69 | CoverEntityFeature.OPEN_TILT
71 _attr_device_class = CoverDeviceClass.BLIND
75 """Return if the blind is closed, either at position 0 or 100."""
80 """Return the current tilt position of blind."""
84 """Close the blind."""
96 """Move the blind to a specific tilt."""
100 PYLUTRON_TYPE_TO_CLASSES = {
101 "SerenaTiltOnlyWoodBlind": LutronCasetaTiltOnlyBlind,
102 "SerenaHoneycombShade": LutronCasetaShade,
103 "SerenaRollerShade": LutronCasetaShade,
104 "TriathlonHoneycombShade": LutronCasetaShade,
105 "TriathlonRollerShade": LutronCasetaShade,
106 "QsWirelessShade": LutronCasetaShade,
107 "QsWirelessHorizontalSheerBlind": LutronCasetaShade,
108 "Shade": LutronCasetaShade,
109 "PalladiomWireFreeShade": LutronCasetaShade,
115 config_entry: LutronCasetaConfigEntry,
116 async_add_entities: AddEntitiesCallback,
118 """Set up the Lutron Caseta cover platform.
120 Adds shades from the Caseta bridge associated with the config_entry as
123 data = config_entry.runtime_data
125 cover_devices = bridge.get_devices_by_domain(COVER_DOMAIN)
128 PYLUTRON_TYPE_TO_CLASSES.get(cover_device[
"type"], LutronCasetaShade)(
131 for cover_device
in cover_devices
current_cover_tilt_position
None stop_cover(self, **Any kwargs)
None async_open_cover(self, **Any kwargs)
None async_close_cover(self, **Any kwargs)
None async_set_cover_position(self, **Any kwargs)
None async_stop_cover(self, **Any kwargs)
None async_set_cover_tilt_position(self, **Any kwargs)
None async_close_cover_tilt(self, **Any kwargs)
None async_open_cover_tilt(self, **Any kwargs)
None async_write_ha_state(self)
None async_setup_entry(HomeAssistant hass, LutronCasetaConfigEntry config_entry, AddEntitiesCallback async_add_entities)