Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from service to action #810

Open
grolnn opened this issue Sep 20, 2024 · 2 comments
Open

Migrate from service to action #810

grolnn opened this issue Sep 20, 2024 · 2 comments
Labels
bug Something isn't working stale

Comments

@grolnn
Copy link

grolnn commented Sep 20, 2024

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

@grolnn grolnn added the bug Something isn't working label Sep 20, 2024
@Oleg-Sob
Copy link

Now it works for me too. It would be nice to correct the description in the vacuum-card as well.

Copy link

There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue.
Thank you for your contributions!

@github-actions github-actions bot added the stale label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants