SDL Mouse Wheel Sensor
The sdl sensor platform emulates a rotary encoder using the
mouse wheel on the host platform. It is intended for use with the sdl display
when designing and testing user interfaces (for example with LVGL) without a physical encoder.
Scrolling the mouse wheel up increments the sensor value; scrolling down decrements it. An
sdl display must be present in the configuration; the sensor attaches to it
via the sdl_id option.
# Example configuration entrysensor: - platform: sdl id: mouse_encoder name: "Mouse Wheel Encoder" min_value: 0 max_value: 100 wrap: trueConfiguration variables
Section titled “Configuration variables”- sdl_id (Optional, ID): The ID of the
sdldisplay to attach this encoder to. Only required if more than onesdldisplay is configured. - min_value (Optional, int): The minimum value the encoder will report. Defaults to no lower limit.
- max_value (Optional, int): The maximum value the encoder will report. Must be greater than
min_value. Defaults to no upper limit. - wrap (Optional, boolean): When
true, the value wraps around frommax_valuetomin_value(and vice versa) instead of stopping at the limit. Requires bothmin_valueandmax_valueto be set to have any effect. Defaults totrue. - All other options from Sensor and the Rotary Encoder Sensor.