mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Remove milliseconds from state trigger when 0 (#10879)
This commit is contained in:
parent
2606d55895
commit
942150cda2
@ -50,6 +50,13 @@ export class HaStateTrigger extends LitElement implements TriggerElement {
|
|||||||
if (!changedProperties.has("trigger")) {
|
if (!changedProperties.has("trigger")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
this.trigger.for &&
|
||||||
|
typeof this.trigger.for === "object" &&
|
||||||
|
this.trigger.for.milliseconds === 0
|
||||||
|
) {
|
||||||
|
delete this.trigger.for.milliseconds;
|
||||||
|
}
|
||||||
// Check for templates in trigger. If found, revert to YAML mode.
|
// Check for templates in trigger. If found, revert to YAML mode.
|
||||||
if (this.trigger && hasTemplate(this.trigger)) {
|
if (this.trigger && hasTemplate(this.trigger)) {
|
||||||
fireEvent(
|
fireEvent(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user