From 28de5637ef060ac09f58f4a65cfe922717fce063 Mon Sep 17 00:00:00 2001 From: Olaf Strama Date: Fri, 11 Oct 2024 16:47:58 +0200 Subject: [PATCH] removed scipy for testing, heat power will not be correct --- custom_components/weishaupt_modbus/entities.py | 2 +- custom_components/weishaupt_modbus/kennfeld.py | 8 ++++---- custom_components/weishaupt_modbus/manifest.json | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/custom_components/weishaupt_modbus/entities.py b/custom_components/weishaupt_modbus/entities.py index 48574ca..39c3043 100644 --- a/custom_components/weishaupt_modbus/entities.py +++ b/custom_components/weishaupt_modbus/entities.py @@ -158,7 +158,7 @@ async def async_update(self) -> None: def calcPower(self, val, x, y): if val == None: return val - return (val / 100) * self.my_map.map(x,y) + return (val / 100) * 10000 #* self.my_map.map(x,y) @property def translateVal(self): diff --git a/custom_components/weishaupt_modbus/kennfeld.py b/custom_components/weishaupt_modbus/kennfeld.py index 6a3ebf8..a914427 100644 --- a/custom_components/weishaupt_modbus/kennfeld.py +++ b/custom_components/weishaupt_modbus/kennfeld.py @@ -1,4 +1,4 @@ -from scipy.interpolate import CubicSpline +#from scipy.interpolate import CubicSpline import numpy as np class PowerMap(): @@ -49,9 +49,9 @@ def __init__(self) -> None: # we want to have samples at every integer °C t = np.linspace(-30, 40, 71) # cubic spline interpolation of power curves - for idx in range(0, len(self.r_to_interpolate)): - f = CubicSpline(self.known_x, self.interp_y[idx], bc_type='natural') - self.max_power.append(f(t)) + #for idx in range(0, len(self.r_to_interpolate)): + # f = CubicSpline(self.known_x, self.interp_y[idx], bc_type='natural') + # self.max_power.append(f(t)) def map(self,x,y): diff --git a/custom_components/weishaupt_modbus/manifest.json b/custom_components/weishaupt_modbus/manifest.json index c01d47d..ee82ce8 100644 --- a/custom_components/weishaupt_modbus/manifest.json +++ b/custom_components/weishaupt_modbus/manifest.json @@ -6,7 +6,7 @@ "documentation": "https://github.com/OStrama/weishaupt_modbus/", "iot_class": "local_polling", "issue_tracker": "https://github.com/OStrama/weishaupt_modbus/issues", - "requirements": ["scipy==1.14.1"], - "version": "0.0.3" + "requirements": [], + "version": "0.0.4" }