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

Templated expressions not updated in browser_mod popup window #880

Open
mosave opened this issue Nov 2, 2024 · 4 comments
Open

Templated expressions not updated in browser_mod popup window #880

mosave opened this issue Nov 2, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@mosave
Copy link

mosave commented Nov 2, 2024

Issue description:

button-card displayed in browser_mod popup window properly reacts to triggering entities according to styling/states configuration but NOT updates templated expression. It looks like templates calculated only once after I open/reopen browser_mod popup window.

Exactly same button-card definition placed directly to dashboard trigger updates as expected both with styling/states definition and templated expressions

Button-card version: 4.1.2
browser-mod version: 2.3.1

To Reproduce
This is the configuration I used:

        - type: custom:button-card
          entity: binary_sensor.17_heater_error
          icon: mdi:water-boiler-alert
          color: rgb(192,0,0)
          name: "Water heater mode"
          state_display: '[[[ return states["binary_sensor.17_heater_error"].state; ]]]'
          show_name: true
          show_icon: true
          show_state: true
          triggers_update: all
          tap_action:
            action: more-info
            entity: binary_sensor.17_heater_error
          state:
            - value: 'off'
              icon: 'mdi:water-boiler'
              color: 'var(--paper-item-icon-active-color)'
              styles:
                name:
                  - color: 'var(--paper-item-icon-active-color)'
                state:
                  - color: 'var(--paper-item-icon-active-color)'
          styles:
            card:
              - margin: 0
              - padding: 0
              - border: none
              - box-shadow: none
            icon:
              - margin: 0
              - padding: 0
            grid:
              - grid-template-areas: "'i n s'"
              - grid-template-columns: 1fr 6fr 3fr
            name:
              - justify-self: start
              - margin: 0
              - padding: 0
              - color: "rgb(192,0,0)"
            state:
              - margin: 0
              - color: "rgb(192,0,0)"

Desktop (please complete the following information):

  • Browser: MS Edge
  • Version 130.0.2849.56 (Official build) (64-bit)
@mosave mosave added the bug Something isn't working label Nov 2, 2024
@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Nov 2, 2024

so probably better posted as an issue in browser-mod repo, as button-card behaves properly?
Check issues, seems an obvious issue to already exist

btw, why use the

state_display: '[[[ return states["binary_sensor.17_heater_error"].state; ]]]'

if you show state of this entity it already should be there

why the use of

triggers_update: all

? you shouldnt need that at all in this case

@mosave
Copy link
Author

mosave commented Nov 2, 2024

btw, why use the

state_display: '[[[ return states["binary_sensor.17_heater_error"].state; ]]]'

It is reduced template to locate issue itself, as well as "all" flag
Actual template more complex and constructs text based on several entities.

Thank you for answer, I will chase browser_mod then :)

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Nov 2, 2024

I see.

not sure how many entities but you better just list them than use ‘all’ as that is really what it is. All. In your system. And thus very inefficient….

@mosave
Copy link
Author

mosave commented Nov 2, 2024

Thanks, it is exactly as I do usually, but trying every possibility in attempts to make dashboard alive again :)

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

2 participants