55 lines
1.0 KiB
YAML
55 lines
1.0 KiB
YAML
input_boolean:
|
|
night_mode:
|
|
name: Night Mode
|
|
icon: mdi:lightbulb-night
|
|
goodnight:
|
|
name: Goodnight
|
|
icon: mdi:sleep
|
|
|
|
sensor:
|
|
- platform: time_date
|
|
display_options:
|
|
- 'time'
|
|
- 'date'
|
|
- 'date_time'
|
|
- 'time_date'
|
|
- 'time_utc'
|
|
|
|
intent_script:
|
|
SetTimer:
|
|
action:
|
|
service: timer.start
|
|
target:
|
|
entity_id: "{{ room }}"
|
|
data:
|
|
duration: >
|
|
{% if unit == 'hours' %}
|
|
{{ (time * 60) * 60 }}
|
|
{% elif unit == 'minutes' %}
|
|
{{ time * 60}}
|
|
{% elif unit == 'seconds' %}
|
|
{{ time }}
|
|
{% endif %}
|
|
speech:
|
|
text: "Okay"
|
|
CancelTimer:
|
|
action:
|
|
service: timer.cancel
|
|
target:
|
|
entity_id: "{{ room }}"
|
|
speech:
|
|
text: "Okay"
|
|
PauseTimer:
|
|
action:
|
|
service: timer.pause
|
|
target:
|
|
entity_id: "{{ room }}"
|
|
speech:
|
|
text: "Okay"
|
|
ResumeTimer:
|
|
action:
|
|
service: timer.start
|
|
target:
|
|
entity_id: "{{ room }}"
|
|
speech:
|
|
text: "Okay" |