Rename BinarySensorDevice to BinarySensorEntity (#34462)
* Rename BinarySensorDevice to BinarySensorEntity * Tweak * Move deprecation warning to __new__, add test * Move deprecation warning back to __init__ * Move deprecation warning to __init_subclass
This commit is contained in:
parent
0b64f49e3a
commit
b022e08db9
147 changed files with 371 additions and 352 deletions
|
@ -11,7 +11,7 @@ from homeassistant.components.binary_sensor import (
|
|||
DEVICE_CLASS_DOOR,
|
||||
DEVICE_CLASS_MOTION,
|
||||
DEVICE_CLASS_OCCUPANCY,
|
||||
BinarySensorDevice,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.event import async_track_point_in_utc_time
|
||||
|
@ -108,7 +108,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
async_add_entities(devices, True)
|
||||
|
||||
|
||||
class AugustDoorBinarySensor(AugustEntityMixin, BinarySensorDevice):
|
||||
class AugustDoorBinarySensor(AugustEntityMixin, BinarySensorEntity):
|
||||
"""Representation of an August Door binary sensor."""
|
||||
|
||||
def __init__(self, data, sensor_type, device):
|
||||
|
@ -155,7 +155,7 @@ class AugustDoorBinarySensor(AugustEntityMixin, BinarySensorDevice):
|
|||
return f"{self._device_id}_open"
|
||||
|
||||
|
||||
class AugustDoorbellBinarySensor(AugustEntityMixin, BinarySensorDevice):
|
||||
class AugustDoorbellBinarySensor(AugustEntityMixin, BinarySensorEntity):
|
||||
"""Representation of an August binary sensor."""
|
||||
|
||||
def __init__(self, data, sensor_type, device):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue