From dee186429db26ac1a2ca8a9f88523cca4df01c80 Mon Sep 17 00:00:00 2001 From: iprak Date: Thu, 3 Jun 2021 10:23:32 +0000 Subject: [PATCH 1/2] Updated ENTITY_ID_FORMAT --- custom_components/yahoofinance/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/yahoofinance/sensor.py b/custom_components/yahoofinance/sensor.py index aebb123..c5a2a7d 100644 --- a/custom_components/yahoofinance/sensor.py +++ b/custom_components/yahoofinance/sensor.py @@ -7,6 +7,7 @@ import logging from timeit import default_timer as timer +from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN from homeassistant.const import ATTR_ATTRIBUTION from homeassistant.helpers.entity import Entity, async_generate_entity_id @@ -41,7 +42,7 @@ ) _LOGGER = logging.getLogger(__name__) -ENTITY_ID_FORMAT = DOMAIN + ".{}" +ENTITY_ID_FORMAT = SENSOR_DOMAIN + "." + DOMAIN + "_{}" async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): From 5cd9e6b970027c06116674bea2645d54b83521a2 Mon Sep 17 00:00:00 2001 From: iprak Date: Thu, 3 Jun 2021 10:23:48 +0000 Subject: [PATCH 2/2] Updated requirements --- requirements_test.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/requirements_test.txt b/requirements_test.txt index 21c4307..21f0adc 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -2,19 +2,19 @@ # Pre-commit requirements bandit==1.7.0 -black==20.8b1 +black==21.5b1 codespell==2.0.0 -flake8-docstrings==1.5.0 -flake8==3.8.4 -isort==5.5.3 -pydocstyle==5.1.1 -pyupgrade==2.7.2 -yamllint==1.24.2 +flake8-docstrings==1.6.0 +flake8==3.9.2 +isort==5.8.0 +pydocstyle==6.0.0 +pyupgrade==2.16.0 +yamllint==1.26.1 # Unit tests requirements -pre-commit==2.10.1 -pylint==2.6.0 -pytest==6.2.2 +pre-commit==2.12.1 +pylint==2.8.2 +pytest==6.2.4 pytest-cov==2.10.1 pytest-homeassistant-custom-component \ No newline at end of file