File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -145,17 +145,8 @@ export function addPreParsingDefaults(
145145 yaml_in : InputConfig ,
146146 css_vars : HATheme
147147) : InputConfig {
148- let yaml = merge ( { } , yaml_in , defaultYamlRequired , yaml_in ) ;
149148 // merging in two steps to ensure ha_theme and raw_plotly_config took its default value
150- yaml = merge (
151- { } ,
152- yaml ,
153- {
154- layout : yaml . ha_theme ? getThemedLayout ( css_vars ) : { } ,
155- } ,
156- yaml . raw_plotly_config ? { } : defaultYamlOptional ,
157- yaml_in
158- ) ;
149+ let yaml = merge ( { } , yaml_in , defaultYamlRequired , yaml_in ) ;
159150 for ( let i = 1 ; i < 31 ; i ++ ) {
160151 const yaxis = "yaxis" + ( i == 1 ? "" : i ) ;
161152 yaml . layout [ yaxis ] = merge (
@@ -165,6 +156,17 @@ export function addPreParsingDefaults(
165156 yaml . layout [ yaxis ]
166157 ) ;
167158 }
159+
160+ yaml = merge (
161+ { } ,
162+ yaml ,
163+ {
164+ layout : yaml . ha_theme ? getThemedLayout ( css_vars ) : { } ,
165+ } ,
166+ yaml . raw_plotly_config ? { } : defaultYamlOptional ,
167+ yaml
168+ ) ;
169+
168170 yaml . entities = yaml . entities . map ( ( entity ) => {
169171 if ( typeof entity === "string" ) entity = { entity } ;
170172 entity . entity ??= "" ;
You can’t perform that action at this time.
0 commit comments