# ============================================================================== # Volcano Hybrid — synthesized runtime sensor (template fallback) # ------------------------------------------------------------------------------ # Creates sensor.volcano_runtime — minutes since the climate entity last # entered the `heat` state. Use this when your SavageNL integration version # doesn't expose a current_on_time / runtime sensor directly (some versions # only ship sensor.volcano_hybrid_auto_off_time, which is a countdown # toward shutoff, not an elapsed-time counter). # # Paste into configuration.yaml under the top-level `template:` key. # (If you already have a `template:` block, append the trigger entry as a # new list item rather than starting a second top-level key.) # # Updates every minute while the device is heating; resets to 0 when the # climate entity leaves `heat`. Verify after restart at: # Developer Tools → States → filter "volcano_runtime" # # Caveat: any momentary BLE dropout that flips climate.volcano_hybrid to # `unavailable` and back will restart the runtime counter at 0. If your # install drops a lot, see the "smoothing" note in the post body. # ============================================================================== template: - trigger: - platform: time_pattern minutes: "/1" # update every minute while heating sensor: - name: "Volcano Runtime" unique_id: volcano_runtime_synthesized unit_of_measurement: min device_class: duration state: > {% if is_state('climate.volcano_hybrid', 'heat') %} {{ ((as_timestamp(now()) - as_timestamp(states.climate.volcano_hybrid.last_changed)) / 60) | int }} {% else %} 0 {% endif %} availability: > {{ states('climate.volcano_hybrid') not in ['unknown', 'unavailable'] }}