Skip to content

Commit

Permalink
Update config_flow.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiteixeira committed Apr 26, 2023
1 parent a05cece commit d25500f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion custom_components/drivvo/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
from homeassistant.data_entry_flow import FlowResult
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
from homeassistant.helpers.issue_registry import (
IssueSeverity,
async_create_issue,
async_delete_issue,
)

from . import auth, get_vehicles
from .const import (
Expand Down Expand Up @@ -63,6 +67,11 @@ async def async_step_init(self, user_input: dict[str, Any]) -> FlowResult:
device_id=device.id,
remove_config_entry_id=self.config_entry.entry_id,
)
async_delete_issue(
self.hass,
DOMAIN,
f"{vehicle}_vehicle_non_existent",
)
_LOGGER.debug("Device %s (%s) removed", device.name, device.id)

self.hass.config_entries.async_update_entry(
Expand Down

0 comments on commit d25500f

Please sign in to comment.