home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.12k stars 2.81k forks source link

Logbook: Device trackers should use "became unavailable" for that state #22874

Open NoRi2909 opened 1 week ago

NoRi2909 commented 1 week ago

Checklist

Describe the issue you are experiencing

Device Trackers have three special strings for their Logbook messages:

https://github.com/home-assistant/frontend/blob/231ef4b5b485704d691c245ac11a2badfd4d4732/src/translations/en.json#L455-L456 https://github.com/home-assistant/frontend/blob/231ef4b5b485704d691c245ac11a2badfd4d4732/src/translations/en.json#L475

But when their state becomes unavailable the Logbook uses the middle string above, which is actually meant to be used with zone names, so we get

Was detected at unavailable

Here in a screenshot:

Screenshot 2024-11-18 20 38 51

Describe the behavior you expected

This should be fixed by using the general Logbook message for that state instead:

https://github.com/home-assistant/frontend/blob/231ef4b5b485704d691c245ac11a2badfd4d4732/src/translations/en.json#L483-L484

I'm including 'unknown' above as this might currently produce the similar

 Was detected at unknown

if that state is possible (?). Then this needs to be included in the fix.

Also reporting this because in translations these message combinations often produce even stranger results.

What version of Home Assistant Core has the issue?

core-2024.11.3