예제 #1
0
파일: light.py 프로젝트: OpenPeerPower/core
    def turn_off(self, **kwargs):
        """Turn the device off."""

        self._scsgate.append_task(ToggleStatusTask(target=self._scs_id, toggled=False))

        self._toggled = False
        self.schedule_update_op_state()
예제 #2
0
파일: switch.py 프로젝트: jbouwh/core
    def turn_on(self, **kwargs):
        """Turn the device on."""

        self._scsgate.append_task(ToggleStatusTask(target=self._scs_id, toggled=True))

        self._toggled = True
        self.schedule_update_ha_state()
예제 #3
0
    def turn_off(self, **kwargs):
        """Turn the device off."""
        from scsgate.tasks import ToggleStatusTask

        scsgate.SCSGATE.append_task(
            ToggleStatusTask(target=self._scs_id, toggled=False))

        self._toggled = False
        self.schedule_update_ha_state()
예제 #4
0
    def turn_on(self, **kwargs):
        """ Turn the device on. """
        from scsgate.tasks import ToggleStatusTask

        scsgate.SCSGATE.append_task(
            ToggleStatusTask(target=self._scs_id, toggled=True))

        self._toggled = True
        self.update_ha_state()