Lovelace: Button card

I’m looking into this currently, can’t yet access a debugger on my chromecast device…
This is the same on the decluttering card.
@iantrich, did you manage to get some of your cards working with chromecast?

1 Like

Were they not working? I really don’t remember and have no issues saying they don’t :man_shrugging:

I’ll see about it this weekend, perhaps if I find time (likely won’t :stuck_out_tongue_winking_eye:)

Tried on my chromecast and neither button-card nor decluttering-card work :frowning:
cannot read property config of null. I need to find which code line is generating that so I need a debugger :slight_smile:

It’s related to the fact that Safari (and any tool using a web view) in the latest iPad OS identifies itself as a plain Mac… It is fixed in button-card’s dev branch and I’ll publish a new version soon (probably over the weekend).

thanks @RomRider, glad you recognize it and are on it. Let us know if we can help to solve the issue.

HI, where do you need the issue to be raised? Glad to do, simply thought this was sufficient in this thread.
Sorry if that was too obscure to notice in this huge thread…
let me know how to help

Referring to my cards alone

well, not really sure what you say here, but this:

image

made me think I needed to post in the button-card thread…

Issues are best raised on GitHub, you know that.

I was stating that my cards that I have developed do not have open issues related to casting so I have not looked into it.

sure, but, needed be sure it is an issue first, and not a mis configuration on my behalf. Posted the issue for the button card, thanks.

:tada::tada: Version 3.1.0 :tada::tada:

New Features

  • Support for https://cast.home-assistant.io (Fix #262)
  • Support for templates in custom_fields card's config (Fix #239). This let you use button-card templates with variable card configurations.
    entity: light.my_light
    custom_fields:
      slider:
        card:
          type: custom:slider-entity-row
          full_row: true
          hide_state: true
          hide_when_off: true
          entity: '[[[ return entity.entity_id ]]]' # Will be light.my_light
    
  • Support for variables in the templates and config templates (Fix #245)
    button_card_templates:
      variable_test:
        variables:
          var_name: "var_value"
          var_name2: "var_value2"
        name: '[[[ return variables.var_name ]]]'
    
    [...]
    
    - type: custom:button-card
      template: variable_test
      entity: sensor.test
      # name will be "var_value"
    
    - type: custom:button-card
      template: variable_test
      entity: sensor.test
      variables:
        var_name: "My local Value"
     # name will be "My local Value"
    

Bugfix

  • Fix #247: iPad OS was double clicking on every button… Rotten Apple!
2 Likes

who can help me please, do not make it possible that all sensors are nicely displayed below each other, further it would be nice if the time had a large font.

my code:

          - type: "custom:button-card"
            entity: sensor.datum
            show_state: true
            show_name: true
            show_label: false
            show_icon: false
            name: KW
            styles:
              grid:
                - grid-template-areas: '"n datum" "kw kw" "wt wt" "sd sd"'
                - grid-template-columns: 1fr 1fr
                - grid-template-rows: 1fr min-content min-content min-content min-content
            custom_fields:
              datum: >
                [[[ return states['sensor.kalenderwoche'].state; ]]]
              kw: >
                [[[ return states['sensor.time'].state; ]]]
              wt: >
                [[[ return states['sensor.wochentag'].state; ]]]

2020-01-05 21_35_35-Home Assistant

About that… it still doesn’t work unfortunately. I reset the frontend cache in the app as well… doesn’t work still

thanks! The button-card is working fine. Magic. great work!

Decluttering card still shows: Cannot read property 'config' of null that is sorted, now only the images in the config show a placeholder instead of an image…

will post in the decluttering thread

On the button-card: a rather long lag is noticeable in the frontend when clicking a button and seeing the state change. Clicking a light button or activating a script, does seem to act quite responsive, but the button only changes up to 10 seconds or more later. Is this a cast issue?

It works for me in safari and in the HA IOS App, but I had an issue with HACS lately on my side… Try to uninstall/reinstall the card in HACS. If it doesn’t work it’s because the card has not been properly downloaded.

I can’t say. What happens if you try with a core button?
I don’t have a touch enabled cast device, so I can’t unfortunately test what you’re saying :frowning:

for now I only have entities in core buttons, and while they normally show the more-info, in Cast, nothing happens at all…hope to test a bit more the next few days, and learn what Cast can or can’t do

OK… I downloaded it directly from the releases page. Used WinMerge and it’s totally different to what HACS downloaded.
I removed it from HACS and reinstalled it and did a WinMerge again and it’s different still. So HACS isn’t downloading the right card. I’m going to remove the .gz file and copy over my download from the releases page now and see if that works.

EDIT: Yes manual d/l works. HACS isn’t pushing the new version

And for me in 3.0.0 on iOS app (iPhone 8) everything was ok, but after updating to 3.1.0 again there are double-clicks. Fix #247 is corrupted?

You must have kicked it good again because today it has downloaded the new correct version.

I didn’t change anything :man_shrugging: