Avoid submenu exception on HA restart

This commit is contained in:
Dermot Duffy
2022-03-03 20:26:46 -08:00
parent 07b7c7d28c
commit 680553130e
+3 -1
View File
@@ -411,7 +411,9 @@ export function refreshDynamicStateParameters(
params.state_color || (domain === 'light' && params.state_color !== false)
? domain
: undefined;
params.data_state = computeActiveState(state);
if (state) {
params.data_state = computeActiveState(state);
}
return params;
}