I have a bit of an odd one here. I’ve included all relevant code below, but here’s the background. We have a small greenhouse in which I’ve put together an ESP8266 with two OLED 1306s and a BME380 to record temperature and humidity of the greenhouse. The issue is that the OLEDs are too bright at night and I need to turn them off. The OLEDs cycle between two pages - the current value and a graph view.
According to this thread we can’t ‘turn off’ the screens, but can create a blank page which should minimize any light coming from them.
Currently, I just have this interval for the screens:
interval:
- interval: 5s
then:
- display.page.show_next: screen1
- component.update: screen1
- interval: 5s
then:
- display.page.show_next: screen2
- component.update: screen2
This works great and as expected. So now I’m thinking I’ll add time + on_time > cron automation. What I currently have is below. page3 is the “blank page”. Pages 1 and 2 are the value and graph, respectively
time:
- platform: homeassistant
id: homeassistant_time
on_time:
- cron: '0 22 * * * *'
then:
- display.page.show: s2page3
- component.update: screen2
- display.page.show: s1page3
- component.update: screen1
- cron: '0 6 * * * *'
then:
- display.page.show: s2page1
- component.update: screen2
- display.page.show: s1page2
- component.update: screen1
However, I can’t seem to add time or interval after the then in cron. So even if the cron works, the interval will kick back in after 30 seconds and turn the screens back on. I thought maybe I could nest crons… but nope.
My next thought is to use a lambda, but that’s my weakest skill in ESPHome, so it is still very much a work in progress.
Curious if anyone has faced a similar situation and if they have any suggestions? Thanks in advance!