jiecang_desk_controller: revisited example

This commit is contained in:
Rocka84
2024-01-09 18:32:56 +01:00
parent 113a6c3e11
commit b233989908
2 changed files with 52 additions and 34 deletions

View File

@@ -58,11 +58,19 @@ TX | RX
## Usage
```yaml
uart:
id: uart_bus
tx_pin: TX
rx_pin: RX
baud_rate: 9600
esphome:
...
on_boot:
# This script is required to initialize the following sensors:
# height_pct, height_min, height_max, position1 - position4
# You can skip this if you don't use those.
priority: 0 # when mostly everything else is done
then:
- lambda: "id(my_desk).request_physical_limits();"
- delay: 0.1s
- lambda: "id(my_desk).request_limits();"
- delay: 0.1s
- lambda: "id(my_desk).request_settings();"
external_components:
- source:
@@ -70,6 +78,15 @@ external_components:
url: https://github.com/Rocka84/esphome_components/
components: [ jiecang_desk_controller ]
uart:
id: uart_bus
tx_pin: TX
rx_pin: RX
baud_rate: 9600
logger:
baud_rate: 0 # disable logging over uart, required when using the RX/TX pins for the controller
jiecang_desk_controller:
id: my_desk
sensors: