mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Improve typing for the generic integration (#108094)
This commit is contained in:
parent
f28f2e4ed4
commit
369ed5b701
@ -178,7 +178,7 @@ class GenericCamera(Camera):
|
|||||||
return self._last_image
|
return self._last_image
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self) -> str:
|
||||||
"""Return the name of this device."""
|
"""Return the name of this device."""
|
||||||
return self._name
|
return self._name
|
||||||
|
|
||||||
|
@ -77,8 +77,8 @@ IMAGE_PREVIEWS_ACTIVE = "previews"
|
|||||||
def build_schema(
|
def build_schema(
|
||||||
user_input: Mapping[str, Any],
|
user_input: Mapping[str, Any],
|
||||||
is_options_flow: bool = False,
|
is_options_flow: bool = False,
|
||||||
show_advanced_options=False,
|
show_advanced_options: bool = False,
|
||||||
):
|
) -> vol.Schema:
|
||||||
"""Create schema for camera config setup."""
|
"""Create schema for camera config setup."""
|
||||||
spec = {
|
spec = {
|
||||||
vol.Optional(
|
vol.Optional(
|
||||||
@ -276,7 +276,7 @@ async def async_test_stream(
|
|||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
def register_preview(hass: HomeAssistant):
|
def register_preview(hass: HomeAssistant) -> None:
|
||||||
"""Set up previews for camera feeds during config flow."""
|
"""Set up previews for camera feeds during config flow."""
|
||||||
hass.data.setdefault(DOMAIN, {})
|
hass.data.setdefault(DOMAIN, {})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user