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

Can't use notify service because of entity_id being added #250

Open
1 task done
Khaos66 opened this issue May 11, 2024 · 2 comments
Open
1 task done

Can't use notify service because of entity_id being added #250

Khaos66 opened this issue May 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Khaos66
Copy link

Khaos66 commented May 11, 2024

Bug report notice

Before you file a bug, make sure that you did not make a configuration mistake. The Swiss Army Knife in its current state does not yet have full configuration sanity checks!

So make sure your problem is not related to that!

  • Yes, I'm sure that it is not a configuration mistake

Swiss Army Knife version

The version you are using. See HACS or the Browser console
2.5.1

Bug description

call-service action will always add entity_id to service_data which is not allowed when notify.* services are called.

Failed to call service notify/mobile_app_oneplus_open. extra keys not allowed @ data['entity_id']

To Reproduce

Steps to reproduce the behavior:

  1. You need a notify service, so connect the Android companion app. This adds notify.mobile_app_* as a service.
  2. Add a tool with the user_actions below
  3. Click on the tool in a dashboard
user_actions:
  tap_action:
    haptic: success
    actions:
      - action: call-service
        service: "notify.mobile_app_*"
        service_data:
          message: message
          data:
            title: "Test"

Expected behavior

Instead of a message on the Android phone an HA error message is shown in the dashboard

Screenshots

None

Desktop browser (please complete the following information):

  • Microsoft Edge | 124.0.2478.80 (Offizielles Build) (64-Bit)
  • Revision | b05b378d17057fdf79080fa82d92e1370adf2627
  • Chromium-Version | 124.0.6367.118
  • Betriebssystem | Windows 11 Version 23H2 (Build 22631.3527)
  • JavaScript | V8 12.4.22.11

Companion App on Smartphone/Tablet (please complete the following information):

  • Device: OnePlus Open
  • OS: Android
  • Browser: stock browser
  • Version: 14

Additional context

// Fill with current entity_id if none given

(Optional): Suggested Solution

I need a switch to deaktivate the addition of missing entity_id.
Maybe likte this

user_actions:
  tap_action:
    haptic: success
    actions:
      - action: call-service
        service: "notify.mobile_app_*"
        no_entity_id: true
        service_data:
          message: message
          data:
            title: "Test"
@Khaos66 Khaos66 added the bug Something isn't working label May 11, 2024
Copy link

Thank you for creating your first issue for the Swiss Army Knife custom card!

@Khaos66
Copy link
Author

Khaos66 commented May 11, 2024

@AmoebeLabs Please tell me your prefered solution. I can create a PR.
Also let me know where I'll have to adjust the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant