vacuum-card
vacuum-card copied to clipboard
Migrate from service to action
The use of services is deprecated since the 2024.8 release and should be updated to using actions.
For example, this is now the correct code to call an action and works when I manually trigger it from Developer > Actions. However, it does not work with this custom card. Here I need to use the deprecated service and service_data.
Should work, new best practice. But does not work with this custom card yet:
shortcuts:
- name: Living room
icon: 'mdi:sofa'
action: vacuum.send_command #--- note the use of action, not service
data: #--- note the use of data, not service_data
command: app_segment_clean
params:
- segments:
- 16
repeat: 1
target:
entity_id: vacuum.marvin
Deprecated, but works with this custom card:
shortcuts:
- name: Living room
icon: 'mdi:sofa'
service: vacuum.send_command
service_data:
command: app_segment_clean
params:
- segments:
- 16
repeat: 1
target:
entity_id: vacuum.marvin