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.
Files changed (47) hide show
  1. {juham_automation-0.0.28/juham_automation.egg-info → juham_automation-0.0.29}/PKG-INFO +1 -1
  2. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/heatingoptimizer.py +4 -6
  3. {juham_automation-0.0.28 → juham_automation-0.0.29/juham_automation.egg-info}/PKG-INFO +1 -1
  4. {juham_automation-0.0.28 → juham_automation-0.0.29}/pyproject.toml +1 -1
  5. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_heatingoptimizer.py +3 -4
  6. {juham_automation-0.0.28 → juham_automation-0.0.29}/LICENSE.rst +0 -0
  7. {juham_automation-0.0.28 → juham_automation-0.0.29}/MANIFEST.in +0 -0
  8. {juham_automation-0.0.28 → juham_automation-0.0.29}/README.rst +0 -0
  9. {juham_automation-0.0.28 → juham_automation-0.0.29}/examples/myapp.py +0 -0
  10. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/__init__.py +0 -0
  11. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/__init__.py +0 -0
  12. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/energybalancer.py +0 -0
  13. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/energycostcalculator.py +0 -0
  14. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/powermeter_simulator.py +0 -0
  15. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/spothintafi.py +0 -0
  16. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/automation/watercirculator.py +0 -0
  17. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/japp.py +0 -0
  18. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/py.typed +0 -0
  19. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/__init__.py +0 -0
  20. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/electricityprice_ts.py +0 -0
  21. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/energybalancer_ts.py +0 -0
  22. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/energycostcalculator_ts.py +0 -0
  23. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/forecast_ts.py +0 -0
  24. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/log_ts.py +0 -0
  25. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/power_ts.py +0 -0
  26. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/powermeter_ts.py +0 -0
  27. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation/ts/powerplan_ts.py +0 -0
  28. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/SOURCES.txt +0 -0
  29. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/dependency_links.txt +0 -0
  30. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/entry_points.txt +0 -0
  31. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/requires.txt +0 -0
  32. {juham_automation-0.0.28 → juham_automation-0.0.29}/juham_automation.egg-info/top_level.txt +0 -0
  33. {juham_automation-0.0.28 → juham_automation-0.0.29}/setup.cfg +0 -0
  34. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/__init__.py +0 -0
  35. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/__init__.py +0 -0
  36. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_energybalancer.py +0 -0
  37. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_energycostcalculator.py +0 -0
  38. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_juham.py +0 -0
  39. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/automation/test_spothintafi.py +0 -0
  40. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/test_japp.py +0 -0
  41. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/__init__.py +0 -0
  42. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_energycostcalculator_ts.py +0 -0
  43. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_forecast_ts.py +0 -0
  44. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_log_ts.py +0 -0
  45. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_power_ts.py +0 -0
  46. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_powermeter_ts.py +0 -0
  47. {juham_automation-0.0.28 → juham_automation-0.0.29}/tests/ts/test_powerplan_ts.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: juham-automation
3
- Version: 0.0.28
3
+ Version: 0.0.29
4
4
  Summary: Juha's Ultimate Home Automation Masterpiece
5
5
  Author-email: J Meskanen <juham.api@gmail.com>
6
6
  Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
@@ -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.topic_in_powerconsumption = self.make_topic_name("powerconsumption")
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") # controls the relay
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.topic_in_powerconsumption)
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.topic_in_net_energy_balance:
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: juham-automation
3
- Version: 0.0.28
3
+ Version: 0.0.29
4
4
  Summary: Juha's Ultimate Home Automation Masterpiece
5
5
  Author-email: J Meskanen <juham.api@gmail.com>
6
6
  Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "juham-automation"
8
- version = "0.0.28"
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"
@@ -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.topic_in_powerconsumption)
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.topic_in_net_energy_balance,
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.topic_in_net_energy_balance,
123
+ topic=self.optimizer.topic_in_energybalance,
125
124
  payload=json.dumps({"Unit": "sun", "Mode": True}).encode("utf-8"),
126
125
  ),
127
126
  )