- alias: Xiaomi støvsuger timer
trigger:
platform: state
entity_id: vacuum.xiaomi_vacuum_cleaner
from: 'docked'
to: 'cleaning'
for:
hours: 1
action:
service: vacuum.return_to_base
It did not return to base after one hour. But i found this error message:
Not passing an entity ID to a service to target all entities is deprecated. Update your call to vacuum.return_to_base to be instead: entity_id: all
So it just meant I need to add the entity_id under the service. I got confused of this because it tells me "Update your call to vacuum.return_to_base to be instead : entity__id: all. So since it says instead. For me this meant something like this:
vacum.return_to_base changed out to entity_id: all which of course does not make any sence.
Not all, but most service calls take parameters, the most common of which is entity_id. The documentation for most service calls will list what parameters can be sent, and whether each parameter is required or optional. The doc for this service shows that entity_id is optional. If you do not specify it, then it defaults to all vacuum entities.
However, the fact that the entity_id is optional is deprecated, meaning that in a future release you will always need to specify it. And if you want it to perform the service for all vacuum entities, you will need to specify that explicitly by using entity_id: all.
I’ll grant you that the wording of the message could be better. Would it be more understandable if it said the following?
“Update your call to vacuum.return_to_base by adding: entity_id: all.”
It was a breaking change a few releases ago. What it basically means is that if you do not specify an entity_id it will try to pass it to all entities. (I had this problem with input_select, in which it would give me errors as it would try to pass the command to all input_select switches). You already have the solution, but now you know why