Open golles opened 4 weeks ago
Correct me if I'm wrong but your UPS entities have no relation to macOS App right? How did you add them to Home Assistant?
I guess the app detects all batteries connected to the Mac? The only thing I did is plug in the USB cable.
Oh, sweet! I honestly didn't know this was a feature haha, I'll update you as soon as I have more info
It is actually nice indeed, this is what I see in my Mac battery settings when the UPS is connected
After you restarted your mac, were you able to remote those sensors? You can also disable them if needed. Also, if you delete your macbook entry from mobile_app integration, the next time you launch the app form scratch it will recreate everything
After I restarted the Mac, they still show up in HA.
and they still look active, which still doesn't allow me to remove them.
I understand I can fix this by removing the integration for this Macbook, but that would be ignoring this bug.
But now I think of it, is this a bug from the app or within core? As the app doesn't show these sensors anymore, shouldn't the integration in core detect them as stale and mark them as unavailable? What do you think?
Sorry, I didn't mean to close this bug with the workaround, just giving you short term solution.
I think iOS app needs to ask core to remove those sensors, but I am not sure, @dshokouhi what do you do in Android in such cases?
what do you do in Android in such cases?
ours are also not removed in these cases, @jpelgrom and I discussed this recently actually as he worked on the sync status between the server for when sensors get enabled/disabled
ours are also not removed in these cases
I don't believe there are sensors like these which can completely disappear on Android so not completely comparable. But yes, it disables/enables like other integrations do.
Device model, version and app version
Model Name: Apple M3 Pro macOS Version: 15.0.1 App Version: 2024.9.2 Safari Version: I don't use safari
Home Assistant Core Version
2024.10.4
Describe the bug Sensors become stale and not unavailable and can't be deleted
To Reproduce I had issues with my UPS and have connected it to my MacBook, I got a new one and also connected that to the Macbook to check it before installing. After disconnecting, the sensors remain active and can't be deleted.
Expected behavior Something should happen with these sensors, I think what other integrations do is make them unavailable, which probably makes the most sense. In my case, I would see them deleted, if they would become unavailable I could delete them manually.
Screenshots
In HA the sensors remain there and look active:
After restarting the app on my Macbook, the sensors were removed from here:
The delete button isn't clickable, so can't delete them
Additional context