Text scrolling effect not working when using custom states #2600
Replies: 7 comments
|
I have the same error, and the same thing happens with ${card.querySelector('.bubble-name').innerText. Kepernyofelvetel.2026-01-06.000710.mp4 |
|
Having the same issue currently when I try to template the state in a module by following the Templating texts (like name or state) example. The code adds the distance provided by the proximity integration to the state, when the person is not at home. Module Code: ${card.querySelector('.bubble-state').innerText = hass.formatEntityState(hass.states[entity]) +
(state !== 'home'
&& this.config.person_card?.distance_entity
&& hass.states[this.config.person_card.distance_entity]
&& !isNaN(parseFloat(hass.states[this.config.person_card.distance_entity].state))
? ' • ' + (parseFloat(hass.states[this.config.person_card.distance_entity].state) / 1000).toFixed(1).replace('.', ',') + ' km'
: ''
)
}Editor schema for the sake of completeness: - name: distance_entity
label: Distance Entity
selector:
entity:
filter:
domain: sensorIt also says If you want to template the state (.bubble-state) don't toggle show_state: true just toggle show_attribute: true without any attribute.". This hint has been followed. |
|
Same here, please can you fix it? Thank you very much. |
|
|
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
|
Still present |
|
Same issue here. Spent quite a bit of time trying to solve but haven't yet found a method that works. If anybody finds a fix I'd be very grateful. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
The text scrolling effect is not applied to custom states that were written using the “Advanced example: Get state/attribute from other entities” module or the
Custom styles & JS templatesblock.To Reproduce
Steps to reproduce the behavior:
Create a Bubble Card, e.g. "Button" with button type "State".
Either set the state via “custom styles & JS templates” or via the “Advanced example: Get state/attribute from other entities” module.
Shrink the layout card so that the text scrolling effect would be activated.
Now you can see that the text scrolling effect is not applied to the state.
Expected behavior
The text scrolling effect should be displayed correctly.
YAML
Information (please complete the following information):
Additional context
I can't use hass.formatEntityState and have to translate my entity state manually, because there is no german translation provided by the integration the sensor is coming from.
Thank you! 🍻
All reactions