Updated exampl yaml files

This commit is contained in:
ElVit 2025-01-30 11:34:18 +01:00
parent 2544d8d630
commit 7718655cd2
2 changed files with 22 additions and 39 deletions

View File

@ -1,21 +1,12 @@
esphome:
name: maidsite-desk-controller # change this!
friendly_name: Maidsite Desk Controller # change this!
on_boot:
# don't touch if you don't know what you're doing!
priority: 0 # when mostly everything else is done
then:
- lambda: "id(my_desk).request_physical_limits();"
- delay: 0.1s # give controller a chance to handle the response before sending the next command
- lambda: "id(my_desk).request_limits();"
- delay: 0.1s
- lambda: "id(my_desk).request_settings();"
name: maidsite-desk
friendly_name: Maidsite Desk
external_components:
- source:
type: git
url: https://github.com/ElVit/esphome_components/
components: [ maidsite_desk_controller ]
components: [ maidsite_desk ]
uart:
- id: uart_bus
@ -23,15 +14,16 @@ uart:
rx_pin: $pin_rx
baud_rate: 9600
# see full example for more options: https://github.com/Rocka84/esphome_components/blob/master/components/maidsite_desk_controller/example_full.yaml
maidsite_desk_controller:
id: my_desk
sensors:
sensor:
- platform: maidsite_desk
height_abs:
name: "Height"
buttons:
button:
- platform: maidsite_desk
stop:
name: "Stop"
step_up:
@ -51,7 +43,8 @@ maidsite_desk_controller:
goto_m4:
name: "Move to M4"
numbers:
number:
- platform: maidsite_desk
height_abs:
name: "Height"
mode: SLIDER

View File

@ -1,17 +1,6 @@
esphome:
name: maidsite-desk-controller
friendly_name: Maidsite Desk Controller
on_boot:
# This script is required to initialize the following sensors:
# height_pct, height_min, height_max, position_m1 - position_m4
# 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 # give controller a chance to handle the response before sending the next command
- lambda: "id(my_desk).request_limits();"
- delay: 0.1s
- lambda: "id(my_desk).request_settings();"
external_components:
- source:
@ -19,24 +8,20 @@ external_components:
path: esphome_components/components/
# type: git
# url: https://github.com/ElVit/esphome_components/
components: [ maidsite_desk_controller ]
components: [ maidsite_desk ]
uart:
- id: uart_bus
tx_pin: $pin_tx
rx_pin: $pin_rx
baud_rate: 9600
# debug:
# direction: BOTH
# after:
# bytes: 9
# sequence:
# - lambda: UARTDebug::log_hex(direction, bytes, ',');
maidsite_desk_controller:
id: my_desk
uart_id: uart_bus
sensors:
sensor:
- platform: maidsite_desk
height_abs:
name: "Height absolut"
height_pct:
@ -54,7 +39,8 @@ maidsite_desk_controller:
position_m4:
name: "Position M4"
buttons:
button:
- platform: maidsite_desk
stop:
name: "Stop"
step_up:
@ -82,7 +68,8 @@ maidsite_desk_controller:
save_m4:
name: "Save M4"
numbers:
number:
- platform: maidsite_desk
height_abs:
name: "Height absolut"
mode: SLIDER
@ -119,8 +106,11 @@ maidsite_desk_controller:
# the usual stuff
esp8266:
board: esp01_1m
esp32:
board: esp32-c3-devkitm-1
variant: ESP32C3
framework:
type: arduino
wifi:
ssid: !secret wifi_ssid