Closed bendikrb closed 4 months ago
Kudos, SonarCloud Quality Gate passed!
Kudos, no new issues were introduced!
0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication
Once I learned that timers had fixed durations that were not user UI configurable, I abandoned trying to simply start a timer and had workarounds in place to start timers specifying varying durations using input_numbers
that users could change in the UI. This new service means changing existing + additional automation(s) to set the duration, or just leave well enough alone! Having alternatives is great and I appreciate the effort!
if:
- condition: state
entity_id: input_boolean.sleep_mode
state: "on"
then:
- service: timer.start
data:
duration: "60"
target:
entity_id: timer.bathroom_light
alias: Start Bathroom Timer 60 seconds
else:
- service: timer.start
data:
duration: "{{states('input_number.bathroom_delay_off')}}"
target:
entity_id: timer.bathroom_light
alias: Start Bathroom Timer
alias: Start variable timer
Description
Introduced a service to
timer
which allows the user to set a timer`s duration.Motivation and Context
Setting duration in
timer.start
was deprecated in https://github.com/home-assistant/core/pull/93471, hence making it impossible to have timers that is user configurable (i.e. for light auto-off timers, with a configurable delay time).How has this been tested?
Screenshots (if appropriate):
Types of changes
Checklist