48 files
This commit is contained in:
@@ -153,7 +153,7 @@ class MideaLight(MideaEntity, LightEntity):
|
||||
"""Midea Light effect."""
|
||||
return cast("str", self._device.get_attribute(X13Attributes.effect))
|
||||
|
||||
def turn_on(self, **kwargs: Any) -> None: # noqa: ANN401
|
||||
def turn_on(self, **kwargs: Any) -> None: # ruff:ignore[any-type]
|
||||
"""Midea Light turn on."""
|
||||
if not self.is_on:
|
||||
self._device.set_attribute(attr=X13Attributes.power, value=True)
|
||||
@@ -168,11 +168,11 @@ class MideaLight(MideaEntity, LightEntity):
|
||||
if key == ATTR_EFFECT:
|
||||
self._device.set_attribute(attr=X13Attributes.effect, value=value)
|
||||
|
||||
def turn_off(self, **kwargs: Any) -> None: # noqa: ANN401, ARG002
|
||||
def turn_off(self, **kwargs: Any) -> None: # ruff:ignore[any-type, unused-method-argument]
|
||||
"""Midea Light turn off."""
|
||||
self._device.set_attribute(attr=X13Attributes.power, value=False)
|
||||
|
||||
def update_state(self, status: Any) -> None: # noqa: ANN401,ARG002
|
||||
def update_state(self, status: Any) -> None: # ruff:ignore[any-type, unused-method-argument]
|
||||
"""Midea Light update state."""
|
||||
if not self.hass:
|
||||
_LOGGER.warning(
|
||||
@@ -181,4 +181,4 @@ class MideaLight(MideaEntity, LightEntity):
|
||||
type(self),
|
||||
)
|
||||
return
|
||||
self.schedule_update_ha_state()
|
||||
self.schedule_update_if_running()
|
||||
|
||||
Reference in New Issue
Block a user