Пример #1
0
 def turn_off(self, **kwargs):
     """Instruct the switch to turn off."""
     import velbus
     message = velbus.SwitchRelayOffMessage()
     message.set_defaults(self._module)
     message.relay_channels = [self._channel]
     self._velbus.send(message)
Пример #2
0
    def turn_off(self, channel, callback=None):
        """
        Turn off switch.

        :return: None
        """
        if callback is None:

            def callb():
                """No-op"""
                pass

            callback = callb
        message = velbus.SwitchRelayOffMessage(self._address)
        message.relay_channels = [channel]
        self._controller.send(message, callback)
Пример #3
0
 def _relay_off(self, channel):
     import velbus
     message = velbus.SwitchRelayOffMessage()
     message.set_defaults(self._module)
     message.relay_channels = [channel]
     self._velbus.send(message)