FALLINGAWAY38

livingroon light

Aug 16th, 2025
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.45 KB | None | 0 0
  1. esphome:
  2.   name: livingroom-window
  3.   friendly_name: Livingroom Window
  4.  
  5. esp32:
  6.   board: esp32-c3-devkitm-1
  7.   framework:
  8.     type: esp-idf
  9.  
  10. # Enable logging
  11. logger:
  12. # Enable Home Assistant API
  13. api:
  14.   encryption:
  15.     key: "FRGhDf6VzOVCFhbTA18dgY5n+bI2s8r+A5P32R5fyQQ="
  16.  
  17. ota:
  18.   - platform: esphome
  19.     password: "4f33a31bf0a0ae5700d38c02e7f50336"
  20.  
  21. wifi:
  22. #  ssid: !secret wifi_ssid
  23. #  password: !secret wifi_password
  24.  
  25. improv_serial:
  26.  
  27.  
  28.  
  29. captive_portal:
  30. web_server:
  31.   port: 80
  32.   version: 3
  33. #  auth:  
  34. #    username:
  35. #    password:
  36.  
  37. text_sensor:
  38.   - platform: sun
  39.     name: Sun Next Sunrise
  40.     type: sunrise
  41.   - platform: sun
  42.     name: Sun Next Sunset
  43.     type: sunset
  44.  
  45.   - platform: wifi_info
  46.     ip_address:
  47.       name: Cabinets IP Address
  48.     ssid:
  49.       name: Cabinets Connected SSID
  50.  
  51. time:
  52.   - platform: sntp
  53.     id: sntp_time
  54.     timezone: America/Vancouver
  55.     servers:
  56.     - 0.pool.ntp.org
  57.      - 1.pool.ntp.org
  58.      - 2.pool.ntp.org
  59.  
  60. sensor:
  61.   - platform: uptime
  62.     type: timestamp
  63.     time_id: sntp_time    
  64.     name: "Livingroom Uptime Sensor"
  65.  
  66.   - platform: wifi_signal
  67.     id: wifi_signal_livingroom  
  68.     update_interval: 10s
  69.     internal: True
  70.  
  71.   - platform: copy
  72.     source_id: wifi_signal_livingroom
  73.     name: "Livingroom Wifi Signal"
  74.     filters:
  75.       - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
  76.     unit_of_measurement: "Signal %"
  77.     entity_category: "diagnostic"
  78.     id: livingroom_wifi_signal
  79.    
  80.  
  81. sun:
  82.   id: sunrise_sunset
  83.   latitude: 49.2827
  84.   longitude: 123.120
  85.  
  86.   on_sunrise:    
  87.     then:
  88.        - light.dim_relative:
  89.            id: livingroom_light
  90.            relative_brightness: 5%
  91.            transition_length: 10.0s
  92.    ## Transition length is the amount of time it takes to go from "relative_brightness 5%" to "max brightness 90%" ##
  93.            brightness_limits:
  94.              max_brightness: 90%
  95.  
  96.   on_sunset:
  97.     then:
  98.       - light.dim_relative:
  99.            id: livingroom_light
  100.            relative_brightness: 5%
  101.            transition_length: 10.0s
  102.            brightness_limits:
  103.              min_brightness: 10%
  104.       - delay: 2s
  105.  
  106.       - light.turn_off: livingroom_light
  107.      
  108.        
  109.          
  110. output:
  111.   - platform: ledc
  112.     id: pwm_output1
  113.     pin: 1
  114. #    min_power:
  115. #    max_power:
  116. #    zero_means_zero: True
  117.  
  118. light:
  119.   - platform: monochromatic
  120.     name: "Livingroom Light"
  121.     id: livingroom_light
  122.     output: pwm_output1
Advertisement
Add Comment
Please, Sign In to add comment