I have made a very simple automation which so far has worked fine:
alias: Upload temperatur
description: ''
mode: single
trigger: []
condition: []
action:
- service: notify.indetemptilfil
data:
message: '{{ states.sensor.stue_temp_temperature.state }}'
If I change the sensor to another as shown here:
alias: Upload temperatur
description: ''
mode: single
trigger: []
condition: []
action:
- service: notify.indetemptilfil
data:
message: '{{ states.sensor.0x00124b0023ea1980_temperature.state }}'
This results in the following error:
Message malformed: invalid template (TemplateSyntaxError: expected token 'end of print statement', got 'x00124b0023ea1980_temperature') for dictionary value @ data['action'][0]['data']
What am I doing wrong?
The two sensors are exactly the same brand. Both sensors work fine in HA. It’s like when I use a sensor that starts with “0x” I get problems.
It could be related to “entity_id that begins with a number”:
But I can not make it work.