mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Use entity category in devolo Home Control (#59104)
* Use entity category * Add tests
This commit is contained in:
@@ -57,6 +57,16 @@ class BinarySensorMock(DeviceMock):
|
||||
self.binary_sensor_property = {"Test": BinarySensorPropertyMock()}
|
||||
|
||||
|
||||
class BinarySensorMockOverload(DeviceMock):
|
||||
"""devolo Home Control disabled binary sensor device mock."""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Initialize the mock."""
|
||||
super().__init__()
|
||||
self.binary_sensor_property = {"Overload": BinarySensorPropertyMock()}
|
||||
self.binary_sensor_property["Overload"].sensor_type = "overload"
|
||||
|
||||
|
||||
class RemoteControlMock(DeviceMock):
|
||||
"""devolo Home Control remote control device mock."""
|
||||
|
||||
@@ -90,12 +100,15 @@ class HomeControlMock(HomeControl):
|
||||
|
||||
|
||||
class HomeControlMockBinarySensor(HomeControlMock):
|
||||
"""devolo Home Control gateway mock with binary sensor device."""
|
||||
"""devolo Home Control gateway mock with binary sensor devices."""
|
||||
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
"""Initialize the mock."""
|
||||
super().__init__()
|
||||
self.devices = {"Test": BinarySensorMock()}
|
||||
self.devices = {
|
||||
"Test": BinarySensorMock(),
|
||||
"Overload": BinarySensorMockOverload(),
|
||||
}
|
||||
self.publisher = Publisher(self.devices.keys())
|
||||
self.publisher.unregister = MagicMock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user