The config files for my esphome devices
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
973 B

#SONOFF BASICR2
#https://www.banggood.com/SONOFF-BASICR2-10A-2200W-WIFI-Wireless-Smart-Switch-Remote-Control-Socket-APP-Timer-AC90-250V-50-or-60Hz-Works-with-Amazon-Alexa-Google-Home-Assistant-Nest-IFTTT-p-1019971.html?rmmds=myorder&cur_warehouse=CN
esphome:
name: bedroom_lamp
platform: ESP8266
board: esp8285
wifi:
ssid: !secret wifi-ssid
password: !secret wifi-password
logger:
api:
ota:
# Device Specific Config
light:
- platform: binary
id: lamp
name: "Bedroom Lamp"
output: gpio_12
output:
- platform: gpio
pin: GPIO12
id: gpio_12
binary_sensor:
- platform: gpio
id: push_button
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
internal: true
on_press:
# Prevents unintended LED lit states.
if:
condition:
- light.is_off: lamp
then:
#- light.turn_on: blue_led
- light.turn_on: lamp
else:
- light.turn_off: lamp