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

After using translations, the switch/binary_sensor entities are misbehaving. #156

Open
danielszilagyi opened this issue Jan 28, 2025 · 6 comments · May be fixed by #157
Open

After using translations, the switch/binary_sensor entities are misbehaving. #156

danielszilagyi opened this issue Jan 28, 2025 · 6 comments · May be fixed by #157

Comments

@danielszilagyi
Copy link

danielszilagyi commented Jan 28, 2025

Installed the latest software via the experimental HA addon (which supports --lang) and configured to use Hungarian language.
My HA display language is English.
Getting similar entries in the log:

Jan 28 21:45:24 homeassistant homeassistant[631]: 2025-01-28 22:45:24.436 INFO (MainThread) [homeassistant.components.mqtt.binary_sensor] No matching payload found for entity: binary_sensor.wolf_fgb_0x3_250019_zuendung with state topic: Wolf/192.168.20.10/FGB_0x8/Zuendung/text. Payload: 'Ki'
Jan 28 21:45:24 homeassistant homeassistant[631]: 2025-01-28 22:45:24.437 INFO (MainThread) [homeassistant.components.mqtt.binary_sensor] No matching payload found for entity: binary_sensor.wolf_fgb_0x3_250020_brenner with state topic: Wolf/192.168.20.10/FGB_0x8/Brenner/text. Payload: 'Be'

Ki and Be correspond to off and on but I think the entity values should not be localized.
Turning switch entities on or off is also not possible and all switches come up in a weird way.
I think it should be related to entity default states, but I think it is on/off and not localized even if the HA display language is different from English.

It seems to me that the HA discovery logic should not do this: https://github.com/zivillian/ism7mqtt/pull/155/files#diff-dfd5ab0b3144df7715a9a458831683a18839a6c43de1277b377ee558572a5e2dL269

For entities that have only on/off state and not a string state. Unfortunately I can only read in this programming language but hope it can be fixed.

@danielszilagyi
Copy link
Author

I have to correct myself, it's something else, the payload_on and payload_off are not translated:

Image

I deleted and recreated the devices to verify if it's not something left over. No change.

@papegaaij
Copy link

I can confirm this issue. In Dutch, all on/off switches and sensors no longer report the current value.

@danielszilagyi danielszilagyi linked a pull request Feb 14, 2025 that will close this issue
@danielszilagyi
Copy link
Author

Opened https://github.com/zivillian/ism7mqtt/pull/157/files which fixed the issue for me

@szobbal
Copy link

szobbal commented Feb 16, 2025

Ugyan ezt a hibát fedeztem fel:
https://github.com/b3nn0/hassio-addon-ism7mqtt/issues/82

Lehet majd kereslek majd, hogy értsem mit csináljak. :)

@danielszilagyi
Copy link
Author

Ugyan ezt a hibát fedeztem fel: https://github.com/b3nn0/hassio-addon-ism7mqtt/issues/82

Lehet majd kereslek majd, hogy értsem mit csináljak. :)

A forkomban meg van fixelve. De szerintem idővel javitja majd a maintainer is, lehet hogy szebben, mint én.
Ha addig is használni akarod akkor ezt az addon repo-t add hozzá a rendszeredhez: https://github.com/danielszilagyi/hassio-addon-ism7mqtt

@milokmet
Copy link

milokmet commented Mar 2, 2025

@danielszilagyi thanks, after applying your PR, it's working for me. But wouldn't be better to follow the /value of the parameter instead of the /text that could be localized and let the HA deal with it, or do i missed something why is there text used?

And it seems like there are binary_sensors for open/closed, that are not translated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants