mirror of
https://github.com/home-assistant/core.git
synced 2026-07-06 22:36:33 +01:00
d766aae436
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
29 lines
784 B
Python
29 lines
784 B
Python
"""Services for the monoprice integration."""
|
|
|
|
from homeassistant.components.media_player import DOMAIN as MEDIA_PLAYER_DOMAIN
|
|
from homeassistant.core import HomeAssistant, callback
|
|
from homeassistant.helpers import service
|
|
|
|
from .const import DOMAIN, SERVICE_RESTORE, SERVICE_SNAPSHOT
|
|
|
|
|
|
@callback
|
|
def async_setup_services(hass: HomeAssistant) -> None:
|
|
"""Set up services."""
|
|
service.async_register_platform_entity_service(
|
|
hass,
|
|
DOMAIN,
|
|
SERVICE_SNAPSHOT,
|
|
entity_domain=MEDIA_PLAYER_DOMAIN,
|
|
schema=None,
|
|
func="snapshot",
|
|
)
|
|
service.async_register_platform_entity_service(
|
|
hass,
|
|
DOMAIN,
|
|
SERVICE_RESTORE,
|
|
entity_domain=MEDIA_PLAYER_DOMAIN,
|
|
schema=None,
|
|
func="restore",
|
|
)
|