Hi!
I have a Vallox ventilation system integration in my HA. The integration provides me a date entity where I can type a date of changing ventilation filter and it also provides a sensor entity with remaining time for filter (its just a date):
I want to receive a notify when will come a date of changing filter.
I found some information in this thread:
And created an input_datetime helper to pass data from Vallox sensor to helper. My code in template.yaml looks like this, but however it doesnt work:
- trigger:
- platform: time
id: set helper
at: "00:00:00"
- platform: time
id: notify
at: input_datetime.date_vallox
condition: []
action:
- variables:
notification_time: >
{% set x = states('sensor.vallox_remaining_time_for_filter') %}
{{ now().replace(day=x[:2]|int, month=x[3:5]|int, hour=7, minute=0) }}
- choose:
- conditions:
- condition: trigger
id: set helper
- condition: time
after: '00:00:00'
sequence:
- service: input_datetime.set_datetime
target:
entity_id: input_datetime.date_vallox
data:
datetime: "{{ notification_time }}"
- conditions:
- condition: trigger
id: notify
sequence:
- service: notify.neptun_all_devices
data:
title: Filter changing
message: Its time to change ventilation filter!
- service: notify.persistent_notification
data:
title: Filter changing
message: Its time to change ventilation filter!
default: []
So I dont fully understand this code and possibly typed something wrong.
Service for notifications (neptun_all_devices) work perfectly fine, I checked this.
1 post - 1 participant