Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: "shelly-uni"
- esp8266:
- board: esp01_1m
- # Enable logging
- logger:
- # Enable Home Assistant API
- api:
- ota:
- wifi:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- ssid: "Esphome-Web-77B1F3"
- password: "hpJ8BSn4hHVO"
- captive_portal:
- #----Wifi Sensor----
- sensor:
- - platform: wifi_signal
- name: "WiFi Signal Sensor"
- update_interval: 60s
- #----Pinout----
- # GPIO00 Led_i 1
- # GPIO04 Relay 2
- # GPIO05 AM2301
- # GPIO12 Switch_n 1
- # GPIO13 Switch_n 2
- # GPIO14 Switch_n 3
- # GPIO15 Relay 1
- # GPIO17 ADC Range 1
- #----Output-----
- switch:
- #----Relay_01----
- - platform: gpio
- name: "Relay_15"
- id: relay_15
- pin:
- number: GPIO15
- inverted: true
- #----Relay_02----
- - platform: gpio
- name: "Relay_04"
- id: relay_04
- pin:
- number: GPIO04
- inverted: true
- #----Led----
- - platform: gpio
- name: "Némítás"
- id: relay_00
- icon: mdi:volume-off
- pin:
- number: GPIO00
- inverted: true
- on_turn_on:
- - switch.turn_on: relay_04
- on_turn_off:
- - switch.turn_off: relay_04
- #----Sensors----
- binary_sensor:
- #----Sensor_01 - //Orange// ----
- - platform: gpio
- pin:
- number: GPIO12
- mode:
- input: true
- id: sensor_01
- filters:
- - invert:
- name: "Csengetés"
- device_class: sound
- #----Sensor_02 - //Braun// ----
- - platform: gpio
- pin:
- number: GPIO13
- mode:
- input: true
- id: sensor_02
- filters:
- name: "Kagyló"
- on_press:
- then:
- if:
- condition:
- - switch.is_on: relay_00
- then:
- - switch.turn_off: relay_04
- on_release:
- then:
- if:
- condition:
- - switch.is_on: relay_00
- then:
- - switch.turn_on: relay_04
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement