Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decluttering inside a core grid card behaves oddly, changes size of the grid tile #59

Open
Mariusthvdb opened this issue Jan 31, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Mariusthvdb
Copy link

Mariusthvdb commented Jan 31, 2023

Checklist:

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

Release with the issue:
0.6.3 HACS

Home Assistant 2023.2.0b7
Supervisor 2023.01.1
Operating System 9.4
Frontend-versie: 20230130.0 - latest

Last working release (if known):

Browser and Operating System:
Any really tested Chrome, Safari, Firefox on Mac

Description of problem:

seems decluttering changes the way a grid card sees the final card, in this case a custom minimalistic area card.

first card is decluttered and only shows the top section of the grid 1st card
2nd card is a verbose card and shows full size

  - type: grid
    columns: 4
    cards:

        - type: custom:decluttering-card
          template: minimalistic_area
          variables:
            - title: ' '
            - main_id: light.laundry_ceiling
            - temp_id: sensor.laundry_sensor_temperature
            - humid_id: sensor.laundry_sensor_illuminance
            - motion_id: binary_sensor.laundry_sensor_motion
            - image: bijkeuken_klein.jpg
            - path: bijkeuken

        - type: custom:minimalistic-area-card
          card_mod:
            style: |
              ha-card {
                filter: {{'grayscale(0%)' if
                          (is_state('light.laundry_ceiling','on') or
                           is_state('binary_sensor.laundry_sensor_motion','on'))
                          else 'grayscale(100%)'}};
                border-top: {{'1rem solid red' if is_state('binary_sensor.laundry_sensor_motion','on')
                      else 'none'}};
              }
#           title: Laundry
          image: /local/images/areas/bijkeuken_klein.jpg
          shadow: false
          tap_action:
            action: navigate
            navigation_path: /ui-sub-views/bijkeuken
          hold_action:
            action: call-service
            service: light.toggle
            service_data:
              entity_id: light.laundry_ceiling
          entities:
            - entity: sensor.laundry_sensor_temperature

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


Additional information:

decluttering template is a verbosely copied original card, albeit with variables:

card:
  type: custom:minimalistic-area-card
  card_mod:
    style: |
      ha-card {
        filter: {{'grayscale(0%)' if
                  (is_state('[[main_id]]','on') or
                   is_state('[[motion_id]]','on'))
                  else 'grayscale(100%)'}};
        border-top: {{'1rem solid red' if is_state('[[motion_id]]','on')
              else 'none'}};
      }
  title: '[[title]]'
  hide_unavailable: true
  area: '[[area]]'
  image: /local/images/areas/[[image]]
  shadow: false
  tap_action:
    action: navigate
    navigation_path: /ui-sub-views/[[path]]
  hold_action:
    action: call-service
    service: light.toggle
    service_data:
      entity_id: '[[main_id]]'
  entities:
    - entity: '[[temp_id]]'
    - entity: '[[humid_id]]'

Scherm­afbeelding 2023-01-31 om 16 10 23

all other functionality is alive and working perfectly, including the card_mod templates and actions

@Mariusthvdb Mariusthvdb added the bug Something isn't working label Jan 31, 2023
@Mariusthvdb Mariusthvdb changed the title decluttering inside a core grid card behaves odd decluttering inside a core grid card behaves oddly, changes size of the grid tile Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant