Remove CONF_EXCLUDE_FEEDID constant from the emoncms integration (#150333)

This commit is contained in:
Alexandre CUER
2025-08-10 09:52:17 +02:00
committed by GitHub
parent 865b3a6646
commit d539f37aa4
2 changed files with 2 additions and 10 deletions

View File

@@ -2,7 +2,6 @@
import logging
CONF_EXCLUDE_FEEDID = "exclude_feed_id"
CONF_ONLY_INCLUDE_FEEDID = "include_only_feed_id"
CONF_MESSAGE = "message"
CONF_SUCCESS = "success"

View File

@@ -34,13 +34,7 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .config_flow import sensor_name
from .const import (
CONF_EXCLUDE_FEEDID,
CONF_ONLY_INCLUDE_FEEDID,
FEED_ID,
FEED_NAME,
FEED_TAG,
)
from .const import CONF_ONLY_INCLUDE_FEEDID, FEED_ID, FEED_NAME, FEED_TAG
from .coordinator import EmonCMSConfigEntry, EmoncmsCoordinator
SENSORS: dict[str | None, SensorEntityDescription] = {
@@ -200,12 +194,11 @@ async def async_setup_entry(
) -> None:
"""Set up the emoncms sensors."""
name = sensor_name(entry.data[CONF_URL])
exclude_feeds = entry.data.get(CONF_EXCLUDE_FEEDID)
include_only_feeds = entry.options.get(
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
coordinator = entry.runtime_data