nordicopen / easee_hass

Custom component for Easee EV charger integration with Home Assistant
207 stars 34 forks source link

Issues related to adding/removing sensors #65

Closed TheAzzi closed 3 years ago

TheAzzi commented 3 years ago

Testing version 0.9.19 and there are still issues related to adding/removing sensors:

astrandb commented 3 years ago

Thank you for your detailed comments.

We are aware that there are a few issues related to deleting entities. Unfortunately the deletion procedures in HA are a bit flaky and there are only few successful examples in the codebase.

  1. Yes, it is by design. There is no real obvious case for a device without any entities. The developers have discussed if we should block or warn the user that the removal the last sensor will also remove the device.

  2. After posting the setting changes the integration is unloaded and reloaded again by design in HA. If all currently selected entities are removed, the device will also be removed. At reload of the new configuration everything is recreated including a new device with no area.

  3. This is a bug and not by design.

We were aware of the problems in this area but decided to release the the new version anyway since it contains a lot of improved functionality.

TheAzzi commented 3 years ago

Thank you for the feedback. I agree the new version is great, thank you all developers involved. None of these issues are deal breakers in any way, I just try to test/provide my input in case it can help improving the component.

Regarding 1. and 2.: I agree there is no real obvious case for a device without any entities, however it shouldn't hurt to keep it either. Perhaps a user is just cleaning up, figuring out which sensors to add, and so on. You still have the device, with it's area. I also assume if you didn't remove the device as mentioned in point 1, the strange behavior in point 2 wouldn't happen either. But it's not a big deal at all, it just makes more sense to me to keep the device.

astrandb commented 3 years ago

A new release was just published that adresses these issues. Please test it and hopefully we can close this issue.

TheAzzi commented 3 years ago

Sorry for late reply - I've been busy.

I was able to do some quick tests now, and so far it looks really good:

All in all an awesome release, thanks a lot! :-)