EightEFI

Untitled

Oct 13th, 2024
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.23 KB | Source Code | 0 0
  1. blueprint:
  2.   name: Custom Trigger Light Ramp Up and Turn On
  3.   description: "Gradually increases the brightness of a light when a trigger occurs, such as a switch, button, or time."
  4.   domain: automation
  5.   input:
  6.     target_light:
  7.       name: Target Light
  8.       description: The light entity to gradually brighten.
  9.       selector:
  10.         entity:
  11.           domain: light
  12.     ramp_duration:
  13.       name: Ramp Up Duration (seconds)
  14.       description: Duration of the ramp-up process to full brightness.
  15.       default: 30
  16.       selector:
  17.         number:
  18.           min: 1
  19.           max: 300
  20.           unit_of_measurement: seconds
  21.           mode: slider
  22.     trigger_event:
  23.       name: Trigger Event
  24.       description: Choose the trigger to start the light ramp-up (e.g., switch, button, or time).
  25.       selector:
  26.         trigger: {}
  27.  
  28. trigger: !input trigger_event
  29.  
  30. condition: []
  31.  
  32. action:
  33.   - service: light.turn_on
  34.     target:
  35.       entity_id: !input target_light
  36.     data:
  37.       brightness: 1  # Start at the lowest brightness level
  38.   - service: light.turn_on
  39.     target:
  40.       entity_id: !input target_light
  41.     data:
  42.       brightness_pct: 100  # Full brightness
  43.       transition: !input ramp_duration
  44.  
  45. mode: single
  46.  
Advertisement
Add Comment
Please, Sign In to add comment