Kabala
(Cata)
August 11, 2021, 4:59am
1
Hi everyone,
how can I control or link the value (date:) with the input datetime?
Thank you.
alias: Wasserfilter
trigger:
- platform: time
at: '00:00:01'
- platform: homeassistant
event: start
action:
- service: python_script.date_countdown
data:
name: Wasserfilter
friendly_name: Wasserfilter
type: erinnerung
date: 30/08/2021
icon: mdi:cup-water
append_year: true
mode: single
koying
(Chris B)
August 11, 2021, 6:57am
2
date: "{{ as_timestamp(states('input_datetime.yourdatetime'))|timestamp_custom('%d/%m/%Y') }}"
Kabala
(Cata)
August 12, 2021, 3:41pm
3
I thank,
worked great
I have still one question.
How can I change the input_datetime format?
I live in Deutschlad, we have d / m / Y and not Y / m / d.
Is there a way to have it displayed correctly?
Thanks again
123
(Taras)
August 12, 2021, 4:50pm
4
I believe the appearance of the control in the UI cannot (currently) be changed.
As an experiment, I changed my user account setting from English to Deutsch and the UI continued to display the date of the input_datetime in YYYY-MM-DD format.
Kabala
(Cata)
August 12, 2021, 6:11pm
5
Ahh ok, I almost thought to myself.
Is that right?
I would like to set the time via an input number.
service: rainbird.start_irrigation
data:
entity_id: switch.hecke
duration: >-
{{
as_timestamp(states('input_number.iu_zone_9_run_time'))|timestamp_custom('%d/%m/%Y')
}}
#############################################################################
# Example configuration.yaml automation entry RAINBIRD f
automation:
- alias: "Turn irrigation on"
trigger:
- platform: time
at: "5:30:00"
action:
- service: rainbird.start_irrigation
data:
entity_id: switch.sprinkler_1
duration: 5
123
(Taras)
August 12, 2021, 6:23pm
6
I think duration
uses an integer value (representing minutes).
service: rainbird.start_irrigation
data:
entity_id: switch.hecke
duration: "{{ states('input_number.iu_zone_9_run_time') | int }}"