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
@@ -1,7 +1,7 @@
|
||||
"""Support for the myStrom buttons."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import DOMAIN, BinarySensorDevice
|
||||
from homeassistant.components.binary_sensor import DOMAIN, BinarySensorEntity
|
||||
from homeassistant.components.http import HomeAssistantView
|
||||
from homeassistant.const import HTTP_UNPROCESSABLE_ENTITY
|
||||
from homeassistant.core import callback
|
||||
@@ -59,7 +59,7 @@ class MyStromView(HomeAssistantView):
|
||||
self.buttons[entity_id].async_on_update(new_state)
|
||||
|
||||
|
||||
class MyStromBinarySensor(BinarySensorDevice):
|
||||
class MyStromBinarySensor(BinarySensorEntity):
|
||||
"""Representation of a myStrom button."""
|
||||
|
||||
def __init__(self, button_id):
|
||||
|
||||
Reference in new issue
Block a user