Letzter täglicher Build
Build erfolgreich
Zuletzt gebaut: 02.09.2026, 15:20
Build-Details & Log anzeigen
ambiance-pcb.png
171.2 KB

pcb-in-case.png
2085.1 KB
thumb.png
1754.1 KB
1esphome:
2 name: shys-ambiance-clone
3
4esp8266:
5 board: d1_mini
6
7wifi:
8 ssid: YOUR_WIFI_SSID
9 password: YOUR_WIFI_PASSWORD
10
11 reboot_timeout: 0s
12 output_power: 15dB
13
14 # Enable fallback hotspot (captive portal) in case wifi connection fails
15 ap:
16 ssid: "RGB Backlight"
17 password: "123456789"
18
19captive_portal:
20
21# Enable logging
22logger:
23
24# Enable Home Assistant API
25api:
26 encryption:
27 key: !secret api_encryption_key
28
29ota:
30 platform: esphome
31 password: !secret ota_password
32
33
34globals:
35 - id: currentColor
36 type: int
37 restore_value: yes
38 initial_value: "0"
39
40 - id: colorsRed
41 type: float[8]
42 initial_value: "{1,0,1,1,0,1,0.6,0}"
43
44 - id: colorsGreen
45 type: float[8]
46 initial_value: "{1,1,0,0,1,0.5,0,0}"
47
48 - id: colorsBlue
49 type: float[8]
50 initial_value: "{1,0,0,1,1,0.1,1,1}"
51
52binary_sensor:
53 - platform: gpio
54 pin: D5
55 name: "Power Button Ambience"
56 on_press:
57 then:
58 - light.toggle: hue_ambiance_clone_d1
59
60 - platform: gpio
61 pin: D6
62 name: "Color Button Ambience"
63
64 on_press:
65 then:
66 - lambda: |-
67 if(id(currentColor)>7){
68 id(currentColor) = 0;
69 } else {
70 id(currentColor) += 1;
71 }
72
73 - logger.log:
74 format: "The new color %1d is R: %2f G: %2f B: %2f"
75 args: [ 'id(currentColor)', 'id(colorsRed)[id(currentColor)]', 'id(colorsGreen)[id(currentColor)]', 'id(colorsBlue)[id(currentColor)]' ]
76
77 - if:
78 condition:
79 lambda: 'return id(currentColor) == 8;'
80 then:
81 - light.turn_on:
82 id: hue_ambiance_clone_d1
83
84 effect: "Rainbow"
85 else:
86 - light.turn_on:
87 id: hue_ambiance_clone_d1
88 effect: "None"
89 - light.turn_on:
90 id: hue_ambiance_clone_d1
91 transition_length: 2s
92 red: !lambda |-
93 return id(colorsRed)[id(currentColor)];
94 green: !lambda |-
95 return id(colorsGreen)[id(currentColor)];
96 blue: !lambda |-
97 return id(colorsBlue)[id(currentColor)];
98
99light:
100 - platform: neopixelbus
101 variant: WS2812
102 type: GRB
103 pin: D3
104 num_leds: 30
105 default_transition_length: 3s
106 name: "Hue Ambiance LED Lights"
107 id: hue_ambiance_clone_d1
108
109 effects:
110 - addressable_rainbow:
111 name: Rainbow
112 speed: 3
113 width: 100