Exemplo n.º 1
0
    def __init__(self, device):
        """Initialize the light."""
        self._name = device["name"]
        self._dimmable = device["dimmable"]
        self._channel = device["channel"]
        self._brightness = None
        self._last_brightness = 255
        self._state = None

        if device["driver"] == CONF_DRIVER_FNIP6X10AD:
            self._light = pyfnip.FNIP6x2adOutput(device["host"],
                                                 device["port"], self._channel)
        if device["driver"] == CONF_DRIVER_FNIP8X10A:
            self._light = pyfnip.FNIP8x10aOutput(device["host"],
                                                 device["port"], self._channel)
Exemplo n.º 2
0
    def __init__(self, device):
        """Initialize the light."""
        import pyfnip

        self._name = device['name']
        self._dimmable = device['dimmable']
        self._channel = device['channel']
        self._brightness = None
        self._last_brightness = 255
        self._state = None

        if device['driver'] == CONF_DRIVER_FNIP6X10AD:
            self._light = pyfnip.FNIP6x2adOutput(device['host'],
                                                 device['port'], self._channel)
        if device['driver'] == CONF_DRIVER_FNIP8X10A:
            self._light = pyfnip.FNIP8x10aOutput(device['host'],
                                                 device['port'], self._channel)