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.
- boneio/components/cover/cover.py +10 -3
- boneio/components/template/__init__.py +15 -0
- boneio/components/template/alarm_panel.py +755 -0
- boneio/components/template/gate_cover.py +456 -0
- boneio/components/template/thermostat.py +313 -0
- boneio/const.py +2 -0
- boneio/core/config/config_helper.py +5 -1
- boneio/core/config/schema_converter.py +3 -3
- boneio/core/config/yaml_util.py +18 -6
- boneio/core/events/bus.py +1 -0
- boneio/core/manager/__init__.py +3 -0
- boneio/core/manager/covers.py +22 -9
- boneio/core/manager/inputs.py +68 -31
- boneio/core/manager/manager.py +34 -72
- boneio/core/manager/outputs.py +39 -15
- boneio/core/manager/remote.py +1 -1
- boneio/core/manager/sensors.py +140 -160
- boneio/core/manager/templates/__init__.py +283 -0
- boneio/core/manager/templates/alarm.py +300 -0
- boneio/core/manager/templates/gate_cover.py +242 -0
- boneio/core/manager/templates/thermostat.py +195 -0
- boneio/core/manager/templates.py +812 -0
- boneio/core/manager/update.py +7 -3
- boneio/core/remote/esphome.py +31 -4
- boneio/core/system/host_data.py +2 -2
- boneio/core/utils/timeperiod.py +51 -0
- boneio/integration/homeassistant.py +164 -2
- boneio/modbus/coordinator.py +37 -13
- boneio/modbus/devices/sensors/boneio-edge-temp.json +50 -0
- boneio/modbus/devices/sensors/gdfs.json +35 -0
- boneio/modbus/devices/sensors/gdfx.json +41 -0
- boneio/runner.py +2 -0
- boneio/schema/schema.yaml +236 -0
- boneio/version.py +1 -1
- boneio/webui/app.py +4 -0
- boneio/webui/frontend-dist/assets/{cssMode-BfpKwbwH.js → cssMode-HeIVc-aO.js} +1 -1
- boneio/webui/frontend-dist/assets/{freemarker2-BFOJH_qW.js → freemarker2-C1HNg8lF.js} +1 -1
- boneio/webui/frontend-dist/assets/{handlebars-C_N9yeO4.js → handlebars-MmOdUJxD.js} +1 -1
- boneio/webui/frontend-dist/assets/{html-6BefqeT8.js → html-BP5psUbr.js} +1 -1
- boneio/webui/frontend-dist/assets/{htmlMode-1sYtnvz6.js → htmlMode-4gHPQVld.js} +1 -1
- boneio/webui/frontend-dist/assets/index-CeJWze6Z.css +1 -0
- boneio/webui/frontend-dist/assets/{index-BLpM8qXw.js → index-hh_u9k2g.js} +248 -248
- boneio/webui/frontend-dist/assets/{javascript-Dr3KqGnh.js → javascript-uXGeR1kk.js} +1 -1
- boneio/webui/frontend-dist/assets/{jsonMode-CKDbIGXD.js → jsonMode-HsvDB28W.js} +1 -1
- boneio/webui/frontend-dist/assets/{liquid-CnTwvfNF.js → liquid-BlMwef5w.js} +1 -1
- boneio/webui/frontend-dist/assets/{mdx-CK9ZDpqo.js → mdx-D833dxsL.js} +1 -1
- boneio/webui/frontend-dist/assets/{python-Cjrqf5l0.js → python-DTvAPFaH.js} +1 -1
- boneio/webui/frontend-dist/assets/{razor-CFuoqcoy.js → razor-BDN3TBuT.js} +1 -1
- boneio/webui/frontend-dist/assets/{tsMode-NMszkgDJ.js → tsMode-BcVKeqCt.js} +1 -1
- boneio/webui/frontend-dist/assets/{typescript-C5KJMTrL.js → typescript-BZWQ3Vjb.js} +1 -1
- boneio/webui/frontend-dist/assets/{xml-BYBhdL7k.js → xml-C_3YNQeV.js} +1 -1
- boneio/webui/frontend-dist/assets/{yaml-DvK-FWoh.js → yaml-C3pWYyCm.js} +1 -1
- boneio/webui/frontend-dist/index.html +2 -2
- boneio/webui/frontend-dist/{schem → schema}/adc.schema.json +4 -4
- boneio/webui/frontend-dist/{schem → schema}/areas.schema.json +2 -2
- boneio/webui/frontend-dist/{schem → schema}/binary_sensor.schema.json +18 -18
- boneio/webui/frontend-dist/{schem → schema}/config.schema.json +524 -148
- boneio/webui/frontend-dist/{schem → schema}/cover.schema.json +2 -2
- boneio/webui/frontend-dist/{schem → schema}/ds2482.schema.json +2 -2
- boneio/webui/frontend-dist/{schem → schema}/event.schema.json +58 -58
- boneio/webui/frontend-dist/{schem → schema}/ina219.schema.json +6 -6
- boneio/webui/frontend-dist/{schem → schema}/lm75.schema.json +4 -4
- boneio/webui/frontend-dist/{schem → schema}/mcp23017.schema.json +2 -2
- boneio/webui/frontend-dist/{schem → schema}/mcp9808.schema.json +4 -4
- boneio/webui/frontend-dist/{schem → schema}/modbus_devices.schema.json +18 -6
- boneio/webui/frontend-dist/{schem → schema}/oled.schema.json +4 -4
- boneio/webui/frontend-dist/{schem → schema}/output.schema.json +4 -4
- boneio/webui/frontend-dist/{schem → schema}/output_group.schema.json +4 -4
- boneio/webui/frontend-dist/{schem → schema}/pca9685.schema.json +2 -2
- boneio/webui/frontend-dist/{schem → schema}/pcf8575.schema.json +2 -2
- boneio/webui/frontend-dist/{schem → schema}/remote_devices.schema.json +18 -18
- boneio/webui/frontend-dist/{schem → schema}/sensor.schema.json +4 -4
- boneio/webui/frontend-dist/schema/template.schema.json +370 -0
- boneio/webui/frontend-dist/{schem → schema}/virtual_energy_sensor.schema.json +2 -2
- boneio/webui/frontend-dist/sw.js +1 -1
- boneio/webui/routes/__init__.py +2 -0
- boneio/webui/routes/config.py +75 -1
- boneio/webui/routes/modbus.py +50 -0
- boneio/webui/routes/sensors.py +17 -0
- boneio/webui/routes/templates.py +195 -0
- boneio/webui/schema/adc.schema.json +4 -4
- boneio/webui/schema/areas.schema.json +2 -2
- boneio/webui/schema/binary_sensor.schema.json +18 -18
- boneio/webui/schema/config.schema.json +524 -148
- boneio/webui/schema/cover.schema.json +2 -2
- boneio/webui/schema/ds2482.schema.json +2 -2
- boneio/webui/schema/event.schema.json +58 -58
- boneio/webui/schema/ina219.schema.json +6 -6
- boneio/webui/schema/lm75.schema.json +4 -4
- boneio/webui/schema/mcp23017.schema.json +2 -2
- boneio/webui/schema/mcp9808.schema.json +4 -4
- boneio/webui/schema/modbus_devices.schema.json +18 -6
- boneio/webui/schema/oled.schema.json +4 -4
- boneio/webui/schema/output.schema.json +4 -4
- boneio/webui/schema/output_group.schema.json +4 -4
- boneio/webui/schema/pca9685.schema.json +2 -2
- boneio/webui/schema/pcf8575.schema.json +2 -2
- boneio/webui/schema/remote_devices.schema.json +18 -18
- boneio/webui/schema/sensor.schema.json +4 -4
- boneio/webui/schema/template.schema.json +370 -0
- boneio/webui/schema/virtual_energy_sensor.schema.json +2 -2
- {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/METADATA +1 -1
- {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/RECORD +113 -98
- boneio/webui/frontend-dist/assets/index-gG0CrhGE.css +0 -1
- /boneio/webui/frontend-dist/{schem → schema}/boneio.schema.json +0 -0
- /boneio/webui/frontend-dist/{schem → schema}/dallas.schema.json +0 -0
- /boneio/webui/frontend-dist/{schem → schema}/logger.schema.json +0 -0
- /boneio/webui/frontend-dist/{schem → schema}/modbus.schema.json +0 -0
- /boneio/webui/frontend-dist/{schem → schema}/mqtt.schema.json +0 -0
- /boneio/webui/frontend-dist/{schem → schema}/web.schema.json +0 -0
- {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/WHEEL +0 -0
- {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/entry_points.txt +0 -0
- {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/licenses/LICENSE +0 -0
- {boneio-1.2.0.dev13.dist-info → boneio-1.2.0.dev15.dist-info}/top_level.txt +0 -0
boneio/components/cover/cover.py
CHANGED
|
@@ -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.
|
|
262
|
-
await self.
|
|
263
|
-
|
|
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
|
+
]
|