openHASP-custom-component icon indicating copy to clipboard operation
openHASP-custom-component copied to clipboard

Use proper entity service schemas & replace async_forward_entry_setup with async_forward_entry_setups

Open wjnelson78 opened this issue 10 months ago • 0 comments

Pull Request Description:

This PR addresses two deprecation warnings introduced in upcoming Home Assistant releases:

  1. Proper entity service schemas

• Previously, services like SERVICE_WAKEUP, SERVICE_PAGE_NEXT, and SERVICE_PAGE_PREV were registered using empty {} schemas, which Home Assistant will stop supporting. Now, these services use cv.make_entity_service_schema({}), ensuring they meet the new requirements for entity service schemas.

  1. Switch to async_forward_entry_setups

• The integration previously looped over each platform with async_forward_entry_setup, which is deprecated. This has been updated to a single call to async_forward_entry_setups, which aligns with current Home Assistant best practices and avoids deprecation warnings.

With these changes, openHASP remains compatible with future Home Assistant releases, preventing warnings and ensuring a smoother user experience.

wjnelson78 avatar Mar 11 '25 14:03 wjnelson78