From b4bac1bd1a141fcafcc0ac660711867611087f1e Mon Sep 17 00:00:00 2001 From: Benjamin Krause Date: Fri, 8 Mar 2024 10:53:16 +0100 Subject: [PATCH] Improve example folder structure and add fan speed calculation example --- lovelace/{ => lovelace}/server_kaya.yaml | 0 lovelace/{ => lovelace}/templates/network_share.yaml | 0 lovelace/{ => lovelace}/templates/simple_bar.yaml | 0 lovelace/{ => lovelace}/templates/unraid_disk.yaml | 0 lovelace/packages/server_kaya.yaml | 5 +++++ 5 files changed, 5 insertions(+) rename lovelace/{ => lovelace}/server_kaya.yaml (100%) rename lovelace/{ => lovelace}/templates/network_share.yaml (100%) rename lovelace/{ => lovelace}/templates/simple_bar.yaml (100%) rename lovelace/{ => lovelace}/templates/unraid_disk.yaml (100%) create mode 100644 lovelace/packages/server_kaya.yaml diff --git a/lovelace/server_kaya.yaml b/lovelace/lovelace/server_kaya.yaml similarity index 100% rename from lovelace/server_kaya.yaml rename to lovelace/lovelace/server_kaya.yaml diff --git a/lovelace/templates/network_share.yaml b/lovelace/lovelace/templates/network_share.yaml similarity index 100% rename from lovelace/templates/network_share.yaml rename to lovelace/lovelace/templates/network_share.yaml diff --git a/lovelace/templates/simple_bar.yaml b/lovelace/lovelace/templates/simple_bar.yaml similarity index 100% rename from lovelace/templates/simple_bar.yaml rename to lovelace/lovelace/templates/simple_bar.yaml diff --git a/lovelace/templates/unraid_disk.yaml b/lovelace/lovelace/templates/unraid_disk.yaml similarity index 100% rename from lovelace/templates/unraid_disk.yaml rename to lovelace/lovelace/templates/unraid_disk.yaml diff --git a/lovelace/packages/server_kaya.yaml b/lovelace/packages/server_kaya.yaml new file mode 100644 index 0000000..6190c85 --- /dev/null +++ b/lovelace/packages/server_kaya.yaml @@ -0,0 +1,5 @@ +template: + - sensor: + - name: "Kaya Fan Speed" + unit_of_measurement: "%" + state: "{{ ([0, (100 * int(states('sensor.kaya_fan_1_speed')) / 2060) | round(0), 100]|sort)[1] }}"