Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
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)
Exemple #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)
Exemple #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)
Exemple #6
0
    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)
Exemple #7
0
    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)