question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Combination of button-card and decluttering-card causing additional empty space

See original GitHub issue

Checklist:

  • [ x] I updated to the latest version available
  • [ x] I cleared the cache of my browser

Release with the issue: 0.6.3

Last working release (if known): N/A

Browser and Operating System:

arch x86_64
dev false
docker true
hassio false
installation_type Home Assistant Container
os_name Linux
os_version 4.19.107-Unraid
python_version 3.7.7
timezone America/Chicago
version 0.111.2
virtualenv false

Description of problem:

When I use decluttering-card with button-card and it causes additional space after each button.

If I use only button-card then no issues.

              - type: custom:decluttering-card
                template: motion_sensors_battery_square
                variables:
                  - name: Bedroom
                  - entity: binary_sensor.wyzesense_777bfd2e
                  - entity2: sensor.tmpl_wyze_br_motion_sensor_battery

              - type: 'custom:button-card'
                template: blank_card_2px_width_style

              - type: custom:decluttering-card
                template: motion_sensors_battery_square
                variables:
                  - name: Laundry
                  - entity: binary_sensor.wyzesense_77a5f319
                  - entity2: sensor.tmpl_wyze_lr_motion_sensor_battery

Screen Shot 2020-06-15 at 4 06 10 PM

Screen Shot 2020-06-15 at 4 11 44 PM

Screen Shot 2020-06-15 at 4 13 26 PM

Javascript errors shown in the web inspector (if applicable):

No errors

Additional information:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
RomRidercommented, Jun 16, 2020

You can add invisible buttons on the left (like 2 for eg) to reduce the overall size:

type: custom:button-card
color_type: blank-card

setting width and height should be only used in very specific case as it completely breaks when used with different devices. That’s why aspect_ratio was introduced as it respects how lovelace works

0reactions
bzellmancommented, Mar 6, 2022

I just ran against this myself.

I’ve added CSS Card Mod via HACS and then just floated the button as needed.

ex:

decluttering_templates:
  group_toggle_button:
    card:
      type: "custom:button-card"
      entity: "[[entity]]"
      show_label: false
      state_color: true
      show_name: false
      color_type: icon
      color: rgb(145, 226, 237)
      icon: mdi:power
      tap_action:
        action: toggle
      styles:
        card:
          - height: 40px
          - width: 75px
          - border-radius: 8px
      style: |
        :host{
          padding-top: 7px;
          float: right;
        }

Went from: Screen Shot 2022-03-06 at 1 41 25 PM

To This: Screen Shot 2022-03-06 at 1 40 11 PM

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lovelace: Decluttering Card - Dashboards & Frontend
Hey, I've created a new card that helps you declutter your LL config if you use multiple times the same block of cards...
Read more >
The Top 9 Expert Strategies To Declutter Your Home
I inspire others to own less and live more. ... My rigorous decluttering method focuses on room-by-room ... Step 1: Empty the space....
Read more >
How to Declutter and Organize Your Craft Space
The important thing throughout this packing process is to get the boxes OUT of your space, and not to stack them in another...
Read more >
Tidy Tips from Professional Organizers
We're constantly helping clients declutter their belongings. Believe it or not, holiday cards are a major culprit for holiday storage clutter. Here's our...
Read more >
A Guide to Getting Rid of Almost Everything
I gathered my unwanteds and piled them in the living room. ... program will compensate you in Amazon gift cards; and SellCell compares...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found