mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Select default mode if none set (#12306)
This commit is contained in:
parent
3c549c6b31
commit
125a601ae3
@ -8,6 +8,8 @@ import { BlueprintInput } from "./blueprint";
|
||||
import { DeviceCondition, DeviceTrigger } from "./device_automation";
|
||||
import { Action, MODES } from "./script";
|
||||
|
||||
export const AUTOMATION_DEFAULT_MODE: ManualAutomationConfig["mode"] = "single";
|
||||
|
||||
export interface AutomationEntity extends HassEntityBase {
|
||||
attributes: HassEntityAttributeBase & {
|
||||
id?: string;
|
||||
|
@ -8,6 +8,7 @@ import "../../../components/ha-card";
|
||||
import "../../../components/ha-textarea";
|
||||
import "../../../components/ha-textfield";
|
||||
import {
|
||||
AUTOMATION_DEFAULT_MODE,
|
||||
Condition,
|
||||
ManualAutomationConfig,
|
||||
Trigger,
|
||||
@ -99,7 +100,7 @@ export class HaManualAutomationEditor extends LitElement {
|
||||
.label=${this.hass.localize(
|
||||
"ui.panel.config.automation.editor.modes.label"
|
||||
)}
|
||||
.value=${this.config.mode}
|
||||
.value=${this.config.mode || AUTOMATION_DEFAULT_MODE}
|
||||
@selected=${this._modeChanged}
|
||||
fixedMenuPosition
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user