Skip to content

Commit

Permalink
Fix config_flow.py for HA <2024.4.0b0 (#9)
Browse files Browse the repository at this point in the history
Fixes #7

Signed-off-by: rany <ranygh@riseup.net>
  • Loading branch information
rany2 authored Jun 9, 2024
1 parent bb4e014 commit a44fa01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/open_meteo_solar_forecast/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from homeassistant.config_entries import (
ConfigEntry,
ConfigFlow,
ConfigFlowResult,
OptionsFlow,
)
from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME
Expand All @@ -25,6 +24,11 @@
DOMAIN,
)

try:
from homeassistant.config_entries import ConfigFlowResult # >=2024.4.0b0
except ImportError:
from homeassistant.data_entry_flow import FlowResult as ConfigFlowResult


class OpenMeteoSolarForecastFlowHandler(ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Open-Meteo Solar Forecast."""
Expand Down

0 comments on commit a44fa01

Please sign in to comment.