-
Notifications
You must be signed in to change notification settings - Fork 282
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
Mobile App using invalid unit of measurement for Battery entity #2277
Comments
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) mobile_app documentation |
Hi @ismarslomic 👋 Is this entity provided by the official Home Assistant iOS app? Or is it Android or another app? ../Frenck |
Its provided by the official Home Assistant iOS app. |
Alright! Thanks for the quick response 👍 ../Frenck |
Unfortunately the device class cannot be removed after a sensor is created, and the battery state sensor is no longer created with the battery class. You could resole this by deleting the mobile_app integration and allowing the app to recreate it, I think. |
Maybe this is something that could be covered as a migration check? Much like this? https://github.com/home-assistant/core/blob/cf3ca816a87e5eca0c55e4143cb62811da975594/homeassistant/components/mobile_app/sensor.py?rgh-link-date=2023-01-07T00%3A00%3A30Z#L86-L95 |
@zacwest what's it being created with now? I'll just edit the config entry, but it seems odd that this is not handled automatically by HA core. I'd consider this a bug (in core) seeing that the user can't do anything about it without nuking their configuration. |
It has no device class set since #1372 |
How can one edit the Config entry without doing the setup once again? |
Not sure if it's related since I don't see "level" mentioned here anywhere, but I have a |
I can confirm that deleting the Mobile App integration in HA and recreating it by opening the HA mobile app for iPhone recreated all entities and that this warning disappeared. However, I agree with @Petro31 that this is rather a bug then a feature, and this migration should potentially be handled in the background by the core. |
Hi, i edited the |
I have to concur - I'm kind of a "he who broke it fixes it" Would it be possible to have config entries for device class be provided by core (for core's integrations) rather than requiring 1. an override in customization.yaml |
I just hit this as well upgrading from 2023.4 to 2023.5 and was big as I have multiple automations trigger on the battery state. Removing the mobile_app integration for the phone and re-adding by launching the app on the phone also fixed it for me. I do agree with the sentiment here that something should probably be done to fix this correctly. It's probably not reasonable to expect everyone that uses mobile_app to apply this workaround. 😉 |
Ok so I removed the integration and re-added it. Then opened the app on the iPhone and all the sensors came back, but the error is still there. Looking at the entity, it has
What confuses me about this is why the Here's the error from my logs:
So what's going on here? Why does the entity registry have |
I was able to fix the issue by changing the |
The problem
After upgrading HA to
v2023.1.0
I startet to receive following log warnings:I have not manually configured this entity, so I guess this needs to be fixed in core.
What version of Home Assistant Core has the issue?
2023.1.1
What was the last working version of Home Assistant Core?
2022.12.6
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Mobile App
Link to integration documentation on our website
https://www.home-assistant.io/integrations/mobile_app/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: