diff --git a/homeassistant/components/feedreader/__init__.py b/homeassistant/components/feedreader/__init__.py index 9acec01ee6d1..11ac553513f0 100644 --- a/homeassistant/components/feedreader/__init__.py +++ b/homeassistant/components/feedreader/__init__.py @@ -9,14 +9,12 @@ from homeassistant.util.hass_dict import HassKey from .const import DOMAIN from .coordinator import FeedReaderConfigEntry, FeedReaderCoordinator, StoredData -CONF_URLS = "urls" - -MY_KEY: HassKey[StoredData] = HassKey(DOMAIN) +FEEDREADER_KEY: HassKey[StoredData] = HassKey(DOMAIN) async def async_setup_entry(hass: HomeAssistant, entry: FeedReaderConfigEntry) -> bool: """Set up Feedreader from a config entry.""" - storage = hass.data.setdefault(MY_KEY, StoredData(hass)) + storage = hass.data.setdefault(FEEDREADER_KEY, StoredData(hass)) if not storage.is_initialized: await storage.async_setup() @@ -42,5 +40,5 @@ async def async_unload_entry(hass: HomeAssistant, entry: FeedReaderConfigEntry) ) # if this is the last entry, remove the storage if len(entries) == 1: - hass.data.pop(MY_KEY) + hass.data.pop(FEEDREADER_KEY) return await hass.config_entries.async_unload_platforms(entry, [Platform.EVENT]) diff --git a/homeassistant/components/feedreader/event.py b/homeassistant/components/feedreader/event.py index dc7c9e880d5c..4396d70e707f 100644 --- a/homeassistant/components/feedreader/event.py +++ b/homeassistant/components/feedreader/event.py @@ -42,16 +42,15 @@ class FeedReaderEvent(CoordinatorEntity[FeedReaderCoordinator], EventEntity): _attr_event_types = [EVENT_FEEDREADER] _attr_name = None _attr_has_entity_name = True + _attr_translation_key = "latest_feed" _unrecorded_attributes = frozenset( {ATTR_CONTENT, ATTR_DESCRIPTION, ATTR_TITLE, ATTR_LINK} ) - coordinator: FeedReaderCoordinator def __init__(self, coordinator: FeedReaderCoordinator) -> None: """Initialize the feedreader event.""" super().__init__(coordinator) self._attr_unique_id = f"{coordinator.config_entry.entry_id}_latest_feed" - self._attr_translation_key = "latest_feed" self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, coordinator.config_entry.entry_id)}, name=coordinator.config_entry.title, diff --git a/homeassistant/components/feedreader/strings.json b/homeassistant/components/feedreader/strings.json index c6900b9ff818..d4e49f29a413 100644 --- a/homeassistant/components/feedreader/strings.json +++ b/homeassistant/components/feedreader/strings.json @@ -21,12 +21,6 @@ } } }, - "issues": { - "import_yaml_error_url_error": { - "description": "Configuring the Feedreader using YAML is being removed but there was a connection error when trying to import the YAML configuration for `{url}`.\n\nPlease verify that the URL is reachable and accessible for Home Assistant and restart Home Assistant to try again or remove the Feedreader YAML configuration from your configuration.yaml file and continue to set up the integration manually.", - "title": "The Feedreader YAML configuration import failed" - } - }, "options": { "step": { "init": {