Limych / ha-beward

Home Assistant custom component for Beward security Cameras and Doorbells
Other
21 stars 5 forks source link

Using deprecated functions #72

Closed asafhas closed 1 month ago

asafhas commented 1 month ago

Checklist

Is your feature request related to a problem? Please describe.

In recent Home Assistant versions, there are warnings about 2 classes used by Beward plugin which are going to be deprecated.

2024-10-12 11:51:57.746 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration, beward with title: configuration.yaml and entry_id: **, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead. Please report this issue.

2024-10-12 11:51:59.410 WARNING (ImportExecutor_0) [homeassistant.components.camera] SUPPORT_STREAM was used from beward, this is a deprecated constant which will be removed in HA Core 2025.1. Use CameraEntityFeature.STREAM instead, please report it to the author of the 'beward' custom integration.

Describe the solution you'd like

According to the logs:

  1. Replace "async_forward_entry_setup" with "async_forward_entry_setups".
  2. Replace "SUPPORT_STREAM " with "CameraEntityFeature.STREAM".

Describe alternatives you've considered

None

Additional context

None

asafhas commented 1 month ago

Proposed PR with a fix: https://github.com/Limych/ha-beward/pull/73