Hello.
Very often i had to deal with Hard Coded Variables in Home Assistant.
Example:
Ping Sensor
- platform: ping
name: “Sensor Ping”
host: 9.9.9.9
count: 2
scan_interval: 10
But everything could be setted in Home Assistant Variables, so in any moment i could change the data from GUI
- platform: ping
name: “Sensor Ping”
host: “{{states.input_text.ping_ip.state | str}}”
count: “{{states.input_number.ping_period.state | str}}”
scan_interval: “{{states.input_number.ping_count.state | str}}”
But since long Time I’ve stucked with this because Could’t do this, It doesn’t work.
I’m think templating will not work here, because so I have no idea.
I think there’s a lot situations simmilar to this, like alarm_control_panel parameters: code, delay times etc.
I found some workaround. Theres way to use !secret instead the variable, and i wrote some script to read vaules from entities, clear secrets file and write everything what i defined in script to secrets file, but it’s stupid workaround i think.
Any Idea’s how to solve the problem but no with workaround ?