def sut(hass_mock, monkeypatch): c = LightController() c.args = {} c.delay = 0 c.light = {"name": "light"} c.on_hold = False monkeypatch.setattr(c, "get_entity_state", fake_async_function("0")) return c
async def sut_before_init(mocker: MockerFixture) -> LightController: controller = LightController() # type: ignore controller.args = {} mocker.patch.object(Controller, "init") return controller
async def sut(mocker: MockerFixture) -> LightController: controller = LightController() # type: ignore mocker.patch.object(Controller, "init") controller.args = {"light": ENTITY_NAME} await controller.init() return controller
def fake_type_controller() -> LightController: c = LightController() # type: ignore c.args = {} return c