ElVit-esphome_components/components/maidsite_desk_controller/example_basic.yaml

78 lines
1.6 KiB
YAML

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();"
external_components:
- source:
type: git
url: https://github.com/ElVit/esphome_components/
components: [ maidsite_desk_controller ]
uart:
- id: uart_bus
tx_pin: $pin_tx
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:
height_abs:
name: "Height"
buttons:
stop:
name: "Stop"
step_up:
name: "Step up"
step_down:
name: "Step down"
goto_max:
name: "Move to MAX"
goto_min:
name: "Move to MIN"
goto_m1:
name: "Move to M1"
goto_m2:
name: "Move to M2"
goto_m3:
name: "Move to M3"
goto_m4:
name: "Move to M4"
numbers:
height_abs:
name: "Height"
mode: SLIDER
# the usual stuff
esp8266:
board: esp01_1m
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "esphome-desk"
password: "9ebc6eac0b4e0e26b8d3b955ec660557"
captive_portal:
api:
encryption:
key: !secret encryption_key
ota:
logger: