Hello guys! How are you today?
I was wondering if any of you could help me out with scripting a zone cleaning of Xiaomi Vacuum.
As you know, the last number, after the last comma, is the number of passes the vacuum should do on this coordinates:
[[23746,23540,25096,25240,1]]
So, I tough it would be nice to set this myself, before sending the parameter to the vacuum. The solution was supposed to be very simple: create an input_number
from 1 to 3 and set the last digit of the parameter with the state of it, like this:
input_number:
aspirador_passadas:
name: Passadas
initial: 1
min: 1
max: 3
step: 1
script:
aspirador_zona_sala_inteira:
sequence:
- service: vacuum.send_command
data_template:
entity_id: vacuum.aspirador
command: app_zoned_clean
params: [[22674,21998,26074,31348,{{ states.input_number.aspirador_passadas.state }}]]
That did not work. I get this error when checking config:
Error loading /config/configuration.yaml: invalid key: "OrderedDict([('states.input_number.aspirador_passadas.state', None)])"
in "/config/includes/packages/xiaomi_vacuum.yaml", line 224, column 0
Any ideas how to fix this?
Thanks a lot!