tikismoke / home-assistant-nespressoble

#deprecated see Readme to migrate to a better one. NESPRESSO ble Home Assistant custom componenets and also a 2MQTT script
GNU General Public License v3.0
38 stars 6 forks source link

Integration is using deprecated `DEVICE_CLASS_*` constants #11

Closed frenck closed 11 months ago

frenck commented 1 year ago

This custom integration uses deprecated DEVICE_CLASS_* constants in its codebase.

The DEVICE_CLASS_* constants have been deprecated and replaced in Home Assistant Core 2021.12 (over a year ago). I would highly suggest updating/migrating this integration to the new enums.

For example, for the device classes supported by the sensor platform, there is now a SensorDeviceClass enum. So if a sensor previously used the DEVICE_CLASS_ENERGY constant, it should now use SensorDeviceClass.ENERGY. Other platforms (like binary_sensor, and number) provide similar enumerations for their supported device classes.

The migration thus only consists of replacing constants with an enumeration member and is, therefore, very low impact and should be fairly straightforward.

If I can help resolve any questions regarding this change or migration, feel free to ask or respond to this issue. I'm happy to help!

Kindest regards,

../Frenck

tikismoke commented 1 year ago

Hi @frenck . First thanks for all work you do. I can't make test as I do no more own such a device.

I'll take a look

leovj commented 1 year ago

tikismoke congratulations for your work! It would be very nice to be able to update the integration and be able to use it again! I don't think I'm capable of it, maybe I can help you with the tests..

tikismoke commented 1 year ago

tikismoke congratulations for your work! It would be very nice to be able to update the integration and be able to use it again! I don't think I'm capable of it, maybe I can help you with the tests..

I'll try next week. I do no more own a connected one. So it 's difficult for me to test anything.

leovj commented 1 year ago

In your opinion, could an esp32 with esphome be used to interface with the bluetooth of the machine? https://esphome.io/components/ble_client.html Thanks, I'm available for testing!

tikismoke commented 1 year ago

That's good to know thanks.

Le 14 janvier 2023 15:35:44 GMT+01:00, Leo @.***> a écrit :

Thanks, I'm available for testing!

-- Reply to this email directly or view it on GitHub: https://github.com/tikismoke/home-assistant-nespressoble/issues/11#issuecomment-1382755244 You are receiving this because you commented.

Message ID: @.***> -- Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

Attention nous avons changer de domaine, utilisez poudot.fr à la place de tikijs.dyndns.org

frenck commented 1 year ago

It would be very nice to be able to update the integration and be able to use it again!

@leovj Your comment seems to be completely unrelated to this issue reported. The issue isn't about broken functionality, yet, your comment seems to imply it is broken.

This issue only reports the use of deprecated constants, which are currently not broken at all.

I'm therefore confused about the relation between the comments made above with my issue report.

../Frenck

leovj commented 1 year ago

Hi Frenck, maybe I didn't explain myself: I meant that it would be nice to continue using the integration for a long time and therefore having an update where all the problems are fixed would be really great!

frenck commented 1 year ago

I meant that it would be nice to continue using the integration for a long time and therefore having an update where all the problems are fixed would be really great!

Sure, but don't see how that is related to this raised issue about an deprecation.

tikismoke commented 11 months ago

@frenck this repo sounds really better as I do no more have this sort of machine I'm going to lock this repo and add link to this one: https://github.com/bulldog5046/ha_nespresso_ingetration