hi, i use a wemos d1 mini and a ssd1306 oled display and i would like the oled display to rotate based on a tilt switch.
I have already tried the global function but esp-home fails to compile the program because it does not see the variable as an integer.
I also tried other things but nothing worked.
I wanted to make rotating the display it would change the page and rotate the text.
globals:
- id: rotation
type: int
initial_value: '0'
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
reset_pin: D0
address: 0x3C
rotation: id(rotation)
id: oled
pages:
- id: page1...
Sorry for my English