mirror of
https://github.com/home-assistant/core.git
synced 2025-09-05 21:01:37 +02:00
Remove CONF_EXCLUDE_FEEDID constant from the emoncms integration (#150333)
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
CONF_EXCLUDE_FEEDID = "exclude_feed_id"
|
|
||||||
CONF_ONLY_INCLUDE_FEEDID = "include_only_feed_id"
|
CONF_ONLY_INCLUDE_FEEDID = "include_only_feed_id"
|
||||||
CONF_MESSAGE = "message"
|
CONF_MESSAGE = "message"
|
||||||
CONF_SUCCESS = "success"
|
CONF_SUCCESS = "success"
|
||||||
|
@@ -34,13 +34,7 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
|||||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||||
|
|
||||||
from .config_flow import sensor_name
|
from .config_flow import sensor_name
|
||||||
from .const import (
|
from .const import CONF_ONLY_INCLUDE_FEEDID, FEED_ID, FEED_NAME, FEED_TAG
|
||||||
CONF_EXCLUDE_FEEDID,
|
|
||||||
CONF_ONLY_INCLUDE_FEEDID,
|
|
||||||
FEED_ID,
|
|
||||||
FEED_NAME,
|
|
||||||
FEED_TAG,
|
|
||||||
)
|
|
||||||
from .coordinator import EmonCMSConfigEntry, EmoncmsCoordinator
|
from .coordinator import EmonCMSConfigEntry, EmoncmsCoordinator
|
||||||
|
|
||||||
SENSORS: dict[str | None, SensorEntityDescription] = {
|
SENSORS: dict[str | None, SensorEntityDescription] = {
|
||||||
@@ -200,12 +194,11 @@ async def async_setup_entry(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the emoncms sensors."""
|
"""Set up the emoncms sensors."""
|
||||||
name = sensor_name(entry.data[CONF_URL])
|
name = sensor_name(entry.data[CONF_URL])
|
||||||
exclude_feeds = entry.data.get(CONF_EXCLUDE_FEEDID)
|
|
||||||
include_only_feeds = entry.options.get(
|
include_only_feeds = entry.options.get(
|
||||||
CONF_ONLY_INCLUDE_FEEDID, entry.data.get(CONF_ONLY_INCLUDE_FEEDID)
|
CONF_ONLY_INCLUDE_FEEDID, entry.data.get(CONF_ONLY_INCLUDE_FEEDID)
|
||||||
)
|
)
|
||||||
|
|
||||||
if exclude_feeds is None and include_only_feeds is None:
|
if include_only_feeds is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
coordinator = entry.runtime_data
|
coordinator = entry.runtime_data
|
||||||
|
Reference in New Issue
Block a user