差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
developmentboard:esphome_smart_light_bulb [2024/11/30 02:02] admindevelopmentboard:esphome_smart_light_bulb [2024/12/18 14:41] (当前版本) admin
行 1: 行 1:
 ESPHome Smart Light Bulb ESPHome Smart Light Bulb
  
-Yaml File:+Introduction – Detected by Home Assistant
  
-Yaml File:+– Controlled by MQTT, Web UI, HTTP, etc 
 + 
 +– Using times, scripts, rules 
 + 
 +– Open source 
 + 
 +– Use ESP8285-2M as MCU 
 + 
 +Specification – RGB+C+W, 9W 
 + 
 +– 850LM 
 + 
 +– AC:100-265V, 50/60Hz 
 + 
 +– 2700-6500K 
 + 
 +– E26/E27 
 + 
 +– 60 x 60 x 125 mm 
 + 
 +– 40000 hours 
 + 
 +**GPIOs** 
 + 
 +GPIO4 – PWM1 – Cool WhiteGPIO5 – PWM4 – Blue ColorGPIO12 – PWM2 – Red Color GPIO13 – PWM5 – Warm WhiteGPIO14 – PWM3 – Green Color 
 + 
 +**Yaml File:**
  
 substitutions: substitutions:
行 75: 行 101:
 static int flag = 0; static int flag = 0;
  
-static ESPPreferenceObject pref = global_preferences->make_preference(23332500UL, true);+static ESPPreferenceObject pref = global_preferencesmake_preference(23332500UL, true);
  
-if((flag == 1) && (network::is_connected()))+if((flag == 1) && (network::is_connected( _FCKG_BLANK_TD_)) )
  
 { {
行 99: 行 125:
 pref.save(&val); pref.save(&val);
  
-global_preferences->sync();+global_preferencessync();
  
 if(val >= 3){ if(val >= 3){
  
-my_global_mode->value() = false;+my_global_modevalue() = false;
  
 } }
行 117: 行 143:
 pref.save(&val); pref.save(&val);
  
-global_preferences->sync();+global_preferencessync();
  
 } }
行 123: 行 149:
 } }
  
-if(!my_global_mode->value()){+if(!my_global_modevalue()){
  
 if(cnt == 1){ if(cnt == 1){
行 131: 行 157:
 char b[] = "000000"; char b[] = "000000";
  
-wifi_wificomponent->clear_sta();+wifi_wificomponentclear_sta();
  
-wifi_wificomponent->save_wifi_sta(a, b);+wifi_wificomponentsave_wifi_sta(a, b);
  
 wifi::WiFiAP wifi_wifiap = wifi::WiFiAP(); wifi::WiFiAP wifi_wifiap = wifi::WiFiAP();
  
-wifi_wificomponent->set_ap(wifi_wifiap);+wifi_wificomponentset_ap(wifi_wifiap);
  
-wifi_wificomponent->set_ap_timeout(5000);+wifi_wificomponentset_ap_timeout(5000);
  
 flag = 1; flag = 1;
  
-rgbww_rgbwwlightoutput->set_color_interlock(false);+rgbww_rgbwwlightoutputset_color_interlock(false);
  
 } }
行 205: 行 231:
 { {
  
-my_global_mode->value() = true;+my_global_modevalue() = true;
  
 } }
行 304: 行 330:
  
 disabled_by_default: true disabled_by_default: true
 +
 +{{:developmentboard:yaml.zip|yaml.zip}}
 +
 +----
  
  
  • developmentboard/esphome_smart_light_bulb.1732932158.txt.gz
  • 最后更改: 2024/11/30 02:02
  • admin