Need help for complicated template

Hello, I have 3d printer with octoprint and I see when the printing stared and I see what percentage were made, and I see time to finish and how long ago printing started,

I want to add one more template sensor , I want to know what time the printing will finish…
so I need a code know what time now and how long time to finish and Calculate it and will tell me what time the printing will finish

I dont know if its possible to do it but I hope so :slight_smile:

Thank you!

Isn’t that what the “in 17 hours” is telling you? I’m reading that just in context since I don’t read…Hebrew (hopefully?, no offense meant if not)…so I’m not sure what the text is saying.

nevermind, I succeeded . this is the template I needed

- platform: template
  sensors:
    octoprint_time_remaining_format:
      friendly_name: 'Artilerry Time Remaining'
      value_template: "{{ states('sensor.octoprint_time_remaining') | int | timestamp_custom('%H:%M:%S', 0) }}"
      icon_template: mdi:clock-end
    octoprint_clock_finish_time:
      friendly_name: 'Finish Time'
      value_template: >
        {% if not is_state('sensor.octoprint_current_state', 'Operational') %}
          {{ as_timestamp(states('sensor.octoprint_estimated_finish_time')) | timestamp_custom('%H:%M')}}
        {% else %}
          N/A
        {% endif %}	  
      icon_template: mdi:clock-check-outline