54 lines
916 B
YAML
54 lines
916 B
YAML
esphome:
|
|
name: firstespmodule
|
|
|
|
esp32:
|
|
board: esp32dev
|
|
framework:
|
|
type: arduino
|
|
|
|
wifi:
|
|
ssid: "G-Emelet"
|
|
password: "19741226"
|
|
|
|
logger:
|
|
api:
|
|
ota:
|
|
platform: esphome
|
|
|
|
sensor:
|
|
- platform: dht
|
|
pin: GPIO4
|
|
model: DHT11
|
|
temperature:
|
|
name: "Room Temperature"
|
|
humidity:
|
|
name: "Room Humidity"
|
|
update_interval: 30s
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
pin: GPIO14
|
|
name: "Motion Detected"
|
|
device_class: motion
|
|
- platform: gpio
|
|
pin:
|
|
number: GPIO26
|
|
mode:
|
|
input: true
|
|
pullup: true
|
|
name: "Push Button"
|
|
on_press:
|
|
- output.turn_on: buzzer_output
|
|
- delay: 500ms
|
|
- output.turn_off: buzzer_output
|
|
|
|
switch:
|
|
- platform: gpio
|
|
pin: GPIO27 # safer pin for relay than GPIO12
|
|
name: "Relay Switch"
|
|
|
|
output:
|
|
- platform: ledc
|
|
pin: GPIO13
|
|
id: buzzer_output
|