Skip to content

Commit

Permalink
Remove config entry mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed May 23, 2024
1 parent 44e253e commit fd4d0e7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions custom_components/hacs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from dataclasses import asdict, dataclass, field
from datetime import timedelta
import gzip
import logging
import math
import os
import pathlib
Expand All @@ -28,7 +27,7 @@
from homeassistant.components.persistent_notification import (
async_create as async_create_persistent_notification,
)
from homeassistant.config_entries import ConfigEntry, ConfigEntryState
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EVENT_HOMEASSISTANT_FINAL_WRITE, Platform
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_send
Expand Down Expand Up @@ -416,8 +415,6 @@ def disable_hacs(self, reason: HacsDisabledReason) -> None:
reason == HacsDisabledReason.INVALID_TOKEN
and self.configuration.config_type == ConfigurationType.CONFIG_ENTRY
):
self.configuration.config_entry.state = ConfigEntryState.SETUP_ERROR
self.configuration.config_entry.reason = "Authentication failed"
self.hass.add_job(self.configuration.config_entry.async_start_reauth, self.hass)

def enable_hacs(self) -> None:
Expand Down

0 comments on commit fd4d0e7

Please sign in to comment.