Hello there…
So I’m trying to have a Telegram Bot that tells me states of lights and switches… so I am using a template like this for lights
data_template:
message: >-
*Luce Angolo*: {{ states.light.luceangolo.state }}
and it works, it correctly tells me the light status… so I wanted to do the same with a switch, and tried with a Sonoff with tasmota on it:
data_template:
message: >-
*Scaldabagno*: {{ states.switch.interruttorenatale.state }}
This works too…
So now I want to know the state of a switch (Houzetek brand, used with Tuya platform) and I’ve tried this:
data_template:
message: >-
*Scaldabagno*: {{ states.switch.80027536bcddc28a7f83.state }}
As a result, HA tells me
Invalid config for [automation]: invalid template (TemplateSyntaxError: expected token 'end of print statement', got 'bcddc28a7f83') for dictionary value @ data['action'][1]['data_template']['message']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/automation/
So I really don’t know what is the error…
Can you please help me?
Thanks in advance…