Skip to content

Commit

Permalink
catch error on reconfigure
Browse files Browse the repository at this point in the history
  • Loading branch information
OStrama committed Dec 9, 2024
1 parent 77851e6 commit a007cf9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions custom_components/weishaupt_modbus/kennfeld.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,12 @@ async def initialize(self):
f = Chebyshev.fit(self.known_x, self._interp_y[idx], deg=8)
self._max_power.append(f(self._all_t))

await self._config_entry.runtime_data.hass.async_add_executor_job(
self.plot_kennfeld_to_file
)
try:
await self._config_entry.runtime_data.hass.async_add_executor_job(
self.plot_kennfeld_to_file
)
except RuntimeError:
log.warning("Reconfigure powermap")

def map(self, x, y):
"""Map."""
Expand Down

0 comments on commit a007cf9

Please sign in to comment.