mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Use core constants for google_assistant (#46204)
This commit is contained in:
parent
5faf463205
commit
87c36d6b6b
@ -5,7 +5,7 @@ from typing import Any, Dict
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
# Typing imports
|
# Typing imports
|
||||||
from homeassistant.const import CONF_NAME
|
from homeassistant.const import CONF_API_KEY, CONF_NAME
|
||||||
from homeassistant.core import HomeAssistant, ServiceCall
|
from homeassistant.core import HomeAssistant, ServiceCall
|
||||||
from homeassistant.helpers import config_validation as cv
|
from homeassistant.helpers import config_validation as cv
|
||||||
|
|
||||||
@ -35,7 +35,6 @@ from .const import EVENT_COMMAND_RECEIVED, EVENT_SYNC_RECEIVED # noqa: F401, is
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
CONF_ALLOW_UNLOCK = "allow_unlock"
|
CONF_ALLOW_UNLOCK = "allow_unlock"
|
||||||
CONF_API_KEY = "api_key"
|
|
||||||
|
|
||||||
ENTITY_SCHEMA = vol.Schema(
|
ENTITY_SCHEMA = vol.Schema(
|
||||||
{
|
{
|
||||||
|
@ -1938,12 +1938,10 @@ class TransportControlTrait(_Trait):
|
|||||||
|
|
||||||
def query_attributes(self):
|
def query_attributes(self):
|
||||||
"""Return the attributes of this trait for this entity."""
|
"""Return the attributes of this trait for this entity."""
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
async def execute(self, command, data, params, challenge):
|
async def execute(self, command, data, params, challenge):
|
||||||
"""Execute a media command."""
|
"""Execute a media command."""
|
||||||
|
|
||||||
service_attrs = {ATTR_ENTITY_ID: self.state.entity_id}
|
service_attrs = {ATTR_ENTITY_ID: self.state.entity_id}
|
||||||
|
|
||||||
if command == COMMAND_MEDIA_SEEK_RELATIVE:
|
if command == COMMAND_MEDIA_SEEK_RELATIVE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user