Correct Offset value (this: ' or: " or none)

Hi,

I’m a bit confused. In multiple examples I see different ways the offset is written.

For example:

event: sunrise
offset: 00:15:00

But which one is correct?

event: sunrise
offset: “00:15:00”

event: sunrise
offset: ‘00:15:00’

event: sunrise
offset: 00:15:00

Ha, this is one of those slightly annoying things with configuration.

Basically, some things need to be passed as strings, some things don’t. Sometimes you need quotes in a string. Sometimes you need quotes in a template.

Some things are clever enough to know that it’s a string without the quotes, some things aren’t.

Generally speaking, in the example you gave, there is no wrong answer and all are interchangeable. It only really matters on things where you need it to be a number (no quotes at all) or in a template (double quotes to envelope the template, single quotes inside for items that need to be shown as strings or quotes).

Fun, no? :laughing:

2 Likes