コード例 #1
0
ファイル: light.py プロジェクト: arsaboo/home-assistant
    def light_update(event):
        """Handle light updates from the RFXtrx gateway."""
        if not isinstance(event.device, rfxtrxmod.LightingDevice) or \
                not event.device.known_to_be_dimmable:
            return

        new_device = rfxtrx.get_new_device(event, config, RfxtrxLight)
        if new_device:
            add_entities([new_device])

        rfxtrx.apply_received_command(event)
コード例 #2
0
ファイル: light.py プロジェクト: fabiandevia/home
    def light_update(event):
        """Handle light updates from the RFXtrx gateway."""
        if not isinstance(event.device, rfxtrxmod.LightingDevice) or \
                not event.device.known_to_be_dimmable:
            return

        new_device = rfxtrx.get_new_device(event, config, RfxtrxLight)
        if new_device:
            add_entities([new_device])

        rfxtrx.apply_received_command(event)
コード例 #3
0
ファイル: rfxtrx.py プロジェクト: 1lann/home-assistant
    def switch_update(event):
        """Callback for sensor updates from the RFXtrx gateway."""
        if not isinstance(event.device, rfxtrxmod.LightingDevice) or \
                event.device.known_to_be_dimmable:
            return

        new_device = rfxtrx.get_new_device(event, config, RfxtrxSwitch)
        if new_device:
            add_devices_callback([new_device])

        rfxtrx.apply_received_command(event)
コード例 #4
0
    def switch_update(event):
        """Callback for sensor updates from the RFXtrx gateway."""
        if not isinstance(event.device, rfxtrxmod.LightingDevice) or \
                event.device.known_to_be_dimmable:
            return

        new_device = rfxtrx.get_new_device(event, config, RfxtrxSwitch)
        if new_device:
            add_devices_callback([new_device])

        rfxtrx.apply_received_command(event)
コード例 #5
0
    def cover_update(event):
        """Handle cover updates from the RFXtrx gateway."""
        if not isinstance(event.device, rfxtrxmod.LightingDevice) or \
                event.device.known_to_be_dimmable or \
                not event.device.known_to_be_rollershutter:
            return

        new_device = rfxtrx.get_new_device(event, config, RfxtrxCover)
        if new_device:
            add_entities([new_device])

        rfxtrx.apply_received_command(event)
コード例 #6
0
ファイル: rfxtrx.py プロジェクト: 12-hak/hak-assistant
    def rollershutter_update(event):
        """Callback for roller shutter updates from the RFXtrx gateway."""
        if not isinstance(event.device, rfxtrxmod.LightingDevice) or \
                event.device.known_to_be_dimmable or \
                not event.device.known_to_be_rollershutter:
            return

        new_device = rfxtrx.get_new_device(event, config, RfxtrxRollershutter)
        if new_device:
            add_devices_callback([new_device])

        rfxtrx.apply_received_command(event)
コード例 #7
0
ファイル: switch.py プロジェクト: pedrolamas/home-assistant
    def switch_update(event):
        """Handle sensor updates from the RFXtrx gateway."""
        if (not isinstance(event.device, rfxtrxmod.LightingDevice)
                or event.device.known_to_be_dimmable
                or event.device.known_to_be_rollershutter):
            return

        new_device = rfxtrx.get_new_device(event, config, RfxtrxSwitch)
        if new_device:
            add_entities_callback([new_device])

        rfxtrx.apply_received_command(event)