Hello,
TL;DR: I can’t set a value
for a knx button to a state of an entity using a template. Is this not possible or am I doing it wrong?
Details:
I have a set of MDT Glastaster to which I want to send a string via the ‘state text’ communication object on the press of a button. Everything works fine, if I hardcode a string in the knx button.
knx:
button:
- name: Glastaster Status 1
address: "0/2/15"
type: string
value: "Hallo Welt!"
But I would like to set the value to the state of a input_text
input_text:
knx_glastaster_status_text:
name: Glastaster Status Text
icon: mdi:message-text-outline
initial: ""
max: 14
knx:
button:
- name: Glastaster Status 1
address: "0/2/15"
type: string
value: {{ states('input_text.knx_glastaster_status_text') }}
But on checking the config it shows this error:
Error loading /config/configuration.yaml: invalid key: "OrderedDict([("states('input_text.knx_glastaster_status_text')", None)])"
I’m relativly new to templating. So I checked the template {{ states('input_text.knx_glastaster_status_text') }}
in Developer Tools → Template and there it works fine.
Therefore I have the question: Are templates even supported as a value
for a knx button?