custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.97k stars 242 forks source link

New Action : Assist #711

Closed neilimixamo closed 1 year ago

neilimixamo commented 1 year ago

Hi, would it be possible to incorporate the new "assist" action that has been introduced in HA version 2023.7 ? Thank you so much for this amazing card.

image

ndom91 commented 1 year ago

Yeah looking to use this here as well. Currently only seems to be supported by the built-in Button.

If it makes it any easier, to see how they did it - Mushroom cards seemed to ahve just shipped an update which supports this: https://github.com/piitaya/lovelace-mushroom/releases/tag/v3.0.0

smartqasa commented 1 year ago

Plus 1

skank01 commented 1 year ago

+1 Tried using it with custom button card, but it seems it doenst work

Mariusthvdb commented 1 year ago

There’s a developers blog post on the subject of adding the new hass-action

https://developers.home-assistant.io/blog/2023/07/07/action-event-custom-cards/

would not keep my hopes up the dev of the card here is likely to add that though . Romrider has stated he does not have the resources (time) available to keep up with HA changes, and if anything, will try to keep the card alive as much as possible if anything breaks..

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 4.0.0-dev.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

Mariusthvdb commented 1 year ago

thanks for adding, and I can confirm it to work correctly! Magic.

1 caveat: there seems to be a discrepancy using the theme colors on this button

show_name: true
show_icon: true
type: custom:button-card
tap_action:
  action: assist
  start_listening: true
entity: input_button.assist
show_state: false
name: Assist
Scherm­afbeelding 2023-07-24 om 07 50 48

while the exact same card:

show_name: true
show_icon: true
type: button
tap_action:
  action: assist
  start_listening: true
entity: input_button.assist
show_state: false
name: Assist

shows

Scherm­afbeelding 2023-07-24 om 07 50 43

according to my theme. Minor thingy, maybe a user error? just mentioning for reference in this new development.

Thanks again!

Mariusthvdb commented 1 year ago

separate, just for the fun of it:

type: custom:button-card
aspect_ratio: 1
show_name: true
show_icon: false
tap_action:
  action: assist
  start_listening: true
entity: input_button.assist
show_state: false
name: Assist
styles:
  card:
    - background-image: |
        [[[ return  `url("/local/images/yotv.png")`; ]]]
    - background-size: cover
    - background-repeat: no-repeat
    - color: blue
  name:
    - font-size: 20px
    - font-weight: bold
    - position: absolute
    - top: 5%
    - left: 42%
Scherm­afbeelding 2023-07-24 om 11 43 45

so nice we can now do this!

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 4.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: