Skip to content

Commit

Permalink
removed scipy for testing, heat power will not be correct
Browse files Browse the repository at this point in the history
  • Loading branch information
OStrama committed Oct 11, 2024
1 parent a003ec1 commit 28de563
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion custom_components/weishaupt_modbus/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 4 additions & 4 deletions custom_components/weishaupt_modbus/kennfeld.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from scipy.interpolate import CubicSpline
#from scipy.interpolate import CubicSpline
import numpy as np

class PowerMap():
Expand Down Expand Up @@ -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):

Expand Down
4 changes: 2 additions & 2 deletions custom_components/weishaupt_modbus/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 28de563

Please sign in to comment.