Переглянути джерело

Added car heater status (Gray,Green,Yellow)

pi 2 тижнів тому
батько
коміт
73d1d930c7
1 змінених файлів з 21 додано та 0 видалено
  1. 21 0
      packages/car_heater.yaml

+ 21 - 0
packages/car_heater.yaml

@@ -61,3 +61,24 @@ input_number:
     mode: slider
     icon: mdi:timer-outline
     initial: 25
+
+template:
+  - sensor:
+      - name: "Car Heater Status"
+        unique_id: car_heater_status_display
+        state: >
+          {% if is_state('switch.shelly_car_heater', 'off') %}
+            Gray
+          {% elif states('sensor.shelly_car_heater_power') | float(0) > 5 %}
+            Green
+          {% else %}
+            Yellow
+          {% endif %}
+        icon: >
+          {% if is_state('switch.shelly_car_heater', 'off') %}
+            mdi:power-off
+          {% elif states('sensor.shelly_car_heater_power') | float(0) > 5 %}
+            mdi:radiator
+          {% else %}
+            mdi:alert-circle-outline
+          {% endif %}