-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathesp-lights-neon-base-v2.yaml
129 lines (122 loc) · 2.63 KB
/
esp-lights-neon-base-v2.yaml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
esp32:
board: esp32dev
framework:
type: arduino
ota:
on_begin:
then:
- switch.turn_off: neon_enable
- light.turn_off: neon_light_dac
status_led:
pin:
number: GPIO5
inverted: true
# remote_receiver:
# id: ir_rx
# dump: nec
# pin:
# inverted: true
# number: GPIO36
# on_nec:
# then:
# lambda: |-
# if (x.command == 0xBF40) {
# auto call1 = id(printer_led_lights).toggle();
# auto call2 = id(filament_led_lights).toggle();
# call1.perform();
# call2.perform();
# }
binary_sensor:
- platform: gpio
id: down_button
pin:
number: GPIO0
inverted: true
mode:
input: true
pullup: true
on_click:
min_length: 50ms
max_length: 500ms
then:
- light.turn_off:
id: neon_light_dac
transition_length: 0s
- light.turn_off:
id: neon_light_pwm
transition_length: 0s
- platform: gpio
id: up_button
pin:
number: GPIO2
inverted: true
mode:
input: true
pullup: true
on_click:
min_length: 50ms
max_length: 500ms
then:
- light.turn_on:
id: neon_light_dac
brightness: 1.0
transition_length: 0s
# - light.turn_on:
# id: neon_light_pwm
# brightness: 1.0
# transition_length: 0s
- platform: gpio
name: Fault
id: fault_sensor
pin:
number: GPIO34
inverted: true
# - platform: remote_receiver
# id: led_remote_power
# # name: "LED Remote Power"
# nec:
# address: 0x00FF
# command: 0xBF40
# on_press:
# then:
# - light.toggle: printer_led_lights
# - light.toggle: filament_led_lights
switch:
- platform: gpio
id: neon_enable
# name: Enable
restore_mode: ALWAYS_OFF
pin:
number: 27
mode: OUTPUT
light:
- platform: monochromatic
id: neon_light_dac
name: none
# name: DAC
restore_mode: ALWAYS_OFF
output: neon_dac_output
on_turn_off:
- switch.turn_off: neon_enable
on_turn_on:
- switch.turn_on: neon_enable
- platform: monochromatic
id: neon_light_pwm
# name: PWM
restore_mode: ALWAYS_OFF
output: neon_pwm_output
on_turn_off:
- switch.turn_off: neon_enable
on_turn_on:
- switch.turn_on: neon_enable
output:
- platform: esp32_dac
pin: 25
id: neon_dac_output
min_power: ${dac_min_power}
max_power: ${dac_max_power}
zero_means_zero: true
- platform: ledc
id: neon_pwm_output
pin: 26
frequency: 330Hz