Add pre-alarm action
This commit is contained in:
parent
86c81396e2
commit
a3b00fe38d
4 changed files with 86 additions and 13 deletions
|
|
@ -5,11 +5,13 @@ export class Settings {
|
|||
}
|
||||
}
|
||||
|
||||
update({ language, gong_interval, weather_delay, weather_action, max_run_time, max_volume, federation }) {
|
||||
update({ language, gong_interval, weather_delay, weather_action, pre_alarm_delay, pre_alarm_action, max_run_time, max_volume, federation }) {
|
||||
this.language = language;
|
||||
this.gong_interval = gong_interval;
|
||||
this.weather_delay = weather_delay;
|
||||
this.weather_action = weather_action;
|
||||
this.pre_alarm_delay = pre_alarm_delay;
|
||||
this.pre_alarm_action = pre_alarm_action;
|
||||
this.max_run_time = max_run_time;
|
||||
this.max_volume = max_volume;
|
||||
this.federation = federation;
|
||||
|
|
|
|||
|
|
@ -89,6 +89,40 @@
|
|||
{/if}
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<Label for="preAlarmDelay">Lancement action pré-alarme</Label>
|
||||
<InputGroup>
|
||||
<Input
|
||||
type="number"
|
||||
id="preAlarmDelay"
|
||||
placeholder="5"
|
||||
bind:value={settings.pre_alarm_delay}
|
||||
on:input={submitSettings}
|
||||
/>
|
||||
<InputGroupText>min</InputGroupText>
|
||||
</InputGroup>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<Label for="preAlarmRituel">Action pour l'action pré-alarme</Label>
|
||||
{#if $actions.list}
|
||||
<Input
|
||||
type="select"
|
||||
id="preAlarmRituel"
|
||||
bind:value={settings.pre_alarm_action}
|
||||
on:input={submitSettings}
|
||||
>
|
||||
{#each $actions.list as action (action.id)}
|
||||
<option value="{action.path}">{action.name}</option>
|
||||
{/each}
|
||||
</Input>
|
||||
{:else}
|
||||
<div class="d-flex justify-content-center align-items-center gap-2">
|
||||
<Spinner color="primary" /> Chargement en cours…
|
||||
</div>
|
||||
{/if}
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<Label for="greetingLanguage">Langue de salutation</Label>
|
||||
<Input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue