boneIO 1.2.0.dev13__py3-none-any.whl → 1.2.0.dev15__py3-none-any.whl

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 (114) hide show
  1. boneio/components/cover/cover.py +10 -3
  2. boneio/components/template/__init__.py +15 -0
  3. boneio/components/template/alarm_panel.py +755 -0
  4. boneio/components/template/gate_cover.py +456 -0
  5. boneio/components/template/thermostat.py +313 -0
  6. boneio/const.py +2 -0
  7. boneio/core/config/config_helper.py +5 -1
  8. boneio/core/config/schema_converter.py +3 -3
  9. boneio/core/config/yaml_util.py +18 -6
  10. boneio/core/events/bus.py +1 -0
  11. boneio/core/manager/__init__.py +3 -0
  12. boneio/core/manager/covers.py +22 -9
  13. boneio/core/manager/inputs.py +68 -31
  14. boneio/core/manager/manager.py +34 -72
  15. boneio/core/manager/outputs.py +39 -15
  16. boneio/core/manager/remote.py +1 -1
  17. boneio/core/manager/sensors.py +140 -160
  18. boneio/core/manager/templates/__init__.py +283 -0
  19. boneio/core/manager/templates/alarm.py +300 -0
  20. boneio/core/manager/templates/gate_cover.py +242 -0
  21. boneio/core/manager/templates/thermostat.py +195 -0
  22. boneio/core/manager/templates.py +812 -0
  23. boneio/core/manager/update.py +7 -3
  24. boneio/core/remote/esphome.py +31 -4
  25. boneio/core/system/host_data.py +2 -2
  26. boneio/core/utils/timeperiod.py +51 -0
  27. boneio/integration/homeassistant.py +164 -2
  28. boneio/modbus/coordinator.py +37 -13
  29. boneio/modbus/devices/sensors/boneio-edge-temp.json +50 -0
  30. boneio/modbus/devices/sensors/gdfs.json +35 -0
  31. boneio/modbus/devices/sensors/gdfx.json +41 -0
  32. boneio/runner.py +2 -0
  33. boneio/schema/schema.yaml +236 -0
  34. boneio/version.py +1 -1
  35. boneio/webui/app.py +4 -0
  36. boneio/webui/frontend-dist/assets/{cssMode-BfpKwbwH.js → cssMode-HeIVc-aO.js} +1 -1
  37. boneio/webui/frontend-dist/assets/{freemarker2-BFOJH_qW.js → freemarker2-C1HNg8lF.js} +1 -1
  38. boneio/webui/frontend-dist/assets/{handlebars-C_N9yeO4.js → handlebars-MmOdUJxD.js} +1 -1
  39. boneio/webui/frontend-dist/assets/{html-6BefqeT8.js → html-BP5psUbr.js} +1 -1
  40. boneio/webui/frontend-dist/assets/{htmlMode-1sYtnvz6.js → htmlMode-4gHPQVld.js} +1 -1
  41. boneio/webui/frontend-dist/assets/index-CeJWze6Z.css +1 -0
  42. boneio/webui/frontend-dist/assets/{index-BLpM8qXw.js → index-hh_u9k2g.js} +248 -248
  43. boneio/webui/frontend-dist/assets/{javascript-Dr3KqGnh.js → javascript-uXGeR1kk.js} +1 -1
  44. boneio/webui/frontend-dist/assets/{jsonMode-CKDbIGXD.js → jsonMode-HsvDB28W.js} +1 -1
  45. boneio/webui/frontend-dist/assets/{liquid-CnTwvfNF.js → liquid-BlMwef5w.js} +1 -1
  46. boneio/webui/frontend-dist/assets/{mdx-CK9ZDpqo.js → mdx-D833dxsL.js} +1 -1
  47. boneio/webui/frontend-dist/assets/{python-Cjrqf5l0.js → python-DTvAPFaH.js} +1 -1
  48. boneio/webui/frontend-dist/assets/{razor-CFuoqcoy.js → razor-BDN3TBuT.js} +1 -1
  49. boneio/webui/frontend-dist/assets/{tsMode-NMszkgDJ.js → tsMode-BcVKeqCt.js} +1 -1
  50. boneio/webui/frontend-dist/assets/{typescript-C5KJMTrL.js → typescript-BZWQ3Vjb.js} +1 -1
  51. boneio/webui/frontend-dist/assets/{xml-BYBhdL7k.js → xml-C_3YNQeV.js} +1 -1
  52. boneio/webui/frontend-dist/assets/{yaml-DvK-FWoh.js → yaml-C3pWYyCm.js} +1 -1
  53. boneio/webui/frontend-dist/index.html +2 -2
  54. boneio/webui/frontend-dist/{schem → schema}/adc.schema.json +4 -4
  55. boneio/webui/frontend-dist/{schem → schema}/areas.schema.json +2 -2
  56. boneio/webui/frontend-dist/{schem → schema}/binary_sensor.schema.json +18 -18
  57. boneio/webui/frontend-dist/{schem → schema}/config.schema.json +524 -148
  58. boneio/webui/frontend-dist/{schem → schema}/cover.schema.json +2 -2
  59. boneio/webui/frontend-dist/{schem → schema}/ds2482.schema.json +2 -2
  60. boneio/webui/frontend-dist/{schem → schema}/event.schema.json +58 -58
  61. boneio/webui/frontend-dist/{schem → schema}/ina219.schema.json +6 -6
  62. boneio/webui/frontend-dist/{schem → schema}/lm75.schema.json +4 -4
  63. boneio/webui/frontend-dist/{schem → schema}/mcp23017.schema.json +2 -2
  64. boneio/webui/frontend-dist/{schem → schema}/mcp9808.schema.json +4 -4
  65. boneio/webui/frontend-dist/{schem → schema}/modbus_devices.schema.json +18 -6
  66. boneio/webui/frontend-dist/{schem → schema}/oled.schema.json +4 -4
  67. boneio/webui/frontend-dist/{schem → schema}/output.schema.json +4 -4
  68. boneio/webui/frontend-dist/{schem → schema}/output_group.schema.json +4 -4
  69. boneio/webui/frontend-dist/{schem → schema}/pca9685.schema.json +2 -2
  70. boneio/webui/frontend-dist/{schem → schema}/pcf8575.schema.json +2 -2
  71. boneio/webui/frontend-dist/{schem → schema}/remote_devices.schema.json +18 -18
  72. boneio/webui/frontend-dist/{schem → schema}/sensor.schema.json +4 -4
  73. boneio/webui/frontend-dist/schema/template.schema.json +370 -0
  74. boneio/webui/frontend-dist/{schem → schema}/virtual_energy_sensor.schema.json +2 -2
  75. boneio/webui/frontend-dist/sw.js +1 -1
  76. boneio/webui/routes/__init__.py +2 -0
  77. boneio/webui/routes/config.py +75 -1
  78. boneio/webui/routes/modbus.py +50 -0
  79. boneio/webui/routes/sensors.py +17 -0
  80. boneio/webui/routes/templates.py +195 -0
  81. boneio/webui/schema/adc.schema.json +4 -4
  82. boneio/webui/schema/areas.schema.json +2 -2
  83. boneio/webui/schema/binary_sensor.schema.json +18 -18
  84. boneio/webui/schema/config.schema.json +524 -148
  85. boneio/webui/schema/cover.schema.json +2 -2
  86. boneio/webui/schema/ds2482.schema.json +2 -2
  87. boneio/webui/schema/event.schema.json +58 -58
  88. boneio/webui/schema/ina219.schema.json +6 -6
  89. boneio/webui/schema/lm75.schema.json +4 -4
  90. boneio/webui/schema/mcp23017.schema.json +2 -2
  91. boneio/webui/schema/mcp9808.schema.json +4 -4
  92. boneio/webui/schema/modbus_devices.schema.json +18 -6
  93. boneio/webui/schema/oled.schema.json +4 -4
  94. boneio/webui/schema/output.schema.json +4 -4
  95. boneio/webui/schema/output_group.schema.json +4 -4
  96. boneio/webui/schema/pca9685.schema.json +2 -2
  97. boneio/webui/schema/pcf8575.schema.json +2 -2
  98. boneio/webui/schema/remote_devices.schema.json +18 -18
  99. boneio/webui/schema/sensor.schema.json +4 -4
  100. boneio/webui/schema/template.schema.json +370 -0
  101. boneio/webui/schema/virtual_energy_sensor.schema.json +2 -2
  102. {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/METADATA +1 -1
  103. {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/RECORD +113 -98
  104. boneio/webui/frontend-dist/assets/index-gG0CrhGE.css +0 -1
  105. /boneio/webui/frontend-dist/{schem → schema}/boneio.schema.json +0 -0
  106. /boneio/webui/frontend-dist/{schem → schema}/dallas.schema.json +0 -0
  107. /boneio/webui/frontend-dist/{schem → schema}/logger.schema.json +0 -0
  108. /boneio/webui/frontend-dist/{schem → schema}/modbus.schema.json +0 -0
  109. /boneio/webui/frontend-dist/{schem → schema}/mqtt.schema.json +0 -0
  110. /boneio/webui/frontend-dist/{schem → schema}/web.schema.json +0 -0
  111. {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/WHEEL +0 -0
  112. {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/entry_points.txt +0 -0
  113. {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/licenses/LICENSE +0 -0
  114. {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/top_level.txt +0 -0
@@ -171,6 +171,7 @@ class BaseCover(BaseCoverABC, BasicMqtt):
171
171
  self._position = position
172
172
  self._initial_position = None
173
173
  self._current_operation = IDLE
174
+ self._last_operation = CLOSING
174
175
  _LOGGER.debug(
175
176
  "BaseCover %s initialized: open_time=%dms, close_time=%dms, initial_position=%d%%",
176
177
  id, self._open_time, self._close_time, position
@@ -207,6 +208,8 @@ class BaseCover(BaseCoverABC, BasicMqtt):
207
208
  # Send relay states to WebSocket (not MQTT - that's handled by output_type check)
208
209
  asyncio.create_task(self._open_relay.async_send_state())
209
210
  asyncio.create_task(self._close_relay.async_send_state())
211
+ if self._current_operation in (OPENING, CLOSING):
212
+ self._last_operation = self._current_operation
210
213
  self._current_operation = IDLE
211
214
  if not on_exit:
212
215
  self.send_state(self.state, self.json_position)
@@ -219,6 +222,7 @@ class BaseCover(BaseCoverABC, BasicMqtt):
219
222
  "Opening cover %s from position %d%%. Estimated time: %.1fs (open_time=%dms)",
220
223
  self._id, self._position, estimated_time_s, self._open_time
221
224
  )
225
+ self._last_operation = OPENING
222
226
  await self.run_cover(current_operation=OPENING)
223
227
  self._message_bus.send_message(topic=f"{self._send_topic}/state", payload=OPENING)
224
228
 
@@ -230,6 +234,7 @@ class BaseCover(BaseCoverABC, BasicMqtt):
230
234
  "Closing cover %s from position %d%%. Estimated time: %.1fs (close_time=%dms)",
231
235
  self._id, self._position, estimated_time_s, self._close_time
232
236
  )
237
+ self._last_operation = CLOSING
233
238
  await self.run_cover(current_operation=CLOSING)
234
239
  self._message_bus.send_message(topic=f"{self._send_topic}/state", payload=CLOSING)
235
240
 
@@ -258,10 +263,12 @@ class BaseCover(BaseCoverABC, BasicMqtt):
258
263
 
259
264
  async def toggle(self) -> None:
260
265
  _LOGGER.debug("Toggle cover %s from input.", self._id)
261
- if self._position > 50:
262
- await self.close()
263
- else:
266
+ if self._current_operation != IDLE:
267
+ await self.stop()
268
+ elif self._last_operation == CLOSING:
264
269
  await self.open()
270
+ else:
271
+ await self.close()
265
272
 
266
273
  async def toggle_open(self) -> None:
267
274
  _LOGGER.debug("Toggle open cover %s from input.", self._id)
@@ -0,0 +1,15 @@
1
+ """Template components — composite virtual entities.
2
+
3
+ Combines existing boneIO primitives (inputs, outputs, sensors) into
4
+ higher-level Home Assistant entities (climate, alarm_control_panel, cover, etc.).
5
+ """
6
+
7
+ from boneio.components.template.thermostat import BoneIOThermostat
8
+ from boneio.components.template.alarm_panel import BoneIOAlarmPanel
9
+ from boneio.components.template.gate_cover import BoneIOGateCover
10
+
11
+ __all__ = [
12
+ "BoneIOThermostat",
13
+ "BoneIOAlarmPanel",
14
+ "BoneIOGateCover",
15
+ ]