add esphome display notes
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
- [light](#light)
|
- [light](#light)
|
||||||
- [binary sensor](#binary-sensor)
|
- [binary sensor](#binary-sensor)
|
||||||
- [lambda](#lambda)
|
- [lambda](#lambda)
|
||||||
|
- [Display](#display)
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
@@ -177,3 +178,72 @@ assist_pipeline:
|
|||||||
> you call any of ESPHome’s many APIs directly. For example, here we’re
|
> you call any of ESPHome’s many APIs directly. For example, here we’re
|
||||||
> retrieving the current state of the end stop using .state and using it to
|
> retrieving the current state of the end stop using .state and using it to
|
||||||
> construct our cover state.
|
> construct our cover state.
|
||||||
|
|
||||||
|
### Display
|
||||||
|
|
||||||
|
Display pages
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
display:
|
||||||
|
- platform: st7735
|
||||||
|
spi_id: spi_lcd
|
||||||
|
model: "INITR_MINI160X80"
|
||||||
|
reset_pin: GPIO1
|
||||||
|
cs_pin: GPIO4
|
||||||
|
dc_pin: GPIO2
|
||||||
|
rotation: 270
|
||||||
|
device_width: 82
|
||||||
|
device_height: 161
|
||||||
|
col_start: 0
|
||||||
|
row_start: 0
|
||||||
|
eight_bit_color: true
|
||||||
|
invert_colors: true
|
||||||
|
use_bgr: true
|
||||||
|
auto_clear_enabled: true
|
||||||
|
id: my_display
|
||||||
|
pages:
|
||||||
|
- id: page1
|
||||||
|
lambda: |-
|
||||||
|
it.print(0, 10, id(font_roboto), "Connecting to");
|
||||||
|
it.print(0, 30, id(font_roboto), "Home Assistant...");
|
||||||
|
- id: page2
|
||||||
|
lambda: |-
|
||||||
|
it.print(0, 10, id(font_roboto), "Configuring");
|
||||||
|
it.print(0, 30, id(font_roboto), "sensors...");
|
||||||
|
- id: page3
|
||||||
|
lambda: |-
|
||||||
|
it.print(0, 10, id(font_roboto), "Loading");
|
||||||
|
it.print(0, 30, id(font_roboto), "important");
|
||||||
|
it.print(0, 50, id(font_roboto), "update...");
|
||||||
|
- id: page4
|
||||||
|
lambda: |-
|
||||||
|
it.image(0, 0, id(my_image), COLOR_OFF, COLOR_ON);
|
||||||
|
```
|
||||||
|
|
||||||
|
Switch pages
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
interval:
|
||||||
|
- interval: 5s
|
||||||
|
then:
|
||||||
|
- display.page.show_next: my_display
|
||||||
|
- component.update: my_display
|
||||||
|
```
|
||||||
|
|
||||||
|
Show an image
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
image:
|
||||||
|
- file: "test_tdongle_image.png"
|
||||||
|
type: RGB
|
||||||
|
id: my_image
|
||||||
|
```
|
||||||
|
|
||||||
|
Specify a font
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
font:
|
||||||
|
- file: "gfonts://Roboto"
|
||||||
|
id: font_roboto
|
||||||
|
size: 20
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user