I would like to include the attribute “Route” of the Waze sensor as an own sensor to be able to output the calculated route on a display.
In this topic, the same issue was addressed and solved, however, I do not understand the solution or get with the presented solution always error messages and can not restart the system.
Where does ‘jeroen_naar_huis’ come from as a name. For me the Waze entity is called sensor.firma or in the waze integration itself simply “firma”. Is my ‘jeroen_naar_huis’ then simply ‘firma’? I have tried that without success.
The rest I have taken over analogous to my sensor designation, but I can’t restart HA because I always get error messages through the YAML.
The value template of each one points to sensor.jeroen_naar_huis (Google Translate says that’s Joen to Home) Which makes sense if it’s a Waze sensor. Yours may be this ‘sensor.firma,’ here’s how to find out:
they’re pointing at a state_attr (attribute) not a state, so you want to find the waze sensor (your name here instead of theirs (sensor.firma), or in my case lets look at one of mine) in the dev tools:
See those attributes - that’s all the ‘extra’ stuff that sensor has available. The template sensor is just exposing them all as independent sensors - usually so you can put them on a dashboard easily with cards that don’t support accessing attributes directly. If you’ve hit the right one, those will be there. and you just use the code in the other example - replacing your entity and dropping them in the right place in your configuration.yaml.
Error loading /config/configuration.yaml: while parsing a block collection
in "/config/configuration.yaml", line 18, column 3
expected <block end>, but found '?'
in "/config/configuration.yaml", line 40, column 3
I think my problem is that I don’t know how the entry in Configuration.yaml should look like and where it should be.
You got it. Also the docs for all of it are in that link labeled template above. Notice if you scroll down to the sensor section it gives you that syntax and where it should list in Configuration.
Glad you got it. Knowing how to do what you just did unlocks a ton of HA. If you dont like how something is presented you can now reformat it however you like.
I noted your support on the subject of the attributes from the Waze integration, i wonder if you could take a look at my issue. I’m struggling to create a sensor from the distance attribute from the waze state. I have made a post on this earlier and linked to it below. In short, i can create a sensor that displays the route however i cannot seem to get any success with the distance. If i create a template (via Developer Tools), i see everrything i want but when I implement this in my sensors.yaml i get “unavailable” for the distance.