mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +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")) {
|
||||
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.
|
||||
if (this.trigger && hasTemplate(this.trigger)) {
|
||||
fireEvent(
|
||||
|
Loading…
x
Reference in New Issue
Block a user