Source code for switchbot_utility.switchbot_plug

from .onoff_mixin import OnOffMixin
from .switchbot_device import SwitchbotDevice


[docs]class SwitchbotPlug(SwitchbotDevice, OnOffMixin): """Switchbot Plug class""" def __init__(self, deviceId): """Constructor""" super().__init__(deviceId)
[docs] def get_power(self) -> str: """Returns device power status""" status = self.get_status() return status["power"]