mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fallback to 0 for undefined offsets (#12823)
This commit is contained in:
parent
1e011bfe34
commit
ab65ce819f
@ -106,7 +106,9 @@ export class HaCalendarTrigger extends LitElement implements TriggerElement {
|
||||
const offsetType = ev.detail.value.offset_type === "before" ? "-" : "";
|
||||
const newTrigger = {
|
||||
...ev.detail.value,
|
||||
offset: `${offsetType}${duration.hours}:${duration.minutes}:${duration.seconds}`,
|
||||
offset: `${offsetType}${duration.hours ?? 0}:${duration.minutes ?? 0}:${
|
||||
duration.seconds ?? 0
|
||||
}`,
|
||||
};
|
||||
delete newTrigger.offset_type;
|
||||
fireEvent(this, "value-changed", { value: newTrigger });
|
||||
|
Loading…
x
Reference in New Issue
Block a user