Hi fellow nerds!
I am tinkering with a TTGO-T board (2x buttons, PIR, Cam and Display) to make it a smart Doorbell.
I am almost done with everything and I am now trying to tweak it somewhat.
Question:
Looking for a way (template or not) to dim / light up the display based on the PIR motion. I cannot find anything in the documentation to do this.
Change the brightness
of the display.
EDIT: Solved! - lambda: id(doorbell_display).set_brightness(0.1);
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
brightness: 100%
rotation: 180
address: 0x3C
id: doorbell_display
binary_sensor:
- platform: gpio
pin: GPIO33
name: doorbell PIR
id: pir
device_class: motion
on_press:
then:
- lambda: id(doorbell_display).set_brightness(0.1);
- display.page.show: ding_page
- component.update: doorbell_display
- delay: 2s
- display.page.show: name_page
- component.update: doorbell_display
- delay: 60s
- lambda: id(doorbell_display).set_brightness(1.0);
All ideas are more than welcome! Now the display runs at full 100% brightness 24/7.