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:
1 parent
0b64f49e3a
commit
b022e08db9
147 files changed
+371
-352
No files matched your search
@@ -2,7 +2,7 @@
|
||||
import voluptuous as vol
|
||||
from xknx.devices import BinarySensor
|
||||
|
||||
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
|
||||
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity
|
||||
from homeassistant.const import CONF_DEVICE_CLASS, CONF_NAME
|
||||
from homeassistant.core import callback
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@@ -102,7 +102,7 @@ def async_add_entities_config(hass, config, async_add_entities):
|
||||
async_add_entities([entity])
|
||||
|
||||
|
||||
class KNXBinarySensor(BinarySensorDevice):
|
||||
class KNXBinarySensor(BinarySensorEntity):
|
||||
"""Representation of a KNX binary sensor."""
|
||||
|
||||
def __init__(self, device):
|
||||
|
||||
Reference in new issue
Block a user