EightEFI

Untitled

Oct 13th, 2024
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.24 KB | Source Code | 0 0
  1. blueprint:
  2.   name: Sunrise Light Ramp Up and Turn On
  3.   description: "Gradually increases the brightness of a light at sunrise."
  4.   domain: automation
  5.   input:
  6.     target_light:
  7.       name: Target Light
  8.       description: The light entity to gradually brighten at sunrise.
  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.     sunrise_offset:
  23.       name: Sunrise Offset (optional)
  24.       description: Time offset for sunrise (positive or negative).
  25.       default: "00:00:00"
  26.       selector:
  27.         time:
  28. trigger:
  29.   - platform: sun
  30.     event: sunrise
  31.     offset: !input sunrise_offset
  32.  
  33. condition: []
  34.  
  35. action:
  36.   - service: light.turn_on
  37.     target:
  38.       entity_id: !input target_light
  39.     data:
  40.       brightness: 1  # Start at the lowest brightness level
  41.   - service: light.turn_on
  42.     target:
  43.       entity_id: !input target_light
  44.     data:
  45.       brightness_pct: 100  # Full brightness
  46.       transition: !input ramp_duration
  47.  
  48. mode: single
  49.  
Advertisement
Add Comment
Please, Sign In to add comment