Created
October 24, 2020 03:26
-
-
Save debsahu/d5dc0914feeb9837e4da62acde0c1760 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: entryway_ceiling_light | |
platform: ESP8266 | |
board: esp8285 | |
#arduino_version: 2.4.2 | |
esp8266_restore_from_flash: true | |
wifi: | |
networks: | |
- ssid: !secret esphome_wifi_ssid1 | |
password: !secret esphome_wifi_pass1 | |
- ssid: !secret esphome_wifi_ssid2 | |
password: !secret esphome_wifi_pass2 | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "EntrywayCeiling Fallback Hotspot" | |
password: !secret esphome_fb_wifi_pass | |
web_server: | |
port: 80 | |
captive_portal: | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
password: !secret esphome_haapi_pass | |
ota: | |
password: !secret esphome_ota_pass | |
mqtt: | |
broker: !secret mqtt_broker | |
username: !secret mqttuser | |
password: !secret mqttpass | |
sun: | |
latitude: !secret esphome_lat | |
longitude: !secret esphome_long | |
on_sunrise: | |
- then: | |
- switch.turn_on: entryway_ceiling_switch | |
on_sunset: | |
- then: | |
- switch.turn_off: entryway_ceiling_switch | |
time: | |
- platform: homeassistant | |
id: homeassistant_time | |
text_sensor: | |
- platform: wifi_info | |
ip_address: | |
name: "Entryway Ceiling IP Address" | |
ssid: | |
name: "Entryway Ceiling Connected SSID" | |
bssid: | |
name: "Entryway Ceiling Connected BSSID" | |
output: | |
- platform: esp8266_pwm | |
pin: 13 | |
inverted: true | |
id: blue_led | |
binary_sensor: | |
- platform: gpio | |
id: sw_button | |
pin: 4 | |
on_press: | |
then: | |
- switch.toggle: entryway_ceiling_switch | |
- platform: gpio | |
id: internal_button | |
pin: | |
number: 0 | |
inverted: True | |
on_press: | |
then: | |
- switch.toggle: entryway_ceiling_switch | |
switch: | |
- platform: gpio | |
pin: GPIO12 | |
id: entryway_ceiling_switch | |
name: "Entryway Ceiling Switch" | |
restore_mode: ALWAYS_ON # Turn ON on startup | |
light: | |
- platform: monochromatic | |
output: blue_led | |
id: blue_led_light | |
name: "Entryway Ceiling Blue LED" | |
status_led: | |
pin: | |
number: GPIO13 | |
inverted: yes | |
sensor: | |
- platform: wifi_signal | |
name: "Entryway Ceiling WiFi Signal Sensor" | |
update_interval: 60s | |
- platform: uptime | |
name: "Entryway Ceiling Uptime Sensor" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment