Skip to content

Improve handling of non connected devices: set state to "unavailable" rather than "unknown" #10

@35gh

Description

@35gh

Hi,

First, thank you for the latest changes to remove deprecations. Would it be possible to make a new release with the latest commits and bump the integration version to get it updated automatically via HACS?

With regards of this ticket, warnings appear in logs when a player is not connected/switched off:
Enregistreur: oppoudpsdk.client Source: runner.py:189 S'est produit pour la première fois: 12:38:29 (18 occurrences) Dernier enregistrement: 12:40:34 Unhandled exception before successful connect: [Errno 113] Connect call failed ('192.168.1.10', 23)

Would it be possible to change the state to "Unavailable" rather than "Unknown" (and eventually retry periodically), and raise an error in the Devices section?

Similar to other player integrations. For example the "Frontier Silicon" integration from HA Core:

Capture d’écran 2024-11-15 à 12 44 51 Capture d’écran 2024-11-15 à 12 51 08 Capture d’écran 2024-11-15 à 12 48 56

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions