bl-relay6-01.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. substitutions:
  2. devicename: bl-relay6-01
  3. low_devicename: bl_relay6_01
  4. friendly_devicename: Waveshare Relay Board Garaz Podlewanie
  5. area: "Garage"
  6. esphome:
  7. name: ${devicename}
  8. friendly_name: ${friendly_devicename}
  9. area: ${area}
  10. # name_add_mac_suffix: true
  11. # project:
  12. # name: waveshare.esp32-s3-relay-6ch
  13. # version: 1.0.0
  14. esp32:
  15. board: esp32-s3-devkitc-1
  16. framework:
  17. type: arduino
  18. # Enable Home Assistant API
  19. api:
  20. services:
  21. - service: play_rtttl
  22. variables:
  23. song_str: string
  24. then:
  25. - rtttl.play:
  26. rtttl: !lambda "return song_str;"
  27. packages:
  28. # Enable Home Assistant API
  29. esphome: !include common/keys.yaml
  30. diag: !include common/diag.yaml
  31. # Enable logging
  32. logger:
  33. wifi:
  34. ssid: !secret iot_ssid
  35. password: !secret iot_password
  36. domain: .int.mmax.cloud
  37. web_server:
  38. port: 80
  39. time:
  40. - platform: homeassistant
  41. id: homeassistant_time
  42. binary_sensor:
  43. - platform: status
  44. name: "Status"
  45. - platform: gpio
  46. name: "Boot Button"
  47. pin:
  48. number: 0
  49. ignore_strapping_warning: true
  50. mode:
  51. input: true
  52. inverted: true
  53. disabled_by_default: true
  54. on_press:
  55. then:
  56. - button.press: restart_button
  57. switch:
  58. - platform: gpio
  59. pin: GPIO1
  60. id: relay1
  61. name: Relay 1
  62. restore_mode: RESTORE_DEFAULT_OFF
  63. - platform: gpio
  64. pin: GPIO2
  65. id: relay2
  66. name: Relay 2
  67. restore_mode: RESTORE_DEFAULT_OFF
  68. - platform: gpio
  69. pin: GPIO41
  70. id: relay3
  71. name: Relay 3
  72. restore_mode: RESTORE_DEFAULT_OFF
  73. - platform: gpio
  74. pin: GPIO42
  75. id: relay4
  76. name: Relay 4
  77. restore_mode: RESTORE_DEFAULT_OFF
  78. - platform: gpio
  79. pin:
  80. number: GPIO45
  81. ignore_strapping_warning: true
  82. id: relay5
  83. name: Relay 5
  84. restore_mode: RESTORE_DEFAULT_OFF
  85. - platform: gpio
  86. pin:
  87. number: GPIO46
  88. ignore_strapping_warning: true
  89. id: relay6
  90. name: Relay 6
  91. restore_mode: RESTORE_DEFAULT_OFF
  92. uart:
  93. tx_pin: GPIO17
  94. rx_pin: GPIO18
  95. baud_rate: 115200
  96. # buzzer
  97. output:
  98. - platform: ledc
  99. pin: GPIO21
  100. id: buzzer
  101. rtttl:
  102. output: buzzer
  103. id: rtttl_buzzer
  104. gain: 30%
  105. light:
  106. - platform: neopixelbus
  107. type: RGB
  108. variant: 800KBPS
  109. pin: GPIO38
  110. num_leds: 1
  111. name: "RGB LED"
  112. id: rgb_led
  113. button:
  114. - platform: restart
  115. name: "Restart"
  116. id: restart_button
  117. entity_category: config
  118. - platform: factory_reset
  119. name: "Factory Reset"
  120. id: reset
  121. entity_category: config
  122. - platform: safe_mode
  123. name: "Safe Mode"
  124. internal: false
  125. entity_category: config