mirror of
https://code.hackerspace.pl/gro/elevator-control.git
synced 2024-11-22 04:13:44 +00:00
Add configuration for esphome
This commit is contained in:
commit
46166eaa2f
65
hs-elevator.yaml
Normal file
65
hs-elevator.yaml
Normal file
@ -0,0 +1,65 @@
|
||||
esphome:
|
||||
name: hs-elevator
|
||||
friendly_name: hs-elevator
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: arduino
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
uart:
|
||||
tx_pin: 1
|
||||
rx_pin: 3
|
||||
baud_rate: 9600
|
||||
|
||||
dfplayer:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 25
|
||||
id: button
|
||||
on_click:
|
||||
then:
|
||||
- switch.toggle: light_relay
|
||||
- platform: gpio
|
||||
id: lock_status
|
||||
pin: 14
|
||||
on_release:
|
||||
then:
|
||||
- switch.turn_on: fan_relay
|
||||
- delay: 5min
|
||||
- if:
|
||||
condition:
|
||||
- binary_sensor.is_off: lock_status
|
||||
then:
|
||||
- switch.turn_off: fan_relay
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: light_relay
|
||||
pin: 26
|
||||
on_turn_on:
|
||||
then:
|
||||
- dfplayer.play_folder:
|
||||
folder: 1
|
||||
loop: true
|
||||
- switch.turn_off: down_led
|
||||
- switch.turn_on: up_led
|
||||
on_turn_off:
|
||||
then:
|
||||
- dfplayer.stop
|
||||
- switch.turn_off: up_led
|
||||
- switch.turn_on: down_led
|
||||
- platform: gpio
|
||||
id: fan_relay
|
||||
pin: 27
|
||||
- platform: gpio
|
||||
id: up_led
|
||||
pin: 32
|
||||
- platform: gpio
|
||||
id: down_led
|
||||
pin: 33
|
||||
|
Loading…
Reference in New Issue
Block a user