From 7d5042c261be967a2ffc057e1cc70eaff4beb3e5 Mon Sep 17 00:00:00 2001 From: "Ian C." <108159253+ic-dev21@users.noreply.github.com> Date: Sat, 10 Oct 2026 13:04:49 -0400 Subject: [PATCH 1/2] Pass on config file path This will allow docker images such as linuxserver's to run properly. Should not affect other installs at all. --- custom_components/hilo/__init__.py | 1 + custom_components/hilo/sensor.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/hilo/__init__.py b/custom_components/hilo/__init__.py index cade7af0..7b632853 100644 --- a/custom_components/hilo/__init__.py +++ b/custom_components/hilo/__init__.py @@ -215,6 +215,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: hass, entry, implementation ), log_traces=current_options.get(CONF_LOG_TRACES, DEFAULT_LOG_TRACES), + state_yaml=hass.config.path("hilo_state.yaml"), ) except (TimeoutError, client_exceptions.ClientConnectorError): diff --git a/custom_components/hilo/sensor.py b/custom_components/hilo/sensor.py index 6daf2e25..c017b902 100755 --- a/custom_components/hilo/sensor.py +++ b/custom_components/hilo/sensor.py @@ -739,7 +739,9 @@ def __init__(self, hilo, device, scan_interval): Platform.SENSOR, ) LOG.debug("Setting up RewardSensor entity: %s", self._attr_name) - self._history_state_yaml: str = "hilo_eventhistory_state.yaml" + self._history_state_yaml: str = hilo._hass.config.path( + +"hilo_eventhistory_state.yaml" + ) self.scan_interval = timedelta(seconds=REWARD_SCAN_INTERVAL) self._state = 0 self._history = [] From 8810079097c8434680129cfa7eade4c5986b99c6 Mon Sep 17 00:00:00 2001 From: "Ian C." <108159253+ic-dev21@users.noreply.github.com> Date: Sat, 10 Oct 2026 13:11:31 -0400 Subject: [PATCH 2/2] Update sensor.py --- custom_components/hilo/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/hilo/sensor.py b/custom_components/hilo/sensor.py index c017b902..aaf1fcf1 100755 --- a/custom_components/hilo/sensor.py +++ b/custom_components/hilo/sensor.py @@ -740,7 +740,7 @@ def __init__(self, hilo, device, scan_interval): ) LOG.debug("Setting up RewardSensor entity: %s", self._attr_name) self._history_state_yaml: str = hilo._hass.config.path( - +"hilo_eventhistory_state.yaml" + "hilo_eventhistory_state.yaml" ) self.scan_interval = timedelta(seconds=REWARD_SCAN_INTERVAL) self._state = 0