mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +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 { DeviceCondition, DeviceTrigger } from "./device_automation";
|
||||||
import { Action, MODES } from "./script";
|
import { Action, MODES } from "./script";
|
||||||
|
|
||||||
|
export const AUTOMATION_DEFAULT_MODE: ManualAutomationConfig["mode"] = "single";
|
||||||
|
|
||||||
export interface AutomationEntity extends HassEntityBase {
|
export interface AutomationEntity extends HassEntityBase {
|
||||||
attributes: HassEntityAttributeBase & {
|
attributes: HassEntityAttributeBase & {
|
||||||
id?: string;
|
id?: string;
|
||||||
|
@ -8,6 +8,7 @@ import "../../../components/ha-card";
|
|||||||
import "../../../components/ha-textarea";
|
import "../../../components/ha-textarea";
|
||||||
import "../../../components/ha-textfield";
|
import "../../../components/ha-textfield";
|
||||||
import {
|
import {
|
||||||
|
AUTOMATION_DEFAULT_MODE,
|
||||||
Condition,
|
Condition,
|
||||||
ManualAutomationConfig,
|
ManualAutomationConfig,
|
||||||
Trigger,
|
Trigger,
|
||||||
@ -99,7 +100,7 @@ export class HaManualAutomationEditor extends LitElement {
|
|||||||
.label=${this.hass.localize(
|
.label=${this.hass.localize(
|
||||||
"ui.panel.config.automation.editor.modes.label"
|
"ui.panel.config.automation.editor.modes.label"
|
||||||
)}
|
)}
|
||||||
.value=${this.config.mode}
|
.value=${this.config.mode || AUTOMATION_DEFAULT_MODE}
|
||||||
@selected=${this._modeChanged}
|
@selected=${this._modeChanged}
|
||||||
fixedMenuPosition
|
fixedMenuPosition
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user