core/homeassistant/components/heos/const.py

17 lines
502 B
Python
Raw Normal View History

"""Const for the HEOS integration."""
ATTR_PASSWORD = "password"
ATTR_USERNAME = "username"
COMMAND_RETRY_ATTEMPTS = 2
COMMAND_RETRY_DELAY = 1
DATA_CONTROLLER_MANAGER = "controller"
Add support for HEOS groups (#32568) * Add support for grouping HEOS media players * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Handle groups at controller level, refine tests. Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Fix linting issues * Update homeassistant/components/heos/media_player.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Rename variables and improve resolving of entity_ids Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Don't patch internal methods Use the pytest fixtures which have already been defined for this. * Fix linting issues * Remove unused property * Ignore groups with unknown leader This makes sure that the group_members attribute won't contain a `None` value as a leader entity_id. * Don't call force_update_groups() from tests * Don't pass `None` player ids to HEOS API * Use signal for group manager communication * Use imports for async_dispatcher_send/async_dispatcher_connect * Raise exception when leader/player could not be resolved * Disconnect signal handlers, avoid calling async_update_groups too early * Update homeassistant/components/heos/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-21 11:57:31 +00:00
DATA_ENTITY_ID_MAP = "entity_id_map"
DATA_GROUP_MANAGER = "group_manager"
DATA_SOURCE_MANAGER = "source_manager"
DATA_DISCOVERED_HOSTS = "heos_discovered_hosts"
2019-07-31 19:25:30 +00:00
DOMAIN = "heos"
SERVICE_SIGN_IN = "sign_in"
SERVICE_SIGN_OUT = "sign_out"
Add support for HEOS groups (#32568) * Add support for grouping HEOS media players * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Handle groups at controller level, refine tests. Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> * Fix linting issues * Update homeassistant/components/heos/media_player.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update homeassistant/components/heos/media_player.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Rename variables and improve resolving of entity_ids Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Don't patch internal methods Use the pytest fixtures which have already been defined for this. * Fix linting issues * Remove unused property * Ignore groups with unknown leader This makes sure that the group_members attribute won't contain a `None` value as a leader entity_id. * Don't call force_update_groups() from tests * Don't pass `None` player ids to HEOS API * Use signal for group manager communication * Use imports for async_dispatcher_send/async_dispatcher_connect * Raise exception when leader/player could not be resolved * Disconnect signal handlers, avoid calling async_update_groups too early * Update homeassistant/components/heos/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-21 11:57:31 +00:00
SIGNAL_HEOS_PLAYER_ADDED = "heos_player_added"
SIGNAL_HEOS_UPDATED = "heos_updated"