Closed dennis-bell closed 1 year ago
Reference: Some more things to keep in mind
It's recommended to use the states()
function to get an entity's value instead of direct referencing.
{{ states('sensor.3dprinter_temperature') | float(0) }}
Thanks @tdejneka Ignore my issue, and I appreciate the feedback!
The problem
for my 3d printer I have a temperature sensor installed, called:
sensor.3dprinter_temperature
Wanted to use this for an automation, and so I used the following template as condition:
Which throws the following exception in the logging:
TemplateSyntaxError: expected token ')', got 'dprinter_temperature'
Been able to reduce it to:
Still throwing the same error. Until I changed the name of the sensor into this:
sensor.printer3d_temperature
Now it completely works ?!What version of Home Assistant Core has the issue?
2022.11.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response