summaryrefslogtreecommitdiffstats
path: root/esphome/config/tvlight.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'esphome/config/tvlight.yaml')
-rw-r--r--esphome/config/tvlight.yaml71
1 files changed, 58 insertions, 13 deletions
diff --git a/esphome/config/tvlight.yaml b/esphome/config/tvlight.yaml
index 9fa59f1..19e8c1c 100644
--- a/esphome/config/tvlight.yaml
+++ b/esphome/config/tvlight.yaml
@@ -1,5 +1,10 @@
1substitutions:
2 device_name: tvlight
3 friendly_name: "TV Light"
4
1esphome: 5esphome:
2 name: tvlight 6 name: ${device_name}
7 friendly_name: ${friendly_name}
3 8
4esp8266: 9esp8266:
5 board: d1_mini 10 board: d1_mini
@@ -27,42 +32,82 @@ wifi:
27 32
28 # Enable fallback hotspot (captive portal) in case wifi connection fails 33 # Enable fallback hotspot (captive portal) in case wifi connection fails
29 ap: 34 ap:
30 ssid: "Tvlight Fallback Hotspot" 35 ssid: "${device_name} Fallback Hotspot"
31 password: !secret wifi_ap_password 36 password: !secret wifi_ap_password
32 37
33captive_portal: 38captive_portal:
34 39
35light: 40light:
36 - id: tvlight 41 - platform: monochromatic
37 platform: monochromatic
38 name: "TV" 42 name: "TV"
39 output: dimmer_tvlight 43 output: dimmer_tvlight
40 default_transition_length: 1.5s 44 default_transition_length: 1.5s
41 gamma_correct: 0 45 gamma_correct: 0
42 restore_mode: RESTORE_AND_OFF 46 restore_mode: RESTORE_AND_OFF
43 47
44 - id: wled 48 - platform: binary
45 platform: binary
46 name: "WLED" 49 name: "WLED"
50 icon: "mdi:led-strip-variant"
47 output: relay_wled 51 output: relay_wled
48 restore_mode: ALWAYS_OFF 52 restore_mode: ALWAYS_OFF
49 53
50output: 54output:
51 - id: dimmer_tvlight 55 - platform: esp8266_pwm
52 platform: esp8266_pwm 56 id: dimmer_tvlight
53 pin: D5 57 pin: D5 # GPIO14
54 frequency: 1000 Hz 58 frequency: 1000 Hz
55 inverted: true 59 inverted: true
56 # lower 22% are not useable. use max_power because of inverted 60 # lower 22% are not useable. use max_power because of inverted
57 max_power: 0.78 61 max_power: 0.78
58 power_supply: relay_tvlight 62 power_supply: relay_tvlight
59 63
60 - id: relay_wled 64 - platform: gpio
61 platform: gpio 65 id: relay_wled
62 pin: D1 66 pin: D1 # GPIO5
67
68 - platform: gpio
69 id: unused_gpio0
70 pin:
71 number: D3 # GPIO0
72 mode: INPUT_PULLUP
73 - platform: gpio
74 id: unused_gpio1
75 pin:
76 number: TX # GPIO1
77 mode: INPUT_PULLUP
78 - platform: gpio
79 id: unused_gpio2
80 pin:
81 number: D4 # GPIO2
82 mode: INPUT_PULLUP
83 - platform: gpio
84 id: unused_gpio3
85 pin:
86 number: RX # GPIO3
87 mode: INPUT_PULLUP
88 - platform: gpio
89 id: unused_gpio12
90 pin:
91 number: D6 # GPIO12
92 mode: INPUT_PULLUP
93 - platform: gpio
94 id: unused_gpio13
95 pin:
96 number: D7 # GPIO13
97 mode: INPUT_PULLUP
98 - platform: gpio
99 id: unused_gpio15
100 pin:
101 number: D8 # GPIO15
102 mode: INPUT_PULLUP
103 - platform: gpio
104 id: unused_gpio16
105 pin:
106 number: D0 # GPIO16
107 mode: INPUT_PULLDOWN
63 108
64power_supply: 109power_supply:
65 - id: relay_tvlight 110 - id: relay_tvlight
66 pin: D2 111 pin: D2 # GPIO4
67 #enable_time: 3s 112 #enable_time: 3s
68 keep_on_time: 20ms 113 keep_on_time: 20ms