substitutions: device_name: tvlight friendly_name: "TV Light" esphome: name: ${device_name} friendly_name: ${friendly_name} esp8266: board: d1_mini # Enable logging logger: # Enable Home Assistant API api: encryption: key: !secret api_encryption_key # OTA ota: - platform: esphome password: !secret ota_password # WiFi Credentials wifi: domain: .lan ssid: !secret wifi_ssid password: !secret wifi_password # see https://github.com/esphome/issues/issues/1532 power_save_mode: HIGH # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "${device_name} Fallback Hotspot" password: !secret wifi_ap_password captive_portal: light: - platform: monochromatic name: "TV" output: dimmer_tvlight default_transition_length: 1.5s gamma_correct: 0 restore_mode: RESTORE_AND_OFF - platform: binary name: "WLED" icon: "mdi:led-strip-variant" output: relay_wled restore_mode: ALWAYS_OFF output: - platform: esp8266_pwm id: dimmer_tvlight pin: GPIO14 # D5 frequency: 1000 Hz inverted: true # lower 22% are not useable. use max_power because of inverted max_power: 0.78 power_supply: relay_tvlight - platform: gpio id: relay_wled pin: GPIO5 # D1 - platform: gpio id: unused_gpio0 pin: number: GPIO0 # D3 mode: INPUT_PULLUP - platform: gpio id: unused_gpio1 pin: number: TX # GPIO1 mode: INPUT_PULLUP - platform: gpio id: unused_gpio2 pin: number: GPIO2 # D4 mode: INPUT_PULLUP - platform: gpio id: unused_gpio3 pin: number: RX # GPIO3 mode: INPUT_PULLUP - platform: gpio id: unused_gpio12 pin: number: GPIO12 # D6 mode: INPUT_PULLUP - platform: gpio id: unused_gpio13 pin: number: GPIO13 # D7 mode: INPUT_PULLUP - platform: gpio id: unused_gpio15 pin: number: GPIO15 # D8 mode: INPUT_PULLUP - platform: gpio id: unused_gpio16 pin: number: GPIO16 # D0 mode: INPUT_PULLDOWN power_supply: - id: relay_tvlight pin: GPIO4 # D2 #enable_time: 3s keep_on_time: 20ms