mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Optional boolean service field defaults to false
(#19043)
This commit is contained in:
parent
62d8cdfcf9
commit
e813108c66
@ -522,6 +522,14 @@ export class HaServiceControl extends LitElement {
|
|||||||
defaultValue = field.selector.constant?.value;
|
defaultValue = field.selector.constant?.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
defaultValue == null &&
|
||||||
|
field?.selector &&
|
||||||
|
"boolean" in field.selector
|
||||||
|
) {
|
||||||
|
defaultValue = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (defaultValue != null) {
|
if (defaultValue != null) {
|
||||||
data = {
|
data = {
|
||||||
...this._value?.data,
|
...this._value?.data,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user