My Lovelace Plugins

Typo… in the name you have friendly\name (on the readme github)

This looks really nice, I think it would be even better if you could add a brightness slider with it.

Although not necessarily a card tools issue, I’ll post this here just in case someone comes looking for an answer. Scratch that…

Prior to upgrading from 0.84 to 0.86.1, I ran custom updater to pull down the latest versions of my custom cards and it seems card-tools didn’t get its update. I didn’t see any errors in the logs that would have indicated a problem with the card-tools download. The only tell tale sign, other than the red cards of death, was this error:

2019-01-24 16:44:58 ERROR (MainThread) [frontend.js.latest.201901211] http://<my-ha-URL>/local/card-tools.js:42:9 Uncaught TypeError: Cannot read property 'shadowRoot' of null

Manually downloading card-tools (using WGET against the raw data on github) and purging cached data fixed my issues on my Chrome browser for MacOS. In Safari and Chrome for iOS, I get this error.

2019-01-24 17:06:21 ERROR (MainThread) [frontend.js.latest.201901211] http://<my-ha-URL>/local/card-tools.js:41:62 TypeError: null is not an object (near '...ha-panel-lovelace")...')

Thoughts?

I’m getting this error with one of my cards. It’s only happening to my custom Dark Sky Animated Weather Card.

https://removed/local/card-modder.js?v=03a767:44:23 Uncaught TypeError: this.card.style.setProperty is not a function

This is what chrome DevTools has to say

Uncaught (in promise) TypeError: this.card.style.setProperty is not a function
    at HTMLElement._cardMod (card-modder.js?v=03a767:44)
    at HTMLElement.firstUpdated (card-modder.js?v=03a767:26)
    at HTMLElement.performUpdate (app-3b4bb4ed.js:344)
    at HTMLElement._enqueueUpdate (app-3b4bb4ed.js:344)

I’m trying to use card-modder to let me style the icon colour on an entity by entity basis, which works fine, except since there are cards inside cards the spacing and drop shadow spoil the layout. Is there a way to make to make the card look like a standard single card with respect to the interior elements?

  - type: entities
    title: London Underground
    show_header_toggle: false
    entities:
      - type: custom:card-modder
        style:
          --paper-item-icon-color: brown
          padding: 0
          background: none
        card:
          type: custom:hui-entities-card
          entities:
            - sensor.bakerloo
      - type: custom:card-modder
        style:
          --paper-item-icon-color: red 
          padding: 0
        card:
          type: custom:hui-entities-card
          entities:
            - sensor.central

The CSS property you’re looking for is box-shadow.

By the way, you could just put in a custom:hui-sensor-entity-row or whatever that actually becomes. See the example here: https://github.com/thomasloven/lovelace-card-modder#templates

Thanks Thomas, the sensor entity row approach worked best, for those interested code and output below.

btw what is the equivalent of hui-sensor-entity-row within a glance card?

  - type: entities
    title: London Underground
    show_header_toggle: false
    entities:
      - type: custom:card-modder
        style: { --paper-item-icon-color: brown }
        card:
          type: custom:hui-sensor-entity-row
          entity: sensor.bakerloo
      - type: custom:card-modder
        style: { --paper-item-icon-color: red }
        card:
          type: custom:hui-sensor-entity-row
          entity: sensor.central
      - type: custom:card-modder
        style: { --paper-item-icon-color: blue }
        card:
          type: custom:hui-sensor-entity-row
          entity: sensor.piccadilly
      - type: custom:card-modder
        style: { --paper-item-icon-color: cyan }
        card:
          type: custom:hui-sensor-entity-row
          entity: sensor.waterloo_city
      - type: custom:card-modder
        style: { --paper-item-icon-color: black }
        card:
          type: custom:hui-sensor-entity-row
          entity: sensor.northern

1 Like

Is there a Problem with 0.86.2?
I just updated my 0.84 to play arround with folding cards but with the latest ha release it just wont load.
i downloaded card-tools.js manually.

CARD-TOOLS IS INSTALLED shows in the console.

UPDATE:
will try to remove anything else besides the folding card i want to test and report back

Lots of breaking changes between 0.84 and 0.86. I suggest temporarily stripping your configuration down to a bare minimum to make sure things work one at a time.

ok removed everything besides this:

title: My Awesome Home
resources:
  - url: /local/card-tools.js?v=1
    type: js    
views:

  - title: Startseite
    id: start
    cards:
      - type: entities
        title: Folding entities
        entities:
          - entity: sensor.eurotronic_eur_spiritz_wall_radiator_thermostat_temperature
            name: Temperatur
          - type: custom:fold-entity-row
            head: input_select.bath_thermostat_mode
            items:
              - input_number.bath_heat_temp
              - input_number.bath_eco_temp

But it still wont load with 0.86.2…

It might also be a good idea to load fold-entity-row, perhaps?

Assuming you got the latest versions of both card-tools and fold-entity-row.

This message was automatically closed after reaching the maximum limit of 500 replies.

popup-card is match made in heaven for my roku-card! Thanks @thomasloven! :tv:

5 Likes

Does anyone know if it is possible to set a border radius for picture element cards? I have rounded corners throughout my setup, but it doesn’t apply to picture elements which makes the interface look a bit unfinished. Any way to do this?

See screenshots:

I have the custom:card-modder installed and works nice for all other cards.

Add overflow: hidden to the list of styles.

2 Likes

Great gonna test this when I get back, if it works you are the man :stuck_out_tongue: (you already are, but even more then). Thanks

1 Like

Could I ask you share the code for this (combining miniplayer with popup)?