@@ -52,15 +52,57 @@ def load_config(self):
52
52
# updgrade config
53
53
if "homeassistant" not in config :
54
54
config ["homeassistant" ] = {"enabled" : False }
55
-
56
- if int (config ["swversion" ]) < 1950207110 :
57
- config ["swversion" ] = "1950207110"
55
+ if "yeelight" not in config :
56
+ config ["yeelight" ] = {"enabled" : True }
57
+ if "native_multi" not in config :
58
+ config ["native_multi" ] = {"enabled" : True }
59
+ if "tasmota" not in config :
60
+ config ["tasmota" ] = {"enabled" : True }
61
+ if "wled" not in config :
62
+ config ["wled" ] = {"enabled" : True }
63
+ if "shelly" not in config :
64
+ config ["shelly" ] = {"enabled" : True }
65
+ if "esphome" not in config :
66
+ config ["esphome" ] = {"enabled" : True }
67
+ if "hyperion" not in config :
68
+ config ["hyperion" ] = {"enabled" : True }
69
+ if "tpkasa" not in config :
70
+ config ["tpkasa" ] = {"enabled" : True }
71
+
72
+ if int (config ["swversion" ]) < 1952086020 :
73
+ config ["swversion" ] = "1952086020"
58
74
if float (config ["apiversion" ][:3 ]) < 1.50 :
59
75
config ["apiversion" ] = "1.50.0"
60
76
61
77
self .yaml_config ["config" ] = config
62
78
else :
63
- self .
yaml_config [
"config" ]
= {
"Remote API enabled" :
False ,
"Hue Essentials key" :
str (
uuid .
uuid1 ()).
replace (
'-' ,
'' ),
"discovery" :
True ,
"mqtt" :{
"enabled" :
False },
"deconz" :{
"enabled" :
False },
"alarm" :{
"enabled" :
False ,
"lasttriggered" :
0 },
"apiUsers" :{},
"apiversion" :
"1.46.0" ,
"name" :
"DiyHue Bridge" ,
"netmask" :
"255.255.255.0" ,
"swversion" :
"1946157000" ,
"timezone" :
"Europe/London" ,
"linkbutton" :{
"lastlinkbuttonpushed" :
1599398980 },
"users" :{
"[email protected] " :{
"password" :
"pbkdf2:sha256:150000$bqqXSOkI$199acdaf81c18f6ff2f29296872356f4eb78827784ce4b3f3b6262589c788742" }},
"hue" : {},
"tradfri" : {},
"tradfri" : {},
"homeassistant" : {
"enabled" :
False }}
79
+ self .yaml_config ["config" ] = {
80
+ "Remote API enabled" : False ,
81
+ "Hue Essentials key" : str (uuid .uuid1 ()).replace ('-' , '' ),
82
+ "discovery" : True ,
83
+ "mqtt" :{"enabled" :False },
84
+ "deconz" :{"enabled" :False },
85
+ "alarm" :{"enabled" : False ,"lasttriggered" : 0 },
86
+ "apiUsers" :{},
87
+ "apiversion" :"1.46.0" ,
88
+ "name" :"DiyHue Bridge" ,
89
+ "netmask" :"255.255.255.0" ,
90
+ "swversion" :"1946157000" ,
91
+ "timezone" :"Europe/London" ,
92
+ "linkbutton" :{"lastlinkbuttonpushed" : 1599398980 },
93
+ "users" :{
"[email protected] " :{
"password" :
"pbkdf2:sha256:150000$bqqXSOkI$199acdaf81c18f6ff2f29296872356f4eb78827784ce4b3f3b6262589c788742" }},
94
+ "hue" : {},
95
+ "tradfri" : {},
96
+ "homeassistant" : {"enabled" :False },
97
+ "yeelight" : {"enabled" :True },
98
+ "native_multi" : {"enabled" :True },
99
+ "tasmota" : {"enabled" :True },
100
+ "wled" : {"enabled" :True },
101
+ "shelly" : {"enabled" :True },
102
+ "esphome" : {"enabled" :True },
103
+ "hyperion" : {"enabled" :True },
104
+ "tpkasa" : {"enabled" :True },
105
+ }
64
106
# load lights
65
107
if os .path .exists (self .configDir + "/lights.yaml" ):
66
108
lights = _open_yaml (self .configDir + "/lights.yaml" )
0 commit comments