1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 22:53:59 +00:00

Add the display.is_displaying_page condition (#1646)

* display: add the display.is_displaying_page condition

* use maybe_simple_value for page_id

* add test
This commit is contained in:
Stanislav Meduna
2021-04-03 04:00:41 +02:00
committed by GitHub
parent 9e23987db8
commit 808e3be324
3 changed files with 45 additions and 1 deletions

View File

@@ -1760,6 +1760,13 @@ interval:
btn_left_state = ((uint32_t) id(btn_left)->get_value() + 63 * (uint32_t)btn_left_state) >> 6;
id(btn_left)->set_threshold(btn_left_state * 0.9);
- if:
condition:
display.is_displaying_page:
id: display1
page_id: page1
then:
- logger.log: 'Seeing page 1'
color:
- id: kbx_red