diff --git a/source/_integrations/template.markdown b/source/_integrations/template.markdown index b0e0f093490..cb44109af07 100644 --- a/source/_integrations/template.markdown +++ b/source/_integrations/template.markdown @@ -578,7 +578,7 @@ This example demonstrates how the `this` variable can be used in templates for s template: - sensor: - name: test - state: "{{ this.attributes.test }}" + state: "{{ this.attributes.test | default('Value when missing') }}" # not: "{{ state_attr('sensor.test', 'test') }}" attributes: test: "{{ now() }}"