Hi guys! I need your help as I‘m totally lost right now.
Context: We have an Ecovacs vacuum integrated via „deebot for hassio“ from And3rsl. The Problem is, the vacuum is loosing or moving rooms, renaming them constantly, every week etc. Cleans good, but software is just annoying… So changing every automation now and then is not an option. Further the rooms in the ecovacs app are named by letters whereas in home assistant there are room numbers. So I was thinking about this:
input_text in lovelace where I could easily enter the letters, if something changes
script 1: for every room, available in lovelace to click, turns on main cleaning script
this one is basically just passing the area as entity to the main script: input_text.saugi_xx
#saugi=little vacuum in german
service: script.turn_on
target:
entity_id: script.clean_spot
data:
entity: input_text.saugi_xx
main script (2):
service: vacuum.send_command
target:
entity_id: vacuum.saugi
data:
params:
rooms: {% if is_state(area, 'A') %}
1
{% elif is_state(area, 'B') %}
2
{% endif %}
#this is checking and translating the room from letter to number for HA, goes much further
The problem for me here is to pass the entity_id, the input_text from script 1 into the template for rooms in the main script.
I was thinking about something like this:
{% set area = {{entity_id}} %}
But this arrangement seems not to be possible, but I have no idea how i could bring the entity_id into the template. I hope I was clear enough…
Is there a way?