RawValue - Send and receive raw values over KNX
Overview
RawValue devices send uint values to the KNX bus. Received values update the devices state. Optionally the current state can be read from the KNX bus.
Interface
xknxis the XKNX object.nameis the name of the object.payload_lengthis the appended byte size to a CEMI-Frame.0for DPT 1, 2 and 3.group_addressis the KNX group address of the raw value device. Used for sending.group_address_stateis the KNX group address of the raw value device.respond_to_readifTrueGroupValueRead requests to thegroup_addressare answered. Defaults toFalsesync_statedefines if and how often the value should be actively read from the bus. IfFalseno GroupValueRead telegrams will be sent to its group address. Defaults toTruealways_callbackdefines if a callback shall be triggered for consecutive GroupValueWrite telegrams with same payload. Defaults toFalsedevice_updated_cbCallback for each update.
Example
value = RawValue(
    xknx=xknx,
    name='Raw',
    payload_length=2,
    group_address='6/2/1',
    respond_to_read=True,
)
xknx.devices.async_add(value)
# Set a value without sending to the bus
value.remote_value.value = 23.0
# Send a new value to the bus
await value.set(24.0)
# Returns the value of in a human readable way
value.resolve_state()
# Returns the last received telegram or None
value.last_telegram