Source code for switchbot_utility.switchbot_contact_sensor

from .switchbot_motion_sensor import SwitchbotMotionSensor


[docs]class SwitchbotContactSensor(SwitchbotMotionSensor): """Switchbot Contact Sensor class""" def __init__(self, deviceId): """Constructor""" super().__init__(deviceId)
[docs] def get_open_state(self) -> dict: """Returns the open state of the sensor""" status = self.get_status() return status["openState"]