NumericValue devices send values to the KNX bus. Received values update the devices state. Optionally the current state can be read from the KNX bus.
xknxis the XKNX object.
nameis the name of the object.
group_addressis the KNX group address of the numeric value device. Used for sending.
group_address_stateis the KNX group address of the numeric value device.
TrueGroupValueRead requests to the
group_addressare answered. Defaults to
sync_statedefines if and how often the value should be actively read from the bus. If
Falseno GroupValueRead telegrams will be sent to its group address. Defaults to
value_typecontrols how the value should be encoded / decoded. The attribute may have may have parseable value types representing numeric values.
always_callbackdefines if a callback shall be triggered for consecutive GroupValueWrite telegrams with same payload. Defaults to
device_updated_cbawaitable callback for each update.
value = NumericValue(
# Set a value without sending to the bus
value.sensor_value.value = 23.0
# Send a new value to the bus
# Returns the value of in a human readable way
# Returns the unit of the value as string
# Returns the last received telegram or None