Check the breaking changes of 0.1.0 release. action
has been reworked.
Edit: See that @RomRider already addressed this while I was typing
Check the breaking changes of 0.1.0 release. action
has been reworked.
Edit: See that @RomRider already addressed this while I was typing
Alright, toggle makes sense as a default and it should be easy to update my buttons to specify more-info.
Though i wonder if itād be possible for the button-card to know if the specified entity begins with sensor prefix and then automatically default to more-info instead for that specific button? Since you canāt toggle a sensor. Just an idea that would make it a little more user-friendly.
As for GitHub thing, I was trying to open the readme.md
and then trying to hit pencil icon to edit, but it was not allowing me to. Appears to be working now and I just submitted PR.
I want to get rid of the icon here:
- type: custom:button-card
entity: sensor.sonos_volume
show_state: true
How do I do that? I used the config in the readme.
This is because card now falls back to showing default icon if no mdi: icon is specified.
You can fix this by adding show_icon: false
good to know, iāll update and try the new card later.
Hi @Tomahawk, Iāll look into that. In the meantime, could you open an issue on github please? Itās easier to track there, thanks
I had switched back too Petro but @RomRider has picked this card up and it is awesome again!
Now I just need to convince him to start contributing to core
Wow! Good job.
Itās leaving the button at the came color you see if you hover over the card after you tap on the button rather than returning to the normal color. Hopefully @RomRider can fix this. Itās more of an annoyance than anything. If you tap anywhere on the screen it revertsā¦
Hey @RichardU,
That will be done, once this PR is merged:
https://github.com/custom-cards/button-card/pull/95
Hey @VDRainer, @DavidFW1960,
The button staying selected should be fixed with this PR once merged:
Thanks a lot @RomRider!
Last weekend i decided to change everything to the entity-button.
Now i have something to do this weekend.
You should use anchors! I set my system up to use anchors so I only need to swap the button type and attributes in 1 place:
anchors:
remote_style: &remotestyle
border-radius: 20px
remote_button: &buttonremote
type: entity-button
show_name: false
tap_action:
action: toggle
hold_action:
action: none
Then in your configuration area just have this:
- type: 'custom:card-modder'
style:
<<: *remotestyle
--paper-item-icon-active-color: '#E45E65'
card:
<<: *buttonremote
entity: switch.poweroff
- type: 'custom:card-modder'
style:
<<: *remotestyle
--paper-item-icon-active-color: '#E45E65'
card:
<<: *buttonremote
entity: switch.zone_1
- type: 'custom:card-modder'
style:
<<: *remotestyle
--paper-item-icon-active-color: '#E45E65'
card:
<<: *buttonremote
entity: switch.zone_2
When you swap to a new card, youāll pretty much only need to update/change the anchor. And possibly do a find and replace on the --paper-item-icon-active-color
field name.
I love it for styles. I can add a style and it just changes all cards everywhere that would use it.
Does anyone have any idea why the delay and off is not working?
Thanks, Richard
- type: 'custom:button-card'
color_type: icon
entity: switch.one
tap_action:
- action: call-service
service: switch.turn_on
service_data:
entity_id: switch.two
- delay:
seconds: 2
- action: call-service
service: switch.turn_off
service_data:
entity_id: switch.two
Thereās no delay option. Just a single action. Write a script if you want something like that.
@RichardU, the purpose of the frontend is to display things not to handle logic.
For what you want to do, use a script as @iantrich stated and call the script from the button.
In your configuration.yml:
script:
my_script:
sequence:
- service: switch.turn_on
entity_id: switch.two
- delay:
seconds: 2
- service: switch.turn_off
entity_id: switch.two
In lovelace:
- type: 'custom:button-card'
color_type: icon
entity: switch.one
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.my_script
New Features:
url
option in tap_action
to open a new tabspin
option added to state
object to animate spinningFixes
Breaking Changes
icon: attribute
Looks cool but I have no idea how I would use that or how it helps changing from the inbuilt button to this cardā¦ I also donāt use card-modder so thereās thatā¦