kinghat / tabbed-card

a custom card for home assistant that utilizes tabs to segregate individual cards.
MIT License
87 stars 10 forks source link

Does not tab in certain browsers #61

Closed jofotoo closed 1 year ago

jofotoo commented 1 year ago

I cannot get the other tabs to show in Google Chrome; it never leaves the first tab. HA iOS app and Safari on Mac do work, though.

Home Assistant 2022.12.6 Supervisor 2022.12.1 Operating System 9.4 Frontend 20221213.0 - latest

Let me know if you need further info.

kinghat commented 1 year ago

can you post your config and a screenshot or video of the issue please?

jofotoo commented 1 year ago

Sure, here's a video

Config:

type: custom:tabbed-card
styles: ...
tabs:
  - attributes:
      label: Input
    card:
      type: entities
      entities:
        - entity: input_datetime.dog_spray
          type: custom:mushroom-entity-card
          tap_action:
            action: call-service
            service: script.set_a_time
            data:
              ent: input_datetime.dog_spray
        - entity: input_datetime.dog_pill
          type: custom:mushroom-entity-card
          tap_action:
            action: call-service
            service: script.set_a_time
            data:
              ent: input_datetime.dog_pill
        - entity: input_datetime.dog_ate
          type: custom:mushroom-entity-card
        - entity: input_datetime.dog_drank
          type: custom:mushroom-entity-card
        - entity: input_datetime.dog_food_placed
          type: custom:mushroom-template-card
          primary: >-
            Dog food placed @ {{ states('input_datetime.dog_food_placed') |
            as_timestamp | timestamp_custom('%A %m/%d at %I:%M %p') }}
          secondary: >-
            {{ states('input_datetime.dog_food_placed') | as_datetime |
            relative_time }}
          icon: mdi:bowl-mix
          icon_color: >-
            {% if (now() | as_timestamp - 
            state_attr('input_datetime.dog_food_placed', 'timestamp')) /60 > 
            states('input_number.dog_food_expiration_min')| int %}

            #ff0000
             {% elif (now() | as_timestamp -  state_attr('input_datetime.dog_food_placed', 'timestamp')) /60 > (states('input_number.dog_food_expiration_min')| int -30) %}
            #ffff00

            {% endif %}
          tap_action:
            action: call-service
            service: script.set_a_time
            data:
              ent: input_datetime.dog_food_placed
            target: {}
  - attributes:
      label: Output
    card:
      type: entities
      entities:
        - entity: input_datetime.dog_walked
          type: custom:mushroom-entity-card
        - entity: input_datetime.dog_peed
          type: custom:mushroom-entity-card
        - entity: input_datetime.dog_pooped
          type: custom:mushroom-entity-card
kinghat commented 1 year ago

thanks. everything looks fine. its odd because it works everywhere else. i tested on chromium(linux) and its fine:

https://user-images.githubusercontent.com/16073360/210275625-e930a021-a512-4256-858f-618538a47eaa.mp4

maybe clearing the browser/page cache and restarting the browser :thinking: im sorry, atm i cant think of what could be causing that off the top of my head. please follow up if you end up resolving it. i will as well.

kinghat commented 1 year ago

you can reopen if you werent able to resolve this as being a local issue.