差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录 前一修订版 | |||
| developmentboard:esphome_smart_light_bulb [2024/12/18 14:40] – admin | developmentboard:esphome_smart_light_bulb [2024/12/18 14:41] (当前版本) – admin | ||
|---|---|---|---|
| 行 30: | 行 30: | ||
| **Yaml File:** | **Yaml File:** | ||
| - | |||
| - | Yaml File: | ||
| substitutions: | substitutions: | ||
| 行 103: | 行 101: | ||
| static int flag = 0; | static int flag = 0; | ||
| - | static ESPPreferenceObject pref = global_preferences->make_preference(23332500UL, | + | static ESPPreferenceObject pref = global_preferences→make_preference(23332500UL, |
| - | if((flag == 1) && (network:: | + | if((flag == 1) && (network:: |
| { | { | ||
| 行 127: | 行 125: | ||
| pref.save(& | pref.save(& | ||
| - | global_preferences->sync(); | + | global_preferences→sync(); |
| if(val >= 3){ | if(val >= 3){ | ||
| - | my_global_mode->value() = false; | + | my_global_mode→value() = false; |
| } | } | ||
| 行 145: | 行 143: | ||
| pref.save(& | pref.save(& | ||
| - | global_preferences->sync(); | + | global_preferences→sync(); |
| } | } | ||
| 行 151: | 行 149: | ||
| } | } | ||
| - | if(!my_global_mode->value()){ | + | if(!my_global_mode→value()){ |
| if(cnt == 1){ | if(cnt == 1){ | ||
| 行 159: | 行 157: | ||
| char b[] = " | char b[] = " | ||
| - | wifi_wificomponent->clear_sta(); | + | wifi_wificomponent→clear_sta(); |
| - | wifi_wificomponent->save_wifi_sta(a, | + | wifi_wificomponent→save_wifi_sta(a, |
| wifi:: | wifi:: | ||
| - | wifi_wificomponent->set_ap(wifi_wifiap); | + | wifi_wificomponent→set_ap(wifi_wifiap); |
| - | wifi_wificomponent->set_ap_timeout(5000); | + | wifi_wificomponent→set_ap_timeout(5000); |
| flag = 1; | flag = 1; | ||
| - | rgbww_rgbwwlightoutput->set_color_interlock(false); | + | rgbww_rgbwwlightoutput→set_color_interlock(false); |
| } | } | ||
| 行 233: | 行 231: | ||
| { | { | ||
| - | my_global_mode->value() = true; | + | my_global_mode→value() = true; |
| } | } | ||
| 行 334: | 行 332: | ||
| {{: | {{: | ||
| + | |||
| + | ---- | ||