-
Notifications
You must be signed in to change notification settings - Fork 249
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
Entity State displays „raw“ Informations #685
Comments
I have a similar problem. After the update, on and off are now displayed and no longer the German designation. The same applies to windows/doors as on/off. In Home Assistant, however, it is correctly displayed as open/closed. |
I have the same problem in italian language after HA update to 2023.4.3, the entity state is displayed in English language not in italian as in HA 2023.4.2. |
@mcfly2283 are you able to change the issue's topic? maybe "entity state displays raw information, not local/translated value" or something similar would be more fitting? |
seems identical to benct/lovelace-multiple-entity-row#292 (comment) quoting Frontend dev Paul:
fixing this would probably also fix the long standing FR/Issue on respecting core configured icons also, hopefully, setting a rounding in HA core would also be used by button-card if that were to be implemented |
Done 👍 |
same problem here but in spanish |
Same here |
Same with my Binary Sensors for windows and doors - previously they would show a 'state' of Open or Closed, but now they show the actual Binary state of On or Off
|
Hi all, Kind Regards |
I don‘t think there is a workarounds. This issue is related to every 3rd Party Card. It is a bit courios that there was no breaking change for the devs before… |
You could use state_display as workaround. |
Perfect !! work fine I added the statement in the card :
I can set the state to my liking .. in italian. Many thanks |
So I can't get it with the state_display somehow. No matter how I embed it, it doesn't work. There won't be an update anymore because the button card is no longer maintained, right? Maybe someone has a code example how to include state_display exactly? |
what are you trying to do? we cant help you if you dont give us anything. state_display is really easy btw. |
I've tried everything. It just doesn't work. Only on or off is displayed. I think I'm just too stupid for that g
|
uhm.... you dont have state_display set at all? also, always post a minimal failing config, not complete dashboards..... there is a lot wrong here:
label and name are identical you should really read the docs, and move to the community. try:
or any other translation you want ofc |
guys, let's remember, that the while it sure works, and I thought about that in the first place - there are many situations it can't and won't be used [unfortunately adding this "patch" to all cards on bigger dashboards is just ridiculous pain in the... you know ;) my dashboard is one of them..] |
You really should have added the 'imho' there... |
you think? I don't see it as just "my opinion" :) believe me, if I'd know a bit about developing cards/extensions/integrations, I'd be more than happy to prepare pull request and fix it. but sadly I am total noob in terms of dealing with python, or programming at all ;( |
Well, state_display is capable of way more than fixing this, so it is hardly a hack, but has been a long standing main feature. And yes, it would be great if the HA change could be adapted by button-card. But that too has been posted at least 2 weeks ago. So agreed on the latter, however no use stating it over and over. Meanwhile, adapt your cards. On the positive side: you won't be forced to use the sometimes silly official lokalizations... |
OMG. dude, this is a hack in THIS particular situation!
this is plainly a joke, right? |
Test this: |
## [4.0.0-dev.1](v3.5.0...v4.0.0-dev.1) (2023-07-23) ### ⚠ BREAKING CHANGES * this might break some of your color settings ### Bug Fixes * Color are now aligned with HA > 2022.12 ([685d55e](685d55e)), closes [#635](#635) * localization fix ([02dfab3](02dfab3)), closes [#685](#685) [#693](#693) * lock icon was displaying over more-info dialog ([bf075b0](bf075b0)), closes [#694](#694) * lock would go out of the button ([0b3e4d3](0b3e4d3))
🎉 This issue has been resolved in version 4.0.0-dev.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
HI Rom, thanks for updating, many issues have been resolved, also those state translations (binary_sensor motion now no longer show on/off and battery sensors show there correct device_class icon And color ;-) Again, thank you very much for that, device_class has been a long standing wish, even from far before the translations issue... Now you're back, please let m quickly followup with this while it should translate to Regenachtig: confg:
please have another look at that? |
@Mariusthvdb, I'm about to release a new version with support for new actions that should also fix this translation issue. |
…e ones This also fixes the latest translations missing and starts the work to remove custom-cards-helper from the dependencies. BREAKING CHANGE: Requires HA 2023.4 minimum. Support for the new action format (`target` is also be supported), `service_data` should be renamed to `data` (but it still works with the old format) Fix #711, #685
## [4.0.0-dev.3](v4.0.0-dev.2...v4.0.0-dev.3) (2023-07-23) ### ⚠ BREAKING CHANGES * **actions:** Requires HA 2023.4 minimum. Support for the new action format (`target` is also be supported), `service_data` should be renamed to `data` (but it still works with the old format) ### Features * **actions:** Support for the new action (assist) and all the future ones ([d9c17a4](d9c17a4)), closes [#711](#711) [#685](#685)
confirmed: great. Btw, for this specific integration (entity): why wouldn't this show the set entity_picture. this is a buienradar entity, and the integration sets an entity_picture as you can see in the screenshot above. Currently it is Cloudy (translates to Bewolkt), ent the entity_picture shows as: silly me.... I hadn't set the card to show it......
it now does, however ugly in this size. just showing for reference, all perfect now: |
This translation will be possible in the next beta release. I just commited the code for that @Mariusthvdb |
just installed b6, but still those entity templates use the raw value, was this supposed to have changed with that? (also, still need that .toString() on the notification custom field |
Yes, check the documentation, you need to use a function.
For you that would be as simple as: or for the other one: |
Jerome, on localizing attributes, might be cool to also add the to the documentation, on translating local 'entity' attributes
in addition to what you posted above on localizing.. |
It's in the example of the documentation, am I wrong? : EDIT: Oh I see what you mean, about 'local' entity. The entity of the card itself... I'll add an example |
no not wrong.... it took me a while to figure out this (using an external entity)
would work likewise for a local entity
just believe it would help prevent questions ;-) |
exactly that yes. Might me be, but since I learned the hard way that templating those global variables hurts the UI performance much more than local variables, my eye is just focussed on it, and I try to prevent it as much a possible. Not sure if from your perspective this still holds ( I mean, the warning was written in a completely different stage of HA development, actually still using the states frontend....) but still, can hurt to be aware. |
## [4.0.0](v3.5.0...v4.0.0) (2023-07-29) ### ⚠ BREAKING CHANGES * **helpers:** If you were using any of the beta before `4.0.0-dev14`. Please replace all the calls to helper functions with `helpers.xxx` for eg. `helpers.relativeTime(entity.state)` or `helpers.localize(entity)` * **hacs:** Minimum required HA Version is now 2023.7 * **actions:** Requires HA 2023.4 minimum. Support for the new action format (`target` is also be supported), `service_data` should be renamed to `data` (but it still works with the old format) * **icons:** This might break your card-mod setup * this might break some of your color settings ### Features * **action:** `repeat_limit` for `hold_action` ([73c216f](73c216f)), closes [#564](#564) [#555](#555) * **actions:** Support for the new action (assist) and all the future ones ([d9c17a4](d9c17a4)), closes [#711](#711) [#685](#685) * **custom_fields:** Add `do_not_eval` to stop evaluating js templates in an embedded card ([1638cf8](1638cf8)) * **helpers:** all template functions are now available through the `helpers` object ([f22ed69](f22ed69)) * **icons:** replace ha-icon with ha-state-icon to follow new HA's icons per domain automatically ([ab6a3f5](ab6a3f5)) * **templates:** new `relativeTime` function to display a relative time in a template and update it automatically ([965a3d7](965a3d7)), closes [#701](#701) * **templates:** New date and time format helpers ([9b4fb05](9b4fb05)) * **variables:** A variable can depend on another variable based on their name's alphabetical order ([8cddccb](8cddccb)), closes [#656](#656) * Force the `numeric_precision` for states which are numbers ([24d75c2](24d75c2)) * new helper functions for date/time in templates ([2b75993](2b75993)), closes [#701](#701) * Support for localization in templates ([5de2dc9](5de2dc9)) ### Bug Fixes * *_action more-info entity as a template was not evaluated ([02441b2](02441b2)), closes [#734](#734) * `group_expand` now works even if the entity is not a `group.xxx` ([f192ded](f192ded)), closes [#645](#645) * Color are now aligned with HA > 2022.12 ([685d55e](685d55e)), closes [#635](#635) * custom fields would sometime throw unsafeHTML errors ([c67e1d5](c67e1d5)), closes [#725](#725) * ha-icon (if in custom_fields) size was weird ([a448c8e](a448c8e)) * ha-state-icon CSS selector was wrong ([a1bb39a](a1bb39a)) * icon would be cut with card height defined ([19f8393](19f8393)), closes [#731](#731) * localization fix ([02dfab3](02dfab3)), closes [#685](#685) [#693](#693) * lock icon was displaying over more-info dialog ([bf075b0](bf075b0)), closes [#694](#694) * lock would go out of the button ([0b3e4d3](0b3e4d3)) * non string fiels would error with an unsafeHTML error ([d65c347](d65c347)), closes [#725](#725) * numerical states would not follow HA's format ([72d7c41](72d7c41)), closes [#662](#662) * optimize contrast color compute ([35109c3](35109c3)) * relativeTime didn't support to set the first letter uppercase ([f8b9b09](f8b9b09)), closes [#735](#735) * Some cards with child cards wouldn't be clickable ([9f21c58](9f21c58)) * text/icon contrast when using label-card ([01e199b](01e199b)) * variable which were objects were only evaluated once ([e40bda9](e40bda9)) * **templates:** `variables` was `undefined` if none where provided. ([fad332b](fad332b)), closes [#718](#718) * tooltip would show over everything ([1bc8f99](1bc8f99)) * **color:** main config `color` was broken ([b93c996](b93c996)) * **hacs:** minimum HA version 2023.7 ([db3b394](db3b394)) * **templates:** don't use the `numeric_precision` from the card config for `localize` in js templates by default ([2cc384f](2cc384f))
🎉 This issue has been resolved in version 4.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
With the latest Version of HA 2023.4.3 the State of a Person inside a Button-Card is displayed as state "home" and "not_home", not as usual with the corresponding German Translation "Zu Hause" or "Abwesend". Other Zones and other Native-Cards are right.
Button-Card Version: [3.5.0] (2023-04-02) latest
In this case it seems there is a Problem related to Button-Card and not with HA.
Button-Card:
Native Card:
Syntax:
- type: custom:button-card
entity: person.XXYY
show_name: false
show_state: true
show_entity_picture: true
styles:
card:
- font-size: 14px
- padding: 10%
icon:
- width: 70px
- height: 70px
- padding: 0px 0px 0px 0px
The text was updated successfully, but these errors were encountered: