Closed NoRi2909 closed 18 hours ago
Hey there @home-assistant/core, @raman325, mind taking a look at this issue as it has been labeled with an integration (siren
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
siren documentation siren source (message by IssueLinks)
Is this the same as the water heater one?
No, this seems to be different.
The water heater just lacks the "title" key causing the translation to miss.
Here everything is present in the component, but neither the actions nor the name show up in the UI.
So you mean the siren entity is not loaded?
First of all the translated string from the "title" key does not show up in the UI where you can select the device type, for example when redefining a switch. That's documented in https://github.com/home-assistant/frontend/issues/22415
And if you go to Developer Tools > Actions and type "siren" into the Action field none of the defined three actions from the component show up. Same in automations or scripts. That's what this bug documents.
I went through redefining a switch as a siren. After that this bug resolves itself: Siren now shows up correctly translated in all places and the actions are available:
So this device type does not seem to get pre-loaded by the frontend?
I think we only show relevant entities. I can't find water heaters, valves and sirens on my instance for example
No, for water heaters and valves the actions do show up without the workaround:
For Water Heater it's just the missing "title" so it's still English in the German UI.
For Valves we have neither bug, everything correct from the start:
Because you have valves and waterheaters?
No, I don't have any water heater or valves in my install.
For me the actions come up, and it says "No matching entities found".
Could it be that you have integrations that can add water heaters or valves? I don't have a proper home so I don't have my heating or so in my HA so I don't have any integration that supports it
Might be that the ViCare integration activates something like that. But the bug with the missing "title" for "water heater" is really not influenced by that. The line of text is definitely missing there.
Regarding Siren vs. Valve: Try setting up a Helper 'Change device type of a switch" on your system. In the "New type" popup you should see "Valve" correctly and "siren" in lowercase.
By the way, since you're at it, did you open an issue for siren and valve being lowercase?
Yes, after adding switch_as_x with siren, it works. So I kinda have the feeling that it has to do with what platforms are set up and platforms that have either no entities or are never asked to setup are not added. I think that is a nice way to not add a bunch of services for things people don't use
OK, sounds reasonable. But it's just not nice in the UI having
show up untranslated until either an integration or such a Helper activates those. That I never saw "valve" is then caused by the ViCare integration loading that device type as they certainly have that defined for some systems. Mine does not contain any valve entities I could control, so that explains the difference.
By the way, since you're at it, did you open an issue for siren and valve being lowercase?
So far I only did for "siren" as I never saw "valve", but with your screenshot above we do have proof for both. So that way we're back to a frontend-only bug and can close this one?
Note that my screenshot is the switch_as_x thing from the entity more details page. That is a static list and is not affected by what is loaded. So yes, I think that is a frontend issue
show up untranslated until either an integration or such a Helper activates those
I think the point I made was that those platforms aren't loaded (and thus the services) at all if no integration provides it, or has the support to provide it. (integrations like MQTT do lazy loading)
Yes, that screenshot is from switch_as_x , but the funny thing is that both Siren and Valve do show up there correctly if either loaded by an integration or after used once in switch_as_x
Crazy thing now is that after restarting HA (tried that twice) I now have this:
Now the popup is stuck at English with the rest of the UI in German. And "Siren" and "Valve", no lowercase, even after the restart. There is something strange going on in the frontend with that popup menu …
I will try to reproduce everything tomorrow and update my frontend bug.
@joostlek I see you have https://github.com/home-assistant/core/pull/130443 pending to fix the behavior of switch_to_x not showing the translated names. So perhaps we should wait for that to roll out.
Then I can re-check everything regarding siren and valve so we can address those separately.
But that change only fixes if you create a new switch as X via the config flow
OK, I've updated https://github.com/home-assistant/frontend/issues/22415 so we can continue to track the issue under that bug.
Closing this here now as the problem is not rooted in the Core component.
The problem
Although the device type Siren has actions (services) defined for turn_on, turn_off and toggle it does not show up when you enter "siren" as a selector in Developer Tools > Actions or within automations or scripts.
As far as I can see everything is defined here:
https://github.com/home-assistant/core/blob/ac0c75a598e4e7ee2c27b37e19a9ec5cefb8cd5e/homeassistant/components/siren/strings.json#L17-L44
This bug is probably related to the fact that it also does not show up with its (translated) name that is also defined in the strings.json under:
https://github.com/home-assistant/core/blob/ac0c75a598e4e7ee2c27b37e19a9ec5cefb8cd5e/homeassistant/components/siren/strings.json#L2
as reported here: https://github.com/home-assistant/frontend/issues/22415
What version of Home Assistant Core has the issue?
core-2024.11.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Siren
Link to integration documentation on our website
https://www.home-assistant.io/integrations/siren/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response