summaryrefslogtreecommitdiffstats
path: root/esphome/config/tvlight.yaml
blob: 1aea51a7967a990b35ba468fd70a5c78e905edce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
esphome:
  name: tvlight
  platform: ESP8266
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: !secret api_encryption_key

# OTA
ota:
  password: !secret ota_password

# WiFi Credentials
wifi:
  domain: .lan
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Tvlight Fallback Hotspot"
    password: !secret wifi_ap_password

captive_portal:

light:
  - id: tvlight
    platform: monochromatic
    name: "TV"
    output: dimmer_tvlight
    default_transition_length: 1.5s
    gamma_correct: 0
    restore_mode: RESTORE_AND_OFF

  - id: wled
    platform: binary
    name: "WLED"
    output: relay_wled
    restore_mode: ALWAYS_OFF

output:
  - id: dimmer_tvlight
    platform: esp8266_pwm
    pin: 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

  - id: relay_wled
    platform: gpio
    pin: D1

power_supply:
  - id: relay_tvlight
    pin: D2
    #enable_time: 3s
    keep_on_time: 20ms