Guest User

ESPhome broken compile

a guest
Jul 22nd, 2025
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.57 KB | Source Code | 0 0
  1. substitutions:
  2. name: main-stair-bottom
  3. friendly_name: Main Stair Bottom
  4. project_name: "vdbxio.FLIP-C3-alt"
  5. project_version: "0.9.6"
  6. ap_password: "GenericPassword"
  7. status_pin: "10"
  8. onboard_rgb_pin: "8"
  9. rgb_pin: "7"
  10. package_git: "github://vdbxio/wiki/esphome/flip-c3-alt.yaml"
  11.  
  12. dashboard_import:
  13. package_import_url: ${package_git}
  14.  
  15. esphome:
  16. name: ${name}
  17. name_add_mac_suffix: false
  18. friendly_name: ${friendly_name}
  19. project:
  20. name: "${project_name}"
  21. version: "${project_version}"
  22.  
  23. wifi:
  24. ssid: !secret wifi_ssid
  25. password: !secret wifi_password
  26. ap:
  27. password: ${ap_password}
  28.  
  29. esp32:
  30. board: esp32-c3-devkitm-1
  31. framework:
  32. type: arduino
  33. version: latest
  34.  
  35. i2c:
  36. sda: 1
  37. scl: 0
  38. scan: True
  39. id: bus_a
  40. frequency: 100k
  41.  
  42. logger:
  43. api:
  44. ota:
  45.  
  46. time:
  47. - platform: homeassistant
  48.  
  49.  
  50. button:
  51. - platform: restart
  52. name: ${friendly_name} Restart
  53. - platform: factory_reset
  54. name: Restart with Factory Default Settings
  55. disabled_by_default: True
  56.  
  57. captive_portal:
  58.  
  59. web_server:
  60. local: True
  61.  
  62. sensor:
  63. - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
  64. name: "WiFi Signal dB"
  65. id: wifi_signal_db
  66. update_interval: 30s
  67. entity_category: "diagnostic"
  68. - platform: copy # Reports the WiFi signal strength in %
  69. source_id: wifi_signal_db
  70. name: "WiFi Signal Percent"
  71. filters:
  72. - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
  73. unit_of_measurement: "%"
  74. entity_category: "diagnostic"
  75. - platform: internal_temperature
  76. name: "ESP32-C3 Temperature"
  77. - platform: vl53l0x
  78. #name: "Breakbeam Sensor Dist"
  79. id: breakbeam_sensor_dist
  80. address: 0x29
  81. update_interval: 0.1s
  82. long_range: true
  83. internal: true
  84. #
  85. # Only send a value back if breakbeam_sensor changes.
  86. #
  87. filters:
  88. - lambda: !lambda |-
  89. /**
  90. * YOU MIGHT WANT TO CONFIGURE THIS.
  91. * Distance below which to trip the virtual break beam sensor.
  92. * '0.5' meters is about 20 inches.
  93. */
  94. static double minTripDistance = 1.1;
  95. if (x <= minTripDistance) {
  96. if (id(breakbeam_sensor).state == true) {
  97. // Beam was already broken
  98. return {};
  99. }
  100. // Beam was just broken
  101. id(breakbeam_sensor).publish_state(true);
  102. ESP_LOGI("breakbeam_sensor_dist", "Set breakbeam_sensor to Detected");
  103. return {};
  104. }
  105. else {
  106. if (id(breakbeam_sensor).state == false) {
  107. // Beam was already un-broken
  108. return {};
  109. }
  110. // Beam was just un-broken
  111. id(breakbeam_sensor).publish_state(false);
  112. ESP_LOGI("breakbeam_sensor_dist", "Set breakbeam_sensor to Cleared");
  113. return {};
  114. }
  115.  
  116. # - platform: adc
  117. # pin: 2
  118. # name: "ADC Pin 2"
  119. # accuracy_decimals: 5
  120. # update_interval: 1s
  121. # attenuation: auto
  122. # filters:
  123. # - multiply: 2.0
  124. # - platform: adc
  125. # pin: 3
  126. # name: "ADC Pin 3"
  127. # accuracy_decimals: 5
  128. # update_interval: 1s
  129. # attenuation: auto
  130. # filters:
  131. # - multiply: 2.0
  132.  
  133. ##
  134. ## The virutal break beam sensor.
  135. ## The state of this will be controlled
  136. ## by breakbeam_sensor_dist's lambda as necessary.
  137. ##
  138. binary_sensor:
  139. - name: "Breakbeam Sensor"
  140. id: breakbeam_sensor
  141. platform: template
  142. device_class: motion
  143.  
  144. wled:
  145.  
  146. light:
  147. - platform: status_led
  148. name: "Status LED"
  149. id: stats_led
  150. pin: ${status_pin}
Advertisement
Add Comment
Please, Sign In to add comment