From 87c36d6b6b8e6d68a1777eeaf97588ff696f9fb4 Mon Sep 17 00:00:00 2001 From: tkdrob Date: Mon, 8 Feb 2021 05:36:59 -0500 Subject: [PATCH] Use core constants for google_assistant (#46204) --- homeassistant/components/google_assistant/__init__.py | 3 +-- homeassistant/components/google_assistant/trait.py | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/homeassistant/components/google_assistant/__init__.py b/homeassistant/components/google_assistant/__init__.py index 8f4ee3b51c4..00c09242517 100644 --- a/homeassistant/components/google_assistant/__init__.py +++ b/homeassistant/components/google_assistant/__init__.py @@ -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( { diff --git a/homeassistant/components/google_assistant/trait.py b/homeassistant/components/google_assistant/trait.py index f2a2274d8a8..9e0da39b58a 100644 --- a/homeassistant/components/google_assistant/trait.py +++ b/homeassistant/components/google_assistant/trait.py @@ -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: