From 8cd3a8cd7aa92c4d987f8ce094bd57dfe500bec3 Mon Sep 17 00:00:00 2001 From: Aerex Date: Mon, 30 Dec 2019 23:14:23 -0500 Subject: [PATCH] feat: Added create, edit, list and track templates for battery --- templates/battery/create.yml | 4 ++++ templates/battery/edit.yml | 10 ++++++++++ templates/battery/list.yml | 12 ++++++++++++ templates/battery/track.yml | 1 + 4 files changed, 27 insertions(+) create mode 100644 templates/battery/create.yml create mode 100644 templates/battery/edit.yml create mode 100644 templates/battery/list.yml create mode 100644 templates/battery/track.yml diff --git a/templates/battery/create.yml b/templates/battery/create.yml new file mode 100644 index 0000000..f1d2785 --- /dev/null +++ b/templates/battery/create.yml @@ -0,0 +1,4 @@ +name: +description: |- +used_in: +charge_interval_days: diff --git a/templates/battery/edit.yml b/templates/battery/edit.yml new file mode 100644 index 0000000..048073e --- /dev/null +++ b/templates/battery/edit.yml @@ -0,0 +1,10 @@ +{%- for battery in grocy.fields.batteries %} +name: {{ battery.name }} +description: >- + {{ battery.description }} +used_in: {{ battery.used_in }} +charge_interval_days: {{ battery.charge_interval_days }} +{% if loop.nextitem %} +--- +{%endif%}{%endfor%} + diff --git a/templates/battery/list.yml b/templates/battery/list.yml new file mode 100644 index 0000000..92fdae4 --- /dev/null +++ b/templates/battery/list.yml @@ -0,0 +1,12 @@ +{%- for battery in grocy.fields.batteries %} +id: {{ battery.id }} +name: {{ battery.name }} +description: {{ battery.description }} +used_in: {{ battery.used_in }} +charge_interval_days: {{ battery.charge_interval_days }} +last_charged: {{ battery.last_charged }} +charge_cycles_count: {{ battery.charge_cycles_count }} +next_estimated_charge_time: {{ battery.next_estimated_charge_time }} +{%- if loop.nextitem %} +--- +{%endif%}{%endfor%} diff --git a/templates/battery/track.yml b/templates/battery/track.yml new file mode 100644 index 0000000..58dbdfa --- /dev/null +++ b/templates/battery/track.yml @@ -0,0 +1 @@ +tracked_time: