I want to change the update interval of a Modbus via a text sensor, but I don’t know how to transfer it.
text_sensor:
- platform: template
name: "Update Intervall schreiben"
id: template_update
switch:
- platform: template
id: test04
name: Testbrücken
optimistic: True
lambda: |-
if (id(test04).state) {
return true;
} else {
return false;
}
on_turn_on:
then:
- text_sensor.template.publish:
id: template_update
state: "10s"
on_turn_off:
then:
- text_sensor.template.publish:
id: template_update
state: "10min"
packages:
daten_w: !include
file: packages/sdm/growatt_n.yaml
vars:
sensor_id: daten_w
sensor_name: in
sensor_adresse: 0x0001
sensor_interval: 10s
It’s about the “sensor_interval” from the package. I would like to transfer the content of the text sensor there, but how?