Skip to content

Fix SSDP UPnP constant imports#8

Merged
cmos486 merged 1 commit into
cmos486:mainfrom
gaoflow:fix-7-ssdp-service-info-constants
Jun 23, 2026
Merged

Fix SSDP UPnP constant imports#8
cmos486 merged 1 commit into
cmos486:mainfrom
gaoflow:fix-7-ssdp-service-info-constants

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • import SSDP service info from homeassistant.helpers.service_info.ssdp
  • keep the existing SsdpServiceInfo annotation and UPnP friendly/model name lookups working on newer Home Assistant versions
  • avoid looking up ATTR_UPNP_FRIENDLY_NAME and ATTR_UPNP_MODEL_NAME on homeassistant.components.ssdp, where current Home Assistant no longer exposes those constants

Closes #7

Verification

  • Checked current Home Assistant source: homeassistant.helpers.service_info.ssdp defines SsdpServiceInfo, ATTR_UPNP_FRIENDLY_NAME, and ATTR_UPNP_MODEL_NAME; homeassistant.components.ssdp only imports the service info type.
  • python3 -m py_compile custom_components/bravia_rest_api/config_flow.py
  • rg -n "from homeassistant\.components import ssdp|ATTR_UPNP|helpers\.service_info" custom_components/bravia_rest_api/config_flow.py
  • git diff --check

Notes

  • I did not find a Home Assistant test harness in this repository, so verification is limited to syntax/static checks and the upstream Home Assistant import location.

AI assistance was used under my direction.

@cmos486 cmos486 merged commit 268181b into cmos486:main Jun 23, 2026
cmos486 added a commit that referenced this pull request Jun 23, 2026
…ad of getSpeakerSettings (#6)

outputTerminal is a sound setting (getSoundSettings v1.1), not a speaker
setting. The previous code called getSpeakerSettings which returns
"Illegal Argument" for this target, leaving the entity permanently unknown.

Changes:
- Add get_sound_settings() to BraviaClient (mirrors set_sound_settings)
- Poll sound output via coordinator so external changes (TV remote, eARC)
  propagate automatically instead of a one-time fetch at startup
- BraviaSoundOutputSelect now reads from coordinator data

Also included in this release (merged from gaoflow/fix-7-ssdp-service-info-constants):
- Fix SSDP UPnP constant imports (#8)

Bump version to 1.5.6.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AttributeError: module 'homeassistant.components.ssdp' has no attribute 'ATTR_UPNP_FRIENDLY_NAME'

2 participants