piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily
Apache License 2.0
3.3k stars 311 forks source link

[Bug]: Template card update issue #568

Open theetron opened 2 years ago

theetron commented 2 years ago

Current Behavior

I have multiple template cards calling the remote send command. These cards are in a grid card. In design mode, switching between these different template cards, the following items are not updated but stay all the same:

Expected Behavior

I want to see all my configured values for the remote send command for all my template cards when I select them in design mode.

Steps To Reproduce

  1. add a grid card with a few columns
  2. put in a few template cards and select for all the remote.send_command service
  3. specify some settings for each card and you will notice the above 4 mentioned attributes are not changed when switching between these cards.

Environment

- Home Assistant Core 2022.6.7
- Home Assistant Supervisor 2022.05.3
- Home Assistant OS 8.2
- Browser: Chrome
- Device: rPi4
- Mushroom v2.0.0

Anything else?

No response

KTibow commented 2 years ago

Are you using a translator or are not native to English? I can't really understand you. Could you add a video recording or screenshots?

theetron commented 2 years ago

I use the native english (default) settings.

https://user-images.githubusercontent.com/2996663/176852786-4d81f317-5c38-4221-ad9b-3828042a62d5.mp4

piitaya commented 2 years ago

Can you provide your entire yaml ?

Note : Editor experience on mobile is not great 😢

theetron commented 2 years ago

This is the yaml of the card:

type: vertical-stack
cards:
  - type: custom:mushroom-title-card
    title: ''
    subtitle: Apparaten
  - type: markdown
    content: '**ledstrip**'
  - square: false
    columns: 5
    type: grid
    cards:
      - type: custom:mushroom-template-card
        primary: ''
        secondary: ''
        icon: mdi:lightbulb-off
        icon_color: black
        tap_action:
          action: call-service
          service: remote.send_command
          data:
            device: ledstrip
            command:
              - light off
          target:
            device_id: cfbd342087c08c86344667e0391dfb76
        layout: vertical
        double_tap_action:
          action: none
        hold_action:
          action: none
      - type: custom:mushroom-template-card
        primary: ''
        secondary: ''
        icon: mdi:lightbulb
        icon_color: red
        tap_action:
          action: call-service
          service: remote.send_command
          data:
            device: ledstrip
            command:
              - light on
              - red
          target:
            device_id: cfbd342087c08c86344667e0391dfb76
        layout: vertical
        hold_action:
          action: none
        double_tap_action:
          action: none
      - type: custom:mushroom-template-card
        primary: ''
        secondary: ''
        icon: mdi:lightbulb
        icon_color: blue
        tap_action:
          action: call-service
          service: remote.send_command
          data:
            device: ledstrip
            command:
              - light on
              - blue
          target:
            device_id: cfbd342087c08c86344667e0391dfb76
        layout: vertical
        double_tap_action:
          action: none
        hold_action:
          action: none
      - type: custom:mushroom-template-card
        primary: ''
        secondary: ''
        icon: mdi:lightbulb
        icon_color: green
        tap_action:
          action: call-service
          service: remote.send_command
          data:
            device: ledstrip
            command:
              - light on
              - green
          target:
            device_id: cfbd342087c08c86344667e0391dfb76
        layout: vertical
        double_tap_action:
          action: none
        hold_action:
          action: none
      - type: custom:mushroom-template-card
        primary: ''
        secondary: ''
        icon: mdi:lightbulb
        icon_color: white
        tap_action:
          action: call-service
          service: remote.send_command
          data:
            device: ledstrip
            command:
              - light on
              - white
          target:
            device_id: cfbd342087c08c86344667e0391dfb76
        layout: vertical
        double_tap_action:
          action: none
        hold_action:
          action: none
      - type: custom:mushroom-template-card
        primary: ''
        secondary: flash
        icon: mdi:numeric-1-box
        icon_color: ''
        tap_action:
          action: call-service
          service: remote.send_command
          data:
            device: ledstrip
            command:
              - light on
              - flash
          target:
            device_id: cfbd342087c08c86344667e0391dfb76
        layout: vertical
        double_tap_action:
          action: none
        hold_action:
          action: none
      - type: custom:mushroom-template-card
        primary: ''
        secondary: strobe
        icon: mdi:numeric-2-box
        icon_color: ''
        tap_action:
          action: call-service
          service: remote.send_command
          data:
            device: ledstrip
            command:
              - light on
              - strobe
          target:
            device_id: cfbd342087c08c86344667e0391dfb76
        layout: vertical
        double_tap_action:
          action: none
        hold_action:
          action: none
      - type: custom:mushroom-template-card
        primary: ''
        secondary: fade
        icon: mdi:numeric-3-box
        icon_color: ''
        tap_action:
          action: call-service
          service: remote.send_command
          data:
            device: ledstrip
            command:
              - light on
              - fade
          target:
            device_id: cfbd342087c08c86344667e0391dfb76
        layout: vertical
        double_tap_action:
          action: none
        hold_action:
          action: none
      - type: custom:mushroom-template-card
        primary: ''
        secondary: flash
        icon: mdi:numeric-4-box
        icon_color: ''
        tap_action:
          action: call-service
          service: remote.send_command
          data:
            device: ledstrip
            command:
              - light on
              - smooth
          target:
            device_id: cfbd342087c08c86344667e0391dfb76
        layout: vertical
        double_tap_action:
          action: none
        hold_action:
          action: none
        badge_icon: ''
        badge_color: ''
  - square: false
    columns: 2
    type: grid
    cards:
      - type: custom:mushroom-light-card
        entity: light.projector_hessel
        icon: mdi:lightbulb-night
        use_light_color: false
        show_color_temp_control: false
        show_color_control: true
        show_brightness_control: true
        name: Projector
      - type: custom:mushroom-template-card
        primary: Playstation 5
        secondary: '{{states(''switch.wcd_04'')}}'
        icon: mdi:power-plug-outline
        icon_color: |-
          {% if is_state('switch.wcd_04','on') %}
          blue
          {% endif %}
        entity: switch.wcd_04
        tap_action:
          action: more-info
KTibow commented 2 years ago

When I said to send screenshots/video, I meant of the problem, not how you configured it.

piitaya commented 2 years ago

I reproduced the problem. I don't known if it a problem with the grid card or the mushroom card. I will test with official cards 🙂