Created
November 30, 2020 06:58
-
-
Save debsahu/0093a5196f66ebd48869f4825a72b6ca to your computer and use it in GitHub Desktop.
ESPHome settings for ESP32 that controls Deck LEDs
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: deck_lights | |
platform: ESP32 | |
board: lolin32 | |
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: "Deck Light 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 | |
output: | |
- platform: ledc | |
pin: GPIO19 | |
id: gpio_19 | |
frequency: 19531Hz | |
max_power: 0.75 | |
- platform: ledc | |
pin: GPIO21 | |
id: gpio_21 | |
frequency: 19531Hz | |
max_power: 0.6 | |
# Example usage in a light | |
light: | |
- platform: monochromatic | |
output: gpio_19 | |
name: "Deck Light" | |
default_transition_length: 3s | |
restore_mode: RESTORE_DEFAULT_ON | |
effects: | |
- strobe: | |
- flicker | |
- platform: monochromatic | |
output: gpio_21 | |
name: "Deck Stairs Light" | |
default_transition_length: 3s | |
restore_mode: RESTORE_DEFAULT_ON | |
effects: | |
- strobe: | |
- flicker | |
switch: | |
- platform: restart | |
name: "Deck lights Restart" | |
sensor: | |
- platform: adc | |
pin: 36 | |
name: "Deck Illuminance" | |
unit_of_measurement: lx | |
filters: | |
- sliding_window_moving_average: | |
window_size: 15 | |
send_every: 15 | |
- lambda: |- | |
return (x / 10000.0) * 2000000.0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment