Skip to content
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

refactor: update device class imports and constants #114

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

joshua-dantonio
Copy link
Contributor

  • Updated device classes and feature flags to use modern HA constants
  • Replaced legacy DEVICE_CLASS_* imports with BinarySensorDeviceClass
  • Updated class references for:
  • binary_sensor.py: BinarySensorDeviceClass for binary sensors
  • climate.py: ClimateEntityFeature for climate features
  • cover.py: CoverDeviceClass and CoverEntityFeature for covers
  • sensor.py: updated UnitOf* imports for measurement units

Migration to support latest Home Assistant versions and remove deprecated constants usage.
Tested with Home Assistant Core 2025.1.0b2.

- Aggiornati i device class e feature flags per utilizzare le costanti moderne di HA
- Sostituiti i vecchi imports DEVICE_CLASS_* con BinarySensorDeviceClass
- Aggiornati i riferimenti delle classi per:
  - binary_sensor.py: BinarySensorDeviceClass per i sensori binari
  - climate.py: ClimateEntityFeature per le funzionalità del clima
  - cover.py: CoverDeviceClass e CoverEntityFeature per le coperture
  - sensor.py: aggiornati UnitOf* imports per le unità di misura

Migrazione per supportare le moderne API di Home Assistant e rimuovere 
l'utilizzo di costanti deprecate.
Copy link

@jtagcat jtagcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested

@veista veista merged commit a33e501 into veista:master Jan 4, 2025
@veista
Copy link
Owner

veista commented Jan 4, 2025

Thank you!

@Diegocampy
Copy link

Diegocampy commented Jan 4, 2025

Thanks, work fine 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants