from xknx import XKNX from xknx.devices import Light from xknx.dpt import DPTBinary xknx = XKNX() light = Light(xknx, name='Living Room Light', group_address_switch='1/0/1', group_address_brightness='1/0/2') light.set_on_off(DPTBinary(True)) # Turns on the light light.set_on_off(DPTBinary(False)) # Turns off the lightIn this example, the `group_address_switch` is the address for the switch state (on or off) of the light, and `group_address_brightness` is the address for controlling the brightness of the light (irrelevant for binary control). The `set_on_off` method takes a DPTBinary object as its argument, which is either True or False to turn the switch on or off. The package library for the xknx.dpt DPTBinary is the XKNX library.