boneIO 1.4.0.dev8__py3-none-any.whl → 1.4.0.dev9__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/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  # flake8: noqa
2
- __version__ = "1.4.0dev8"
2
+ __version__ = "1.4.0dev9"
@@ -188,6 +188,34 @@ def slider_tile(
188
188
  }
189
189
 
190
190
 
191
+ def inline_tile(
192
+ entity: str,
193
+ features: list[dict[str, Any]] | None = None,
194
+ ) -> dict[str, Any]:
195
+ """Create a compact inline tile card using the entity's HA name.
196
+
197
+ Uses ``name: {type: entity}`` so HA displays the entity's friendly
198
+ name automatically. ``features_position`` is always ``inline``.
199
+
200
+ Args:
201
+ entity: Full HA entity ID.
202
+ features: Optional features list (e.g. ``[{type: numeric-input}]``).
203
+
204
+ Returns:
205
+ Inline tile card dict.
206
+ """
207
+ card: dict[str, Any] = {
208
+ "type": "tile",
209
+ "entity": entity,
210
+ "name": {"type": "entity"},
211
+ "vertical": False,
212
+ "features_position": "inline",
213
+ }
214
+ if features:
215
+ card["features"] = features
216
+ return card
217
+
218
+
191
219
  def entities_card(
192
220
  entities: list[str | dict[str, Any]],
193
221
  title: str = "",
@@ -551,6 +551,7 @@ from boneio.webui.dashboard_cards import (
551
551
  entity_badge,
552
552
  heading_card,
553
553
  horizontal_stack,
554
+ inline_tile,
554
555
  sensor_tile,
555
556
  slider_tile,
556
557
  tile_card,
@@ -625,38 +626,43 @@ def _generate_irrigation_dashboard_cards(ctrl: Any, serial: str) -> list[dict]:
625
626
  else:
626
627
  cards.append(horizontal_stack(pair))
627
628
 
628
- # ── 3. Czasy podlewania — inline entities card ────────────────────
629
- duration_entities: list[str] = [
630
- eid("number", f"zone_{zone.id}_duration") for zone in ctrl.zones
631
- ]
632
- cards.append(entities_card(duration_entities, title="Czasy podlewania"))
629
+ # ── 3. Czasy podlewania — tile cards with +/- buttons ──────────
630
+ cards.append(heading_card("Czasy podlewania", style="subtitle"))
631
+ for zone in ctrl.zones:
632
+ zone_duration = eid("number", f"zone_{zone.id}_duration")
633
+ cards.append(slider_tile(zone_duration, f"{zone.name} czas"))
633
634
 
634
635
  # ── 4. Ustawienia ─────────────────────────────────────────────────
635
- controls: list[str | dict] = [
636
- eid("switch", s) for s in ("auto_advance", "standby", "skip_next_run", "reverse")
637
- ]
638
- controls.append(eid("number", "multiplier"))
639
- controls.append(eid("number", "repeat"))
640
- cards.append(entities_card(controls, title="Ustawienia"))
636
+ cards.append(heading_card("Ustawienia", style="subtitle"))
637
+ for s in ("auto_advance", "standby", "skip_next_run", "reverse"):
638
+ cards.append(inline_tile(eid("switch", s)))
639
+ cards.append(inline_tile(
640
+ eid("number", "multiplier"),
641
+ features=[{"type": "numeric-input", "style": "buttons"}],
642
+ ))
643
+ cards.append(inline_tile(
644
+ eid("number", "repeat"),
645
+ features=[{"type": "numeric-input", "style": "buttons"}],
646
+ ))
647
+ # Schedule skip switches (inline, folded into Ustawienia)
648
+ for idx, _sched in enumerate(ctrl._schedule):
649
+ cards.append(inline_tile(eid("switch", f"schedule_{idx}_skip")))
641
650
 
642
651
  # ── 5. Sterowanie ─────────────────────────────────────────────────
643
- cards.append(entities_card([
644
- eid("button", "pause"),
645
- eid("button", "resume"),
646
- eid("button", "next_valve"),
647
- ], title="Sterowanie"))
652
+ cards.append(heading_card("Sterowanie", style="subtitle"))
653
+ cards.append(horizontal_stack([
654
+ tile_card(eid("button", "next_valve"), "Next valve", "mdi:skip-next"),
655
+ tile_card(eid("button", "pause"), "Pause", "mdi:pause"),
656
+ tile_card(eid("button", "resume"), "Resume", "mdi:play"),
657
+ ]))
648
658
 
649
659
  # Water source select (if multiple)
650
660
  if len(ctrl.water_sources) > 1:
651
- cards.append(entities_card([eid("select", "water_source")], title="Źródło wody"))
652
-
653
- # ── 6. Harmonogramy ───────────────────────────────────────────────
654
- for idx, sched in enumerate(ctrl._schedule):
655
- sched_skip = eid("switch", f"schedule_{idx}_skip")
656
- time_str = sched.get("time", "")
657
- days_str = sched.get("days", "daily")
658
- cards.append(entities_card(
659
- [sched_skip], title=f"Harmonogram {idx + 1}: {time_str} ({days_str})",
661
+ cards.append(heading_card("Źródło wody", style="subtitle"))
662
+ cards.append(tile_card(
663
+ eid("select", "water_source"), "Źródło wody", "mdi:water-pump",
664
+ features=[{"type": "select-options"}],
665
+ features_position="inline",
660
666
  ))
661
667
 
662
668
  # ── 7. Sensory ────────────────────────────────────────────────────
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boneio
3
- Version: 1.4.0.dev8
3
+ Version: 1.4.0.dev9
4
4
  Summary: Python App for BoneIO
5
5
  Author-email: Paweł Szafer <pszafer@gmail.com>
6
6
  License: GNU General Public License v3.0
@@ -3,7 +3,7 @@ boneio/bonecli.py,sha256=MfkiiMkoIZ98davH3L7IrBvugQbiIpAidWEabn5GZmQ,13160
3
3
  boneio/const.py,sha256=M981R2gwfjDX3lcoufWOyGlNxvGMESWgXOjVkmJfX60,7208
4
4
  boneio/exceptions.py,sha256=cBph-TsLF7FSz6p4wYeMs3pjVmVRaNQRJP82JgYYV-c,810
5
5
  boneio/runner.py,sha256=q_3050BKgnDcsT1ChFr9IZrAn2p6EyGp4DFKQy9BVno,17886
6
- boneio/version.py,sha256=wzBqnG04PYPRWxDR2HMRsisX8CzxTr1RMyjv4-ekT_I,41
6
+ boneio/version.py,sha256=vKazO0zF1I5OzjFuSDHgk3Lqa2HWK_JR8DIUaKd9Z-I,41
7
7
  boneio/boards/0.2/input.yaml,sha256=K5EcB44BZ8PxbPnH1izYwJ-ePo8gs4qZttMXhnMnfQ8,1259
8
8
  boneio/boards/0.2/output_24_16.yaml,sha256=GQGM3gUK7UobdGL-Ejt9UKdCs1HLPgZ7kziVZ1tjQlA,1462
9
9
  boneio/boards/0.2/output_32_10.yaml,sha256=169ubuzRqFLGiOr7zgB1xL1tKdQyOx2FJZvTCkxCA4U,1920
@@ -325,7 +325,7 @@ boneio/schema/temp_unit.yaml,sha256=m32VGz9RTW92Lz08l9n6RftkcVNZquOGPPr5mc3eZVc,
325
325
  boneio/schema/update_interval.yaml,sha256=RBuAFj1gGn89ydZkaUUP-f88utvth1Qtt5u6lau2iOc,186
326
326
  boneio/webui/action_validation.py,sha256=2tdshl9MpgjHIYXYDV4XHW6lGTZn-05XgicFMWRcny4,7318
327
327
  boneio/webui/app.py,sha256=yN53jS8p91hIiwKKJFLprv3nQ6gVhknchF_c9nSbCL4,33123
328
- boneio/webui/dashboard_cards.py,sha256=c1V6B2oCoXU8o-4MwgPDO_lYJewXwf0pjj9EykDlvAM,6986
328
+ boneio/webui/dashboard_cards.py,sha256=FTqPD6Dfwn9NZsBBmvEiTNbq_R6Ha-G5MOBtMbrxpWM,7735
329
329
  boneio/webui/web_server.py,sha256=EZRUqwLqwLA5kdUZeYuriBY0nCq0Ffmo5f-Dz_eSxxg,9471
330
330
  boneio/webui/websocket_manager.py,sha256=MGo_yaXEC-30EB0mvA1dnZ14YZglFZlXBq-vTgl1rlc,6430
331
331
  boneio/webui/frontend-dist/boneio-192.png,sha256=2Q-HiAx3kB1yppMriZ46fDZ94Ft_1VpDbZ9EShGUBSo,23489
@@ -390,7 +390,7 @@ boneio/webui/routes/caddy.py,sha256=zS21OctOueuza_zigWoEz9V9-1S6IN4D77AKI5U7Pd4,
390
390
  boneio/webui/routes/can.py,sha256=18RVS2pPe_bNeZDcHSmwoLqsdmizjvTf18IdphfmeuU,14660
391
391
  boneio/webui/routes/config.py,sha256=Lg70p4CA-k7DcKkSGizTi4IaNWz83O8vT4hr6i9ln9U,52450
392
392
  boneio/webui/routes/covers.py,sha256=DtT4hSomRjR2MzBrfBiT0e4T0xbwet49hlpjXGv8vuw,3719
393
- boneio/webui/routes/irrigation.py,sha256=HZYVRUim-Mk-RyQCgxZkxgltO9F-nXZopzwisDngBcY,25916
393
+ boneio/webui/routes/irrigation.py,sha256=5mG3rOdQApm33eUmuV7I1uo9D7lwtY7b8gi2wk91sfM,26157
394
394
  boneio/webui/routes/migrations.py,sha256=Xa2CUg8wvhIRgHkDqd7C9AVVXLfZSLeSA74U62SFkLU,5895
395
395
  boneio/webui/routes/modbus.py,sha256=4ZLB0Wrpdf1xLUMGbJXNE7txoHrpi4UPJ-ejrnjcxoA,28401
396
396
  boneio/webui/routes/outputs.py,sha256=5ze6qYHYGcM0L0Hsx-4TPX-SG_WkfAWWAvKjaGKxJlQ,6241
@@ -435,9 +435,9 @@ boneio/webui/schema/virtual_energy_sensor.schema.json,sha256=BN6Egh-CAnXSa80bQ6Y
435
435
  boneio/webui/schema/web.schema.json,sha256=cactLq1MVwDL5hu8bLeuq5yiz49BWVS4OtjWLmhbw2M,2592
436
436
  boneio/webui/services/__init__.py,sha256=l_L3YUPhc0ZbrWqKH1RurC7UQ4q0k-5ABGTwOSS-YFQ,282
437
437
  boneio/webui/services/logs.py,sha256=7n596oxeWNIPDyKYdMJXFpH-GCvdKb_YrqTLy6kPBWA,11423
438
- boneio-1.4.0.dev8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
439
- boneio-1.4.0.dev8.dist-info/METADATA,sha256=jJyXXtfE0Ri6ocp6qgGCH74Q-JaoPwmh2bj1Fgb3qvE,1961
440
- boneio-1.4.0.dev8.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
441
- boneio-1.4.0.dev8.dist-info/entry_points.txt,sha256=JX7gluDIkQ6MBlzzxGHMItnBjciiJ73tsXwYcazMW_U,47
442
- boneio-1.4.0.dev8.dist-info/top_level.txt,sha256=ag9S5n1_KXZfyk9tN8R0YUDYbdA--e5a2w2FOD_yMdg,7
443
- boneio-1.4.0.dev8.dist-info/RECORD,,
438
+ boneio-1.4.0.dev9.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
439
+ boneio-1.4.0.dev9.dist-info/METADATA,sha256=YE_ZFJ1zHObOVSzymBkV36OOzmhBoNI-KBIXC-lArkw,1961
440
+ boneio-1.4.0.dev9.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
441
+ boneio-1.4.0.dev9.dist-info/entry_points.txt,sha256=JX7gluDIkQ6MBlzzxGHMItnBjciiJ73tsXwYcazMW_U,47
442
+ boneio-1.4.0.dev9.dist-info/top_level.txt,sha256=ag9S5n1_KXZfyk9tN8R0YUDYbdA--e5a2w2FOD_yMdg,7
443
+ boneio-1.4.0.dev9.dist-info/RECORD,,