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

FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in enum.member() if you want to preserve the old behavior #2314

Open
m3gg3 opened this issue Jan 19, 2025 · 1 comment

Comments

@m3gg3
Copy link

m3gg3 commented Jan 19, 2025

It looks like the adapter needs an update for future proof

2025-01-19 17:38:31.403 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration xiaomi_miot which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-19 17:38:31.406 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration volkswagencarnet which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2025-01-19 17:38:32.711 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.13/site-packages/miio/miot_device.py:23: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in enum.member() if you want to preserve the old behavior
Bool = partial(_str2bool)
2025-01-19 17:38:39.724 WARNING (ImportExecutor_0) [homeassistant.components.light] ATTR_COLOR_TEMP was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2026.1. Use kelvin equivalent (ATTR_COLOR_TEMP_KELVIN) instead, please report it to the author of the 'xiaomi_miot' custom integration
2025-01-19 17:38:39.726 WARNING (ImportExecutor_0) [homeassistant.components.light] ATTR_COLOR_TEMP was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2026.1. Use kelvin equivalent (ATTR_COLOR_TEMP_KELVIN) instead, please report it to the author of the 'xiaomi_miot' custom integration
2025-01-19 17:38:39.763 WARNING (ImportExecutor_0) [homeassistant.components.vacuum] STATE_CLEANING was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2026.1. Use VacuumActivity.CLEANING instead, please report it to the author of the 'xiaomi_miot' custom integration
2025-01-19 17:38:39.764 WARNING (ImportExecutor_0) [homeassistant.components.vacuum] STATE_DOCKED was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2026.1. Use VacuumActivity.DOCKED instead, please report it to the author of the 'xiaomi_miot' custom integration
2025-01-19 17:38:39.765 WARNING (ImportExecutor_0) [homeassistant.components.vacuum] STATE_RETURNING was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2026.1. Use VacuumActivity.RETURNING instead, please report it to the author of the 'xiaomi_miot' custom integration
2025-01-19 17:38:39.766 WARNING (ImportExecutor_0) [homeassistant.components.vacuum] STATE_ERROR was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2026.1. Use VacuumActivity.ERROR instead, please report it to the author of the 'xiaomi_miot' custom integration
2025-01-19 17:38:39.767 WARNING (ImportExecutor_0) [homeassistant.components.vacuum] STATE_CLEANING was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2026.1. Use VacuumActivity.CLEANING instead, please report it to the author of the 'xiaomi_miot' custom integration
2025-01-19 17:38:39.768 WARNING (ImportExecutor_0) [homeassistant.components.vacuum] STATE_DOCKED was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2026.1. Use VacuumActivity.DOCKED instead, please report it to the author of the 'xiaomi_miot' custom integration
2025-01-19 17:38:39.769 WARNING (ImportExecutor_0) [homeassistant.components.vacuum] STATE_RETURNING was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2026.1. Use VacuumActivity.RETURNING instead, please report it to the author of the 'xiaomi_miot' custom integration
2025-01-19 17:38:39.770 WARNING (ImportExecutor_0) [homeassistant.components.vacuum] STATE_ERROR was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2026.1. Use VacuumActivity.ERROR instead, please report it to the author of the 'xiaomi_miot' custom integration
2025-01-19 17:38:39.892 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'xiaomi_miot' is setting state directly. Entity xiaomi_miot.roborock_s5e_1184_robot_cleaner (<class 'custom_components.xiaomi_miot.vacuum.MiotRoborockVacuumEntity'>) should implement the 'activity' property and return its state using the VacuumActivity enum at custom_components/xiaomi_miot/vacuum.py, line 70: async_add_entities(entities, update_before_add=True). This will stop working in Home Assistant 2026.1, please create a bug report at https://github.com/al-one/hass-xiaomi-miot/issues

@garry0garry
Copy link

garry0garry commented Feb 15, 2025

Home Assistant 2025.2.4
HACS 2.0.5
Xiaomi Miot Auto 1.0.9

This error originated from a custom integration.

Logger: py.warnings
Source: custom_components/xiaomi_miot/core/converters.py:4
integration: Xiaomi Miot Auto (documentation, issues)
First occurred: 12:11:43 PM (1 occurrences)
Last logged: 12:11:43 PM

/usr/local/lib/python3.13/site-packages/miio/miot_device.py:23: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in enum.member() if you want to preserve the old behavior Bool = partial(_str2bool)

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

No branches or pull requests

2 participants