Rename CoverDevice to CoverEntity (#34595)
This commit is contained in:
parent
6f7f5b4034
commit
8c5c963b96
53 changed files with 139 additions and 116 deletions
|
@ -1,7 +1,7 @@
|
|||
"""Support for Wink covers."""
|
||||
import pywink
|
||||
|
||||
from homeassistant.components.cover import ATTR_POSITION, CoverDevice
|
||||
from homeassistant.components.cover import ATTR_POSITION, CoverEntity
|
||||
|
||||
from . import DOMAIN, WinkDevice
|
||||
|
||||
|
@ -12,18 +12,18 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
for shade in pywink.get_shades():
|
||||
_id = shade.object_id() + shade.name()
|
||||
if _id not in hass.data[DOMAIN]["unique_ids"]:
|
||||
add_entities([WinkCoverDevice(shade, hass)])
|
||||
add_entities([WinkCoverEntity(shade, hass)])
|
||||
for shade in pywink.get_shade_groups():
|
||||
_id = shade.object_id() + shade.name()
|
||||
if _id not in hass.data[DOMAIN]["unique_ids"]:
|
||||
add_entities([WinkCoverDevice(shade, hass)])
|
||||
add_entities([WinkCoverEntity(shade, hass)])
|
||||
for door in pywink.get_garage_doors():
|
||||
_id = door.object_id() + door.name()
|
||||
if _id not in hass.data[DOMAIN]["unique_ids"]:
|
||||
add_entities([WinkCoverDevice(door, hass)])
|
||||
add_entities([WinkCoverEntity(door, hass)])
|
||||
|
||||
|
||||
class WinkCoverDevice(WinkDevice, CoverDevice):
|
||||
class WinkCoverEntity(WinkDevice, CoverEntity):
|
||||
"""Representation of a Wink cover device."""
|
||||
|
||||
async def async_added_to_hass(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue