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

Input_button with call-service action not working. #315

Open
jeremypsl opened this issue Sep 11, 2023 · 3 comments
Open

Input_button with call-service action not working. #315

jeremypsl opened this issue Sep 11, 2023 · 3 comments

Comments

@jeremypsl
Copy link

jeremypsl commented Sep 11, 2023

Hello,

Little problem with an input_button with a call-service action :

entity: fan.fan_room_1
type: custom:multiple-entity-row
name: Room 1
toggle: true
state_color: true
show_state: true
entities:
- entity: input_button.fan_room_1
  type: button
  name: ' '
  icon: mdi:arrow-right-circle-outline
  tap_action:
    action: call-service
    service: fan.set_direction
    data:
      direction: forward
    target:
      entity_id: fan.fan_room_1

Error is "must contain at least one of entity_id, device_id, area_id."

Without the type: custom:multiple-entity-row, it's working normally.

Thanks.

@ildar170975
Copy link

The “type: button” string is not supported by this card.

@svalsemey
Copy link

Hello,

Using the new HA 2024.8+ supported syntax (perform-action instead of call-service), this should work as well:

entity: input_button.fan_room_1
type: custom:multiple-entity-row
name: Room 1 fan
show_state: false
entities:
- entity: input_button.fan_room_1
  icon: mdi:arrow-right-circle-outline
  tap_action:
    action: perform-action
    perform_action: input_button.fan_room_1
    target:
      entity_id: input_button.fan_room_1

But it is not (no action is launched).

If I try to set it with a toggle, it says: "No action found: button.turn_on". I guess this is because buttons are still handled as input_booleans, although buttons cannot be "toggled", but "pressed".

entity: input_button.fan_room_1
type: custom:multiple-entity-row
name: Room 1 fan
show_state: false
entities:
- entity: input_button.fan_room_1
  icon: mdi:arrow-right-circle-outline
  tap_action:
    action: toggle

Thanks.

@ildar170975
Copy link

ildar170975 commented Nov 12, 2024

Using the new HA 2024.8+ supported syntax (perform-action instead of call-service), this should work as well:

m-e-r uses own Actions; also check here.
Own Actions are clearly explained in Docs.
The 1st post contains a wrong code, should be

  tap_action:
    action: call-service
    service: ...
    service_data:
      ...

Not a bug - merely a user's error.

For pressing a button:

  tap_action:
    action: call-service
    service: input_button.press
    service_data:
      entity_id: input_button.xxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants