Add Hyperion camera feed (#46516)

* Initial Hyperion camera.

* Improve test coverage.

* Minor state fixes.

* Fix type annotation.

* May rebase and updates (mostly typing).

* Updates to use new camera typing improvements.

* Use new support for returning None from async_get_mjpeg_stream .

* Codereview feedback.

* Lint: Use AsyncGenerator from collections.abc .

* Update homeassistant/components/hyperion/camera.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
Dermot Duffy 2021-06-02 09:39:19 -07:00 committed by GitHub
parent 68714c2067
commit c057c9d9ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 508 additions and 20 deletions

View file

@ -24,11 +24,13 @@ HYPERION_VERSION_WARN_CUTOFF = "2.0.0-alpha.9"
NAME_SUFFIX_HYPERION_LIGHT = ""
NAME_SUFFIX_HYPERION_PRIORITY_LIGHT = "Priority"
NAME_SUFFIX_HYPERION_COMPONENT_SWITCH = "Component"
NAME_SUFFIX_HYPERION_CAMERA = ""
SIGNAL_INSTANCE_ADD = f"{DOMAIN}_instance_add_signal." "{}"
SIGNAL_INSTANCE_REMOVE = f"{DOMAIN}_instance_remove_signal." "{}"
SIGNAL_ENTITY_REMOVE = f"{DOMAIN}_entity_remove_signal." "{}"
TYPE_HYPERION_CAMERA = "hyperion_camera"
TYPE_HYPERION_LIGHT = "hyperion_light"
TYPE_HYPERION_PRIORITY_LIGHT = "hyperion_priority_light"
TYPE_HYPERION_COMPONENT_SWITCH_BASE = "hyperion_component_switch"