yurghie

Untitled

Nov 4th, 2025
1,002
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.14 KB | None | 0 0
  1. sensor:
  2.   - platform: time_date
  3.     display_options:
  4.      - time
  5.       - date
  6.       - date_time
  7.       - date_time_utc
  8.       - date_time_iso
  9.       - time_date
  10.       - time_utc
  11.  
  12. automation:
  13.   - alias: Doorbell Motion – Turn On Light After Dark (Only if Off)
  14.     description: Turn on porch light to 100% brightness when doorbell detects motion, but only after dark and only if the light is off.
  15.     trigger:
  16.       - platform: state
  17.         entity_id: switch.front_doorbell_motion_detection
  18.         to: "on"
  19.     condition:
  20.       - condition: and
  21.         conditions:
  22.           - condition: or
  23.             conditions:
  24.               - condition: sun
  25.                 after: sunset
  26.               - condition: sun
  27.                 before: sunrise
  28.           - condition: state
  29.             entity_id: light.front_porch_light
  30.             state: "off"
  31.     action:
  32.       - service: light.turn_on
  33.         target:
  34.           entity_id: light.front_porch_light
  35.         data:
  36.           brightness_pct: 100
  37.       - delay: "00:05:00"
  38.       - service: light.turn_off
  39.         target:
  40.           entity_id: light.front_porch_light
  41.     mode: restart
  42.  
Advertisement
Comments
  • wmgubuw
    2 days
    # text 0.12 KB | 0 0
    1. ⭐Make 3000$ with Swapzone Exchange Method
    2.  
    3. >>> docs.google.com/document/d/1IB4SkLZdU8hex0Kn-GyFHXSSV6kLUXhhOhxPwmEuuc4
Add Comment
Please, Sign In to add comment