Open casamarbar opened 2 years ago
Create an input_number helper entity in Home Assistant called lcd_brightness that stores a value between 0 and 100, and then add the following to your esphome config to set the backlight level when the value changes:
sensor:
- platform: axp192
id: backlight
…
- platform: homeassistant
id: brightness
entity_id: input_number.lcd_brightness
internal: true
on_value:
then:
lambda: |-
id(backlight).set_brightness(id(brightness).state/100.0);
id(backlight).update();
Thanks for your job It would be possible to add a sensor to be able to change the brightness from HA of the screen?