Hi, my first question in this board so please be gracious.
I have two 3d printer conntected with Octoprint (without MQTT) it creates me some entities and so on. Every 10% i would like to get a message via telegram with some information.
At the moment i struggle with timezone (germany is +1 atm) but it displays +0 time and i want to calculate the remaining time and notify it also in this message
This is would i have:
alias: left printer notify
description: ""
trigger:
- platform: template
value_template: >
{{ states('sensor.left_3d_printer_job_percentage') | int(default=-1) %
10 == 0 }}
condition:
- condition: time
after: "08:00:00"
before: "20:00:00"
action:
- service: notify.telegram_jan
data:
message: >-
print is now {{ states('sensor.left_3d_printer_job_percentage') }}%
needs till {{as_timestamp(states('sensor.left_3d_printer_estimated_finish_time')) | timestamp_custom("%d.%m.%y %H:%M ", 0)}} from now
this block is not processed?! start
{% set uptime = (as_timestamp(states('sensor.left_3d_printer_estimated_finish_time')) - as_timestamp(now()) |int ) %}
{% set years = uptime // 31536000 %}
{% set months = (uptime % 31536000) // 2592000 %}
{% set days = (uptime % 2592000) // 86400 %}
{% set hours = (uptime % 86400) // 3600 %}
{% set minutes = (uptime % 3600) // 60 %}
{% set seconds = (uptime % 60) %}
{{ '%dd ' % days if days else '' }} {{ '%dh:' % hours if hours else '' }}{{ '%dm:' % minutes if minutes else '' }}{{ '%ds' % seconds if seconds else '' }}
this block is not procesed ?! end
from now {{
timedelta(seconds=states('sensor.left_3d_printer_estimated_finish_time')|int(default=0))
}} oder so
mode: single
where can i start to debug?!