egnerfl / alfen_wallbox

Alfen wallbox - Home Assistant Component
MIT License
33 stars 12 forks source link

Deprecated items #26

Open tonvr opened 10 months ago

tonvr commented 10 months ago

Hi! It looks like Home Assistant is planning some changes and that causes a few warnings:

Log details (WARNING) Logger: homeassistant.components.sensor Source: helpers/deprecation.py:205 Integration: Sensor (documentation, issues) First occurred: 11:22:58 AM (8 occurrences) Last logged: 11:22:59 AM

DEVICE_CLASS_ENERGY was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.ENERGY instead, please report it to the author of the 'alfen_wallbox' custom integration DEVICE_CLASS_POWER was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.POWER instead, please report it to the author of the 'alfen_wallbox' custom integration STATE_CLASS_TOTAL_INCREASING was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please report it to the author of the 'alfen_wallbox' custom integration STATE_CLASS_MEASUREMENT was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please report it to the author of the 'alfen_wallbox' custom integration

Can you please have a look?

Cheers!

Ton

weide-git commented 3 months ago

Hi,

additionally from my HA:

WARNING (ImportExecutor_0) [homeassistant.helpers.typing] HomeAssistantType was used from alfen_wallbox, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant instead, please report it to the author of the 'alfen_wallbox' custom integration

2024-08-09 07:48:32.822 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'alfen_wallbox' accesses hass.helpers.aiohttp_client. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from aiohttp_client directly at custom_components/alfen_wallbox/init.py, line 76: session = hass.helpers.aiohttp_client.async_get_clientsession(), please report it to the author of the 'alfen_wallbox' custom integration

2024-08-09 07:48:59.328 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'alfen_wallbox' calls async_forward_entry_setup for integration, alfen_wallbox with title: 192.168.2.76 and entry_id: 8ae9e44f222571a03ef753393274f813, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/alfen_wallbox/init.py, line 52: hass.async_create_task(, please report it to the author of the 'alfen_wallbox' custom integration 2024-08-09 07:48:59.333 WARNING (ImportExecutor_0) [homeassistant.const] TEMP_CELSIUS was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'alfen_wallbox' custom integration 2024-08-09 07:48:59.336 WARNING (ImportExecutor_0) [homeassistant.components.sensor] DEVICE_CLASS_ENERGY was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.ENERGY instead, please report it to the author of the 'alfen_wallbox' custom integration 2024-08-09 07:48:59.340 WARNING (ImportExecutor_0) [homeassistant.components.sensor] DEVICE_CLASS_POWER was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.POWER instead, please report it to the author of the 'alfen_wallbox' custom integration 2024-08-09 07:48:59.344 WARNING (ImportExecutor_0) [homeassistant.components.sensor] STATE_CLASS_TOTAL_INCREASING was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please report it to the author of the 'alfen_wallbox' custom integration 2024-08-09 07:48:59.348 WARNING (ImportExecutor_0) [homeassistant.components.sensor] STATE_CLASS_MEASUREMENT was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please report it to the author of the 'alfen_wallbox' custom integration 2024-08-09 07:48:59.350 WARNING (ImportExecutor_0) [homeassistant.components.sensor] DEVICE_CLASS_ENERGY was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.ENERGY instead, please report it to the author of the 'alfen_wallbox' custom integration 2024-08-09 07:48:59.354 WARNING (ImportExecutor_0) [homeassistant.components.sensor] DEVICE_CLASS_POWER was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.POWER instead, please report it to the author of the 'alfen_wallbox' custom integration 2024-08-09 07:48:59.358 WARNING (ImportExecutor_0) [homeassistant.components.sensor] STATE_CLASS_TOTAL_INCREASING was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please report it to the author of the 'alfen_wallbox' custom integration 2024-08-09 07:48:59.361 WARNING (ImportExecutor_0) [homeassistant.components.sensor] STATE_CLASS_MEASUREMENT was used from alfen_wallbox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please report it to the author of the 'alfen_wallbox' custom integration

2024-08-09 07:48:59.368 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration alfen_wallbox with title: 192.168.2.76 and entry_id: 8ae9e44f222571a03ef753393274f813, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.

Switching to the other forks seems to require FW newer than 5.8x - so no option.

Regards, Michael