Use core constants for google_assistant (#46204)

This commit is contained in:
tkdrob 2021-02-08 05:36:59 -05:00 committed by GitHub
parent 5faf463205
commit 87c36d6b6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View file

@ -5,7 +5,7 @@ from typing import Any, Dict
import voluptuous as vol
# 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.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__)
CONF_ALLOW_UNLOCK = "allow_unlock"
CONF_API_KEY = "api_key"
ENTITY_SCHEMA = vol.Schema(
{

View file

@ -1938,12 +1938,10 @@ class TransportControlTrait(_Trait):
def query_attributes(self):
"""Return the attributes of this trait for this entity."""
return {}
async def execute(self, command, data, params, challenge):
"""Execute a media command."""
service_attrs = {ATTR_ENTITY_ID: self.state.entity_id}
if command == COMMAND_MEDIA_SEEK_RELATIVE: