juham-automation 0.0.28__tar.gz → 0.0.29__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {juham_automation-0.0.28/juham_automation.egg-info → juham_automation-0.0.29}/PKG-INFO +1 -1
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/heatingoptimizer.py +4 -6
- {juham_automation-0.0.28 → juham_automation-0.0.29/juham_automation.egg-info}/PKG-INFO +1 -1
- {juham_automation-0.0.28 → juham_automation-0.0.29}/pyproject.toml +1 -1
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_heatingoptimizer.py +3 -4
- {juham_automation-0.0.28 → juham_automation-0.0.29}/LICENSE.rst +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/MANIFEST.in +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/README.rst +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/examples/myapp.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/__init__.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/__init__.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/energybalancer.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/energycostcalculator.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/powermeter_simulator.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/spothintafi.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/watercirculator.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/japp.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/py.typed +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/__init__.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/electricityprice_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/energybalancer_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/energycostcalculator_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/forecast_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/log_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/power_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/powermeter_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/powerplan_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/SOURCES.txt +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/dependency_links.txt +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/entry_points.txt +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/requires.txt +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/top_level.txt +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/setup.cfg +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/__init__.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/__init__.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_energybalancer.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_energycostcalculator.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_juham.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_spothintafi.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/test_japp.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/__init__.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_energycostcalculator_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_forecast_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_log_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_power_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_powermeter_ts.py +0 -0
- {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_powerplan_ts.py +0 -0
{juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/heatingoptimizer.py
RENAMED
@@ -88,10 +88,9 @@ class HeatingOptimizer(Juham):
|
|
88
88
|
self.topic_forecast = self.make_topic_name("forecast")
|
89
89
|
self.topic_temperature = self.make_topic_name(temperature_sensor)
|
90
90
|
self.topic_powerplan = self.make_topic_name("powerplan")
|
91
|
-
self.
|
92
|
-
self.topic_in_net_energy_balance = self.make_topic_name("net_energy_balance")
|
91
|
+
self.topic_in_energybalance = self.make_topic_name("energybalance")
|
93
92
|
self.topic_out_energybalance = self.make_topic_name("energybalance_consumers")
|
94
|
-
self.topic_out_power = self.make_topic_name("power")
|
93
|
+
self.topic_out_power = self.make_topic_name("power")
|
95
94
|
|
96
95
|
self.current_temperature = 100
|
97
96
|
self.current_heating_plan = 0
|
@@ -111,8 +110,7 @@ class HeatingOptimizer(Juham):
|
|
111
110
|
self.subscribe(self.topic_spot)
|
112
111
|
self.subscribe(self.topic_forecast)
|
113
112
|
self.subscribe(self.topic_temperature)
|
114
|
-
self.subscribe(self.
|
115
|
-
self.subscribe(self.topic_in_net_energy_balance)
|
113
|
+
self.subscribe(self.topic_in_energybalance)
|
116
114
|
self.register_as_consumer()
|
117
115
|
|
118
116
|
def register_as_consumer(self) -> None:
|
@@ -226,7 +224,7 @@ class HeatingOptimizer(Juham):
|
|
226
224
|
elif msg.topic == self.topic_temperature:
|
227
225
|
m = json.loads(msg.payload.decode())
|
228
226
|
self.current_temperature = m["temperature"]
|
229
|
-
elif msg.topic == self.
|
227
|
+
elif msg.topic == self.topic_in_energybalance:
|
230
228
|
decoded_payload = msg.payload.decode()
|
231
229
|
m = json.loads(decoded_payload)
|
232
230
|
self.on_netenergy_balance(m)
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
5
5
|
|
6
6
|
[project]
|
7
7
|
name = "juham-automation"
|
8
|
-
version = "0.0.
|
8
|
+
version = "0.0.29"
|
9
9
|
description = "Juha's Ultimate Home Automation Masterpiece"
|
10
10
|
readme = {file = "README.rst", content-type = "text/markdown"}
|
11
11
|
requires-python = ">=3.8"
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_heatingoptimizer.py
RENAMED
@@ -75,8 +75,7 @@ class TestHeatingOptimizer(unittest.TestCase):
|
|
75
75
|
self.mock_subscribe.assert_any_call(self.optimizer.topic_spot)
|
76
76
|
self.mock_subscribe.assert_any_call(self.optimizer.topic_forecast)
|
77
77
|
self.mock_subscribe.assert_any_call(self.optimizer.topic_temperature)
|
78
|
-
self.mock_subscribe.assert_any_call(self.optimizer.
|
79
|
-
self.mock_subscribe.assert_any_call(self.optimizer.topic_in_net_energy_balance)
|
78
|
+
self.mock_subscribe.assert_any_call(self.optimizer.topic_in_energybalance)
|
80
79
|
|
81
80
|
def test_sort_by_rank(self) -> None:
|
82
81
|
test_data = [
|
@@ -109,7 +108,7 @@ class TestHeatingOptimizer(unittest.TestCase):
|
|
109
108
|
"""Test case to simulate passing time and check energy balancing behavior."""
|
110
109
|
data: dict[str, Any] = {"Unit": "main", "Mode": False}
|
111
110
|
mock_msg = SimpleMqttMsg(
|
112
|
-
topic=self.optimizer.
|
111
|
+
topic=self.optimizer.topic_in_energybalance,
|
113
112
|
payload=json.dumps(data).encode("utf-8"),
|
114
113
|
)
|
115
114
|
self.optimizer.on_message(None, None, mock_msg)
|
@@ -121,7 +120,7 @@ class TestHeatingOptimizer(unittest.TestCase):
|
|
121
120
|
None,
|
122
121
|
None,
|
123
122
|
SimpleMqttMsg(
|
124
|
-
topic=self.optimizer.
|
123
|
+
topic=self.optimizer.topic_in_energybalance,
|
125
124
|
payload=json.dumps({"Unit": "sun", "Mode": True}).encode("utf-8"),
|
126
125
|
),
|
127
126
|
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/energybalancer.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/spothintafi.py
RENAMED
File without changes
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/watercirculator.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/electricityprice_ts.py
RENAMED
File without changes
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/energybalancer_ts.py
RENAMED
File without changes
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/energycostcalculator_ts.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/dependency_links.txt
RENAMED
File without changes
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/entry_points.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_energycostcalculator.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_energycostcalculator_ts.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|