Not in this case at least (although there might be some wrong examples elsewhere in the docs). The examples without quotes look like this, which is correct:
@dazza25 note the >- after value_template: in the first example. That’s the syntax for creating multi-line templates (the hyphen also tells it to strip whitespace from the beginning and end, although that’s not strictly necessary). When you use the multi-line template syntax, even if the template itself is only one line, you don’t need to wrap the template in quotes. When it’s written like the one in your original post it needs to be wrapped in quotes.
Invalid config for [binary_sensor.template]: [unique_id] is an invalid option for [binary_sensor.template]. Check: binary_sensor.template->sensors->car_in_garage->unique_id. (See ?, line ?).
Hmm, this looks like an issue. I see that the unique_id was added beginning of August for binary sensors. Could be that your are running an older version that doesn’t have this change included. Which HA version are you running?
Yes I am on 0.113, hadnt upgraded to 0.114 so that is probably it. So taken that out for now, no big deal.
Bigger issue is it never updates. Whether the distance is less or more than 1.8m, it is always showing false. Do I need to add more code to say if > 1.8 set to false and if less set to true?