Question on quotes in sensor definition. Below my mqtt.yaml.
Why …can i do the first sensor value_template with single quotes:
# Landrover Automate
sensor:
- name: 'Landrover Automate'
state_topic: 'devices/Landrover'
value_template: '{{ value_json.time}}'
json_attributes_topic: 'devices/Landrover'
And the second one i have to use double quotes?
# Landrover Torque Data
- name: 'Landrover Torque'
state_topic: 'devices/Landrover/torque'
value_template: "{{ state_attr('sensor.landrover_torque', 'GPS Time') }}"
json_attributes_topic: 'devices/Landrover/torque'
Also, i noticed that others have static_topic or json_attributes_topic used with double quotes, but for me it seems to only work when i use single quotes.
Thanks!