jmcollin78 / versatile_thermostat

A full featured Thermostat for Home Assistant: presets, window, motion, presence and overpowering management
MIT License
327 stars 34 forks source link

Fix Home Assistant deprecation warnings (EventType, helpers.service) #484

Closed pdcastro closed 4 months ago

pdcastro commented 4 months ago

This PR fixes the following log warning messages printed when Home Assistant version 2024.7.1 starts:

2024-07-06 10:19:21.491 WARNING (ImportExecutor_0) [homeassistant.helpers.typing] 
  EventType was used from versatile_thermostat, this is a deprecated alias which will be removed in HA Core 2025.5.
  Use homeassistant.core.Event instead, please report it to the author of the 'versatile_thermostat' custom integration
2024-07-06 10:19:21.601 WARNING (MainThread) [homeassistant.helpers.frame] 
  Detected that custom integration 'versatile_thermostat' accesses hass.helpers.service.
  This is deprecated and will stop working in Home Assistant 2024.11, it should be updated
  to import functions used from service directly at custom_components/versatile_thermostat/__init__.py,
  line 118: hass.helpers.service.async_register_admin_service(, 
  please create a bug report at https://github.com/jmcollin78/versatile_thermostat/issues