boneIO 1.2.0.dev9__py3-none-any.whl → 1.2.0.dev10__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/core/manager/update.py +6 -3
- boneio/version.py +1 -1
- boneio/webui/app.py +19 -2
- boneio/webui/frontend-dist/schem/binary_sensor.schema.json +16 -16
- boneio/webui/frontend-dist/schem/boneio.schema.json +2 -2
- boneio/webui/frontend-dist/schem/config.schema.json +134 -134
- boneio/webui/frontend-dist/schem/event.schema.json +56 -56
- boneio/webui/frontend-dist/schem/ina219.schema.json +2 -2
- boneio/webui/frontend-dist/schem/lm75.schema.json +2 -2
- boneio/webui/frontend-dist/schem/mcp23017.schema.json +2 -2
- boneio/webui/frontend-dist/schem/mcp9808.schema.json +2 -2
- boneio/webui/frontend-dist/schem/modbus.schema.json +6 -6
- boneio/webui/frontend-dist/schem/modbus_devices.schema.json +2 -2
- boneio/webui/frontend-dist/schem/mqtt.schema.json +2 -2
- boneio/webui/frontend-dist/schem/output.schema.json +4 -4
- boneio/webui/frontend-dist/schem/pca9685.schema.json +2 -2
- boneio/webui/frontend-dist/schem/pcf8575.schema.json +2 -2
- boneio/webui/frontend-dist/schem/remote_devices.schema.json +22 -22
- boneio/webui/frontend-dist/schem/web.schema.json +12 -12
- boneio/webui/schema/binary_sensor.schema.json +16 -16
- boneio/webui/schema/boneio.schema.json +2 -2
- boneio/webui/schema/config.schema.json +134 -134
- boneio/webui/schema/event.schema.json +56 -56
- boneio/webui/schema/ina219.schema.json +2 -2
- boneio/webui/schema/lm75.schema.json +2 -2
- boneio/webui/schema/mcp23017.schema.json +2 -2
- boneio/webui/schema/mcp9808.schema.json +2 -2
- boneio/webui/schema/modbus.schema.json +6 -6
- boneio/webui/schema/modbus_devices.schema.json +2 -2
- boneio/webui/schema/mqtt.schema.json +2 -2
- boneio/webui/schema/output.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 +22 -22
- boneio/webui/schema/web.schema.json +12 -12
- {boneio-1.2.0.dev9.dist-info → boneio-1.2.0.dev10.dist-info}/METADATA +1 -1
- {boneio-1.2.0.dev9.dist-info → boneio-1.2.0.dev10.dist-info}/RECORD +41 -41
- {boneio-1.2.0.dev9.dist-info → boneio-1.2.0.dev10.dist-info}/WHEEL +0 -0
- {boneio-1.2.0.dev9.dist-info → boneio-1.2.0.dev10.dist-info}/entry_points.txt +0 -0
- {boneio-1.2.0.dev9.dist-info → boneio-1.2.0.dev10.dist-info}/licenses/LICENSE +0 -0
- {boneio-1.2.0.dev9.dist-info → boneio-1.2.0.dev10.dist-info}/top_level.txt +0 -0
boneio/core/manager/update.py
CHANGED
|
@@ -585,8 +585,10 @@ class UpdateManager(AsyncUpdater):
|
|
|
585
585
|
target_version: Version being installed (None if not updating)
|
|
586
586
|
progress: Update progress percentage (0 = not updating, 1-100 = in progress)
|
|
587
587
|
"""
|
|
588
|
-
# HA
|
|
589
|
-
|
|
588
|
+
# HA update entity progress:
|
|
589
|
+
# - in_progress: boolean (true = updating, false = idle)
|
|
590
|
+
# - update_percentage: float 0-100 (shows progress bar in HA UI)
|
|
591
|
+
is_updating = progress > 0
|
|
590
592
|
|
|
591
593
|
state_payload = {
|
|
592
594
|
"installed_version": current_version,
|
|
@@ -595,7 +597,8 @@ class UpdateManager(AsyncUpdater):
|
|
|
595
597
|
"release_url": self._last_check_result.get("release_url", "") if self._last_check_result else "",
|
|
596
598
|
"release_summary": self._last_check_result.get("release_notes", "") if self._last_check_result else "",
|
|
597
599
|
"entity_picture": "http://boneio.eu/logo_fb_circle.png",
|
|
598
|
-
"in_progress":
|
|
600
|
+
"in_progress": is_updating,
|
|
601
|
+
"update_percentage": float(progress) if is_updating else None,
|
|
599
602
|
}
|
|
600
603
|
|
|
601
604
|
topic_prefix = self._manager._config_helper.topic_prefix
|
boneio/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# flake8: noqa
|
|
2
|
-
__version__ = "1.2.
|
|
2
|
+
__version__ = "1.2.0dev10"
|
boneio/webui/app.py
CHANGED
|
@@ -696,6 +696,7 @@ if FRONTEND_DIR.exists() and (FRONTEND_DIR / "index.html").exists():
|
|
|
696
696
|
return JSONResponse(
|
|
697
697
|
content=manifest,
|
|
698
698
|
media_type="application/manifest+json",
|
|
699
|
+
headers={"Cache-Control": "no-store, no-cache, must-revalidate"},
|
|
699
700
|
)
|
|
700
701
|
|
|
701
702
|
@app.get("/sw.js")
|
|
@@ -704,11 +705,17 @@ if FRONTEND_DIR.exists() and (FRONTEND_DIR / "index.html").exists():
|
|
|
704
705
|
return FileResponse(
|
|
705
706
|
f"{FRONTEND_DIR}/sw.js",
|
|
706
707
|
media_type="application/javascript",
|
|
708
|
+
headers={"Cache-Control": "no-store, no-cache, must-revalidate"},
|
|
707
709
|
)
|
|
708
710
|
|
|
709
711
|
@app.get("/{filename:path}")
|
|
710
712
|
async def serve_react_app(filename: str):
|
|
711
|
-
"""Serve static files from frontend-dist, fallback to index.html for SPA routing.
|
|
713
|
+
"""Serve static files from frontend-dist, fallback to index.html for SPA routing.
|
|
714
|
+
|
|
715
|
+
Hashed assets (in /assets/) are immutable and cached long-term.
|
|
716
|
+
index.html (SPA fallback) is never cached to prevent stale versions
|
|
717
|
+
being served through Cloudflare Tunnel or other caching proxies.
|
|
718
|
+
"""
|
|
712
719
|
file_path = (FRONTEND_DIR / filename).resolve()
|
|
713
720
|
if (
|
|
714
721
|
filename
|
|
@@ -716,8 +723,18 @@ if FRONTEND_DIR.exists() and (FRONTEND_DIR / "index.html").exists():
|
|
|
716
723
|
and file_path.exists()
|
|
717
724
|
and file_path.is_file()
|
|
718
725
|
):
|
|
726
|
+
# Hashed assets can be cached forever
|
|
727
|
+
if filename.startswith("assets/"):
|
|
728
|
+
return FileResponse(
|
|
729
|
+
str(file_path),
|
|
730
|
+
headers={"Cache-Control": "public, max-age=31536000, immutable"},
|
|
731
|
+
)
|
|
719
732
|
return FileResponse(str(file_path))
|
|
720
|
-
|
|
733
|
+
# SPA fallback — never cache index.html
|
|
734
|
+
return FileResponse(
|
|
735
|
+
f"{FRONTEND_DIR}/index.html",
|
|
736
|
+
headers={"Cache-Control": "no-store, no-cache, must-revalidate"},
|
|
737
|
+
)
|
|
721
738
|
else:
|
|
722
739
|
_LOGGER.warning(
|
|
723
740
|
f"Frontend not found at {FRONTEND_DIR}. "
|
|
@@ -425,16 +425,16 @@
|
|
|
425
425
|
"properties": {
|
|
426
426
|
"position": {
|
|
427
427
|
"type": [
|
|
428
|
-
"
|
|
429
|
-
"
|
|
428
|
+
"integer",
|
|
429
|
+
"string"
|
|
430
430
|
],
|
|
431
431
|
"description": "Position to set cover to",
|
|
432
432
|
"title": "Position"
|
|
433
433
|
},
|
|
434
434
|
"tilt_position": {
|
|
435
435
|
"type": [
|
|
436
|
-
"
|
|
437
|
-
"
|
|
436
|
+
"integer",
|
|
437
|
+
"string"
|
|
438
438
|
],
|
|
439
439
|
"description": "Tilt position to set cover to. 0 means closed, 100 means opened.",
|
|
440
440
|
"title": "Tilt position"
|
|
@@ -489,16 +489,16 @@
|
|
|
489
489
|
},
|
|
490
490
|
"brightness": {
|
|
491
491
|
"type": [
|
|
492
|
-
"
|
|
493
|
-
"
|
|
492
|
+
"integer",
|
|
493
|
+
"string"
|
|
494
494
|
],
|
|
495
495
|
"description": "Brightness (0-255)",
|
|
496
496
|
"title": "Brightness"
|
|
497
497
|
},
|
|
498
498
|
"color_temp": {
|
|
499
499
|
"type": [
|
|
500
|
-
"
|
|
501
|
-
"
|
|
500
|
+
"integer",
|
|
501
|
+
"string"
|
|
502
502
|
],
|
|
503
503
|
"description": "Color Temperature (mireds)",
|
|
504
504
|
"title": "Color temp"
|
|
@@ -655,16 +655,16 @@
|
|
|
655
655
|
"properties": {
|
|
656
656
|
"position": {
|
|
657
657
|
"type": [
|
|
658
|
-
"
|
|
659
|
-
"
|
|
658
|
+
"integer",
|
|
659
|
+
"string"
|
|
660
660
|
],
|
|
661
661
|
"description": "Position to set cover to",
|
|
662
662
|
"title": "Position"
|
|
663
663
|
},
|
|
664
664
|
"tilt_position": {
|
|
665
665
|
"type": [
|
|
666
|
-
"
|
|
667
|
-
"
|
|
666
|
+
"integer",
|
|
667
|
+
"string"
|
|
668
668
|
],
|
|
669
669
|
"description": "Tilt position to set cover to. 0 means closed, 100 means opened.",
|
|
670
670
|
"title": "Tilt position"
|
|
@@ -719,16 +719,16 @@
|
|
|
719
719
|
},
|
|
720
720
|
"brightness": {
|
|
721
721
|
"type": [
|
|
722
|
-
"
|
|
723
|
-
"
|
|
722
|
+
"integer",
|
|
723
|
+
"string"
|
|
724
724
|
],
|
|
725
725
|
"description": "Brightness (0-255)",
|
|
726
726
|
"title": "Brightness"
|
|
727
727
|
},
|
|
728
728
|
"color_temp": {
|
|
729
729
|
"type": [
|
|
730
|
-
"
|
|
731
|
-
"
|
|
730
|
+
"integer",
|
|
731
|
+
"string"
|
|
732
732
|
],
|
|
733
733
|
"description": "Color Temperature (mireds)",
|
|
734
734
|
"title": "Color temp"
|