diff --git a/src/panels/config/js/trigger/state.js b/src/panels/config/js/trigger/state.js index 4c74e86016..4c461f3e2b 100644 --- a/src/panels/config/js/trigger/state.js +++ b/src/panels/config/js/trigger/state.js @@ -26,7 +26,7 @@ export default class StateTrigger extends Component { const trgFrom = trigger.from; let trgFor = trigger.for; - if (trgFor.hours || trgFor.minutes || trgFor.seconds) { + if (trgFor && (trgFor.hours || trgFor.minutes || trgFor.seconds)) { // If the trigger was defined using the yaml dict syntax, convert it to // the equivalent string format let { hours = 0, minutes = 0, seconds = 0 } = trgFor;