48 files
This commit is contained in:
@@ -38,13 +38,13 @@ class MideaSwitch(MideaEntity, ToggleEntity):
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
"""Return true if switch is on."""
|
||||
"""Whether the switch is on."""
|
||||
return cast("bool", self._device.get_attribute(self._entity_key))
|
||||
|
||||
def turn_on(self, **kwargs: Any) -> None: # noqa: ANN401, ARG002
|
||||
def turn_on(self, **kwargs: Any) -> None: # ruff:ignore[any-type, unused-method-argument]
|
||||
"""Turn on switch."""
|
||||
self._device.set_attribute(attr=self._entity_key, value=True)
|
||||
|
||||
def turn_off(self, **kwargs: Any) -> None: # noqa: ANN401, ARG002
|
||||
def turn_off(self, **kwargs: Any) -> None: # ruff:ignore[any-type, unused-method-argument]
|
||||
"""Turn off switch."""
|
||||
self._device.set_attribute(attr=self._entity_key, value=False)
|
||||
|
||||
Reference in New Issue
Block a user