config files on 14-12-2023 09:06:28
This commit is contained in:
66
esphome/sonofbasic-01.yaml
Normal file
66
esphome/sonofbasic-01.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
substitutions:
|
||||
device_name: "sonofbasic-01"
|
||||
friendly_name: "sonofbasic-01"
|
||||
comment: "esp8266"
|
||||
location: "Tuin"
|
||||
api_password: !secret SonofBasic-01_api
|
||||
ota_password: !secret ota_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
gateway: !secret ip_gateway
|
||||
subnet: !secret ip_subnet
|
||||
ip: !secret SonofBasic-01_ip
|
||||
pin_status: GPIO13
|
||||
pin_relay: GPIO12
|
||||
pin_button: GPIO0
|
||||
|
||||
# GPIO0 Button (inverted)
|
||||
# GPIO1 TX pin (C1 Pin 2)
|
||||
# GPIO3 RX pin (C1 Pin 3)
|
||||
# GPIO12 Relay
|
||||
# GPIO13 Green LED (inverted)
|
||||
# GPIO14 Optional Sensor (C1 Pin 5)
|
||||
|
||||
packages:
|
||||
board: !include boards/esp8266_sonofBasic.yaml
|
||||
device_base: !include common/common.yaml
|
||||
connection: !include common/wifi_noportal.yaml
|
||||
status: !include templates/status.yaml
|
||||
logger: !include templates/logger.yaml
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: ${pin_button}
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: true
|
||||
name: "Sonoff Basic Button"
|
||||
on_press:
|
||||
- light.toggle: lamp_relay
|
||||
|
||||
# switch:
|
||||
# - platform: gpio
|
||||
# name: "Sonoff Basic Relay"
|
||||
# pin: ${pin_relay}
|
||||
# id: relay
|
||||
# device_class: light
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: ${pin_relay}
|
||||
id: relay
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: "Sonoff Basic"
|
||||
output: relay
|
||||
id: lamp_relay
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
number: ${pin_status}
|
||||
inverted: yes
|
||||
Reference in New Issue
Block a user