diff --git a/_docs/faq.md b/_docs/faq.md index 12c952d..6b050db 100644 --- a/_docs/faq.md +++ b/_docs/faq.md @@ -2,7 +2,9 @@ ## I've updated the configuration of one of my target timeframe sensors but it's not updating. Is there something wrong? -For some reason when you update the configuration via the integration page, the associated entities don't update. You'll need to reload the parent entry to get the configuration to take effect. This is something I'm currently investigating. +This was an issue before Home Assistant 2025.09. If you update to 2025.09 or later, this should no longer be an issue. + +If you are on a version before Home Assistant 2025.09, then you'll need to reload the parent entry to get the configuration to take effect. ## I've setup a target timeframe with the default time period (00:00-00:00) or a rolling target timeframe looking ahead for 24 hours but it's not updating. Is something broken? diff --git a/custom_components/target_timeframes/config_flow.py b/custom_components/target_timeframes/config_flow.py index 5b82a0d..2a94a83 100644 --- a/custom_components/target_timeframes/config_flow.py +++ b/custom_components/target_timeframes/config_flow.py @@ -120,7 +120,7 @@ async def async_step_reconfigure(self, user_input: dict[str, Any] | None = None) errors = validate_target_timeframe_config(config) if len(errors) < 1 and user_input is not None: - return self.async_update_and_abort( + return self.async_update_reload_and_abort( self._get_entry(), self._get_reconfigure_subentry(), data_updates=config, @@ -165,7 +165,7 @@ async def async_step_reconfigure(self, user_input: dict[str, Any] | None = None) errors = validate_rolling_target_timeframe_config(config) if len(errors) < 1 and user_input is not None: - return self.async_update_and_abort( + return self.async_update_reload_and_abort( self._get_entry(), self._get_reconfigure_subentry(), data_updates=config, diff --git a/custom_components/target_timeframes/const.py b/custom_components/target_timeframes/const.py index 7f1d1f6..8fd21ce 100644 --- a/custom_components/target_timeframes/const.py +++ b/custom_components/target_timeframes/const.py @@ -119,8 +119,8 @@ vol.Optional(CONFIG_TARGET_ROLLING_TARGET, default=False): bool, vol.Optional(CONFIG_TARGET_LATEST_VALUES, default=False): bool, vol.Optional(CONFIG_TARGET_FIND_HIGHEST_VALUES, default=False): bool, - vol.Optional(CONFIG_TARGET_MIN_VALUE): float, - vol.Optional(CONFIG_TARGET_MAX_VALUE): float, + vol.Optional(CONFIG_TARGET_MIN_VALUE): vol.Coerce(float), + vol.Optional(CONFIG_TARGET_MAX_VALUE): vol.Coerce(float), vol.Optional(CONFIG_TARGET_WEIGHTING): str, vol.Required(CONFIG_TARGET_DANGEROUS_SETTINGS): section( vol.Schema( @@ -169,8 +169,8 @@ ), vol.Optional(CONFIG_TARGET_LATEST_VALUES): bool, vol.Optional(CONFIG_TARGET_FIND_HIGHEST_VALUES): bool, - vol.Optional(CONFIG_TARGET_MIN_VALUE): float, - vol.Optional(CONFIG_TARGET_MAX_VALUE): float, + vol.Optional(CONFIG_TARGET_MIN_VALUE): vol.Coerce(float), + vol.Optional(CONFIG_TARGET_MAX_VALUE): vol.Coerce(float), vol.Optional(CONFIG_TARGET_WEIGHTING): str, vol.Required(CONFIG_TARGET_DANGEROUS_SETTINGS): section( vol.Schema( diff --git a/hacs.json b/hacs.json index adc9b00..bdf1bc0 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { "name": "Target Timeframes", "render_readme": true, - "homeassistant": "2025.4.0", + "homeassistant": "2025.9.0", "hide_default_branch": true } \ No newline at end of file