PoisonWaffle

Garage Door Indicator

Apr 23rd, 2024 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. esphome:
  2. name: garage-door-indicator
  3.  
  4. esp32:
  5. board: esp32dev
  6. framework:
  7. type: arduino
  8.  
  9. # Enable logging
  10. logger:
  11.  
  12. # Enable Home Assistant API
  13. api:
  14.  
  15. ota:
  16. password: ""
  17.  
  18. wifi:
  19. ssid: !secret wifi_ssid
  20. password: !secret wifi_password
  21.  
  22. # Enable fallback hotspot (captive portal) in case wifi connection fails
  23. ap:
  24. ssid: "garage-door-indicator"
  25. password: "!secret wifi_password"
  26.  
  27. captive_portal:
  28.  
  29. sensor:
  30. - platform: homeassistant
  31. id: garage_temp
  32. entity_id: sensor.garage_temp
  33. - platform: homeassistant
  34. id: outside_temp
  35. entity_id: sensor.outside_temp_hum_temperature
  36.  
  37. font:
  38. - file: "arial.ttf"
  39. id: arial_lg
  40. size: 54
  41. - file: "arial.ttf"
  42. id: arial_med
  43. size: 40
  44. - file: "arial.ttf"
  45. id: arial_sm
  46. size: 14
  47.  
  48. i2c:
  49. sda: GPIO4
  50. scl: GPIO15
  51. frequency: 800kHz
  52.  
  53. display:
  54. - platform: ssd1306_i2c
  55. model: "SSD1306 128x64"
  56. reset_pin: GPIO16
  57. address: 0x3C
  58. lambda: |-
  59. it.printf(0, 0, id(arial_med), "%.0f", id(garage_temp).state);
  60. it.printf(it.get_width(), 0, id(arial_med), TextAlign::TOP_RIGHT, "%3.0f", id(outside_temp).state);
  61. it.print(0, 47, id(arial_sm), "Garage °F");
  62. it.print(78, 47, id(arial_sm), "Outside");
  63.  
  64. light:
  65. - platform: neopixelbus
  66. type: GRBW
  67. variant: SK6812
  68. pin: GPIO17
  69. num_leds: 27
  70. name: "Garage Door Indicator"
  71. effects:
  72. - addressable_color_wipe:
  73. name: Opening
  74. colors:
  75. - red: 100%
  76. green: 0%
  77. blue: 0%
  78. white: 0%
  79. num_leds: 27
  80. - red: 0%
  81. green: 100%
  82. blue: 0%
  83. white: 0%
  84. num_leds: 27
  85. add_led_interval: 300ms
  86. reverse: false
  87. - addressable_color_wipe:
  88. name: Closing
  89. colors:
  90. - red: 0%
  91. green: 100%
  92. blue: 0%
  93. white: 0%
  94. num_leds: 27
  95. - red: 100%
  96. green: 0%
  97. blue: 0%
  98. white: 0%
  99. num_leds: 27
  100. add_led_interval: 300ms
  101. reverse: true
  102.  
  103. binary_sensor:
  104. - platform: gpio
  105. pin:
  106. number: GPIO13
  107. mode:
  108. input: true
  109. pullup: true
  110. name: "Garage Light Switch"
  111. filters:
  112. - delayed_off: 7ms
  113. - delayed_on: 7ms
Advertisement
Add Comment
Please, Sign In to add comment