esphome 2025.12.0b2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3896) hide show
  1. esphome/__init__.py +0 -0
  2. esphome/__main__.py +1517 -0
  3. esphome/address_cache.py +142 -0
  4. esphome/analyze_memory/__init__.py +335 -0
  5. esphome/analyze_memory/__main__.py +6 -0
  6. esphome/analyze_memory/cli.py +435 -0
  7. esphome/analyze_memory/const.py +1052 -0
  8. esphome/analyze_memory/demangle.py +182 -0
  9. esphome/analyze_memory/helpers.py +121 -0
  10. esphome/analyze_memory/ram_strings.py +493 -0
  11. esphome/analyze_memory/toolchain.py +57 -0
  12. esphome/automation.py +589 -0
  13. esphome/build_gen/__init__.py +0 -0
  14. esphome/build_gen/platformio.py +100 -0
  15. esphome/codegen.py +97 -0
  16. esphome/components/__init__.py +0 -0
  17. esphome/components/a01nyub/__init__.py +1 -0
  18. esphome/components/a01nyub/a01nyub.cpp +44 -0
  19. esphome/components/a01nyub/a01nyub.h +27 -0
  20. esphome/components/a01nyub/sensor.py +41 -0
  21. esphome/components/a02yyuw/__init__.py +1 -0
  22. esphome/components/a02yyuw/a02yyuw.cpp +43 -0
  23. esphome/components/a02yyuw/a02yyuw.h +27 -0
  24. esphome/components/a02yyuw/sensor.py +41 -0
  25. esphome/components/a4988/__init__.py +0 -0
  26. esphome/components/a4988/a4988.cpp +55 -0
  27. esphome/components/a4988/a4988.h +29 -0
  28. esphome/components/a4988/stepper.py +32 -0
  29. esphome/components/absolute_humidity/__init__.py +1 -0
  30. esphome/components/absolute_humidity/absolute_humidity.cpp +180 -0
  31. esphome/components/absolute_humidity/absolute_humidity.h +76 -0
  32. esphome/components/absolute_humidity/sensor.py +56 -0
  33. esphome/components/ac_dimmer/__init__.py +0 -0
  34. esphome/components/ac_dimmer/ac_dimmer.cpp +236 -0
  35. esphome/components/ac_dimmer/ac_dimmer.h +70 -0
  36. esphome/components/ac_dimmer/output.py +52 -0
  37. esphome/components/adalight/__init__.py +27 -0
  38. esphome/components/adalight/adalight_light_effect.cpp +142 -0
  39. esphome/components/adalight/adalight_light_effect.h +39 -0
  40. esphome/components/adc/__init__.py +281 -0
  41. esphome/components/adc/adc_sensor.h +170 -0
  42. esphome/components/adc/adc_sensor_common.cpp +85 -0
  43. esphome/components/adc/adc_sensor_esp32.cpp +368 -0
  44. esphome/components/adc/adc_sensor_esp8266.cpp +61 -0
  45. esphome/components/adc/adc_sensor_libretiny.cpp +54 -0
  46. esphome/components/adc/adc_sensor_rp2040.cpp +97 -0
  47. esphome/components/adc/adc_sensor_zephyr.cpp +207 -0
  48. esphome/components/adc/sensor.py +196 -0
  49. esphome/components/adc128s102/__init__.py +23 -0
  50. esphome/components/adc128s102/adc128s102.cpp +32 -0
  51. esphome/components/adc128s102/adc128s102.h +23 -0
  52. esphome/components/adc128s102/sensor/__init__.py +38 -0
  53. esphome/components/adc128s102/sensor/adc128s102_sensor.cpp +24 -0
  54. esphome/components/adc128s102/sensor/adc128s102_sensor.h +29 -0
  55. esphome/components/addressable_light/__init__.py +0 -0
  56. esphome/components/addressable_light/addressable_light_display.cpp +67 -0
  57. esphome/components/addressable_light/addressable_light_display.h +63 -0
  58. esphome/components/addressable_light/display.py +62 -0
  59. esphome/components/ade7880/__init__.py +1 -0
  60. esphome/components/ade7880/ade7880.cpp +315 -0
  61. esphome/components/ade7880/ade7880.h +129 -0
  62. esphome/components/ade7880/ade7880_i2c.cpp +101 -0
  63. esphome/components/ade7880/ade7880_registers.h +243 -0
  64. esphome/components/ade7880/sensor.py +316 -0
  65. esphome/components/ade7953/__init__.py +1 -0
  66. esphome/components/ade7953/sensor.py +5 -0
  67. esphome/components/ade7953_base/__init__.py +203 -0
  68. esphome/components/ade7953_base/ade7953_base.cpp +156 -0
  69. esphome/components/ade7953_base/ade7953_base.h +131 -0
  70. esphome/components/ade7953_i2c/__init__.py +1 -0
  71. esphome/components/ade7953_i2c/ade7953_i2c.cpp +80 -0
  72. esphome/components/ade7953_i2c/ade7953_i2c.h +28 -0
  73. esphome/components/ade7953_i2c/sensor.py +26 -0
  74. esphome/components/ade7953_spi/__init__.py +1 -0
  75. esphome/components/ade7953_spi/ade7953_spi.cpp +81 -0
  76. esphome/components/ade7953_spi/ade7953_spi.h +32 -0
  77. esphome/components/ade7953_spi/sensor.py +26 -0
  78. esphome/components/ads1115/__init__.py +32 -0
  79. esphome/components/ads1115/ads1115.cpp +223 -0
  80. esphome/components/ads1115/ads1115.h +64 -0
  81. esphome/components/ads1115/sensor/__init__.py +98 -0
  82. esphome/components/ads1115/sensor/ads1115_sensor.cpp +31 -0
  83. esphome/components/ads1115/sensor/ads1115_sensor.h +37 -0
  84. esphome/components/ads1118/__init__.py +25 -0
  85. esphome/components/ads1118/ads1118.cpp +126 -0
  86. esphome/components/ads1118/ads1118.h +45 -0
  87. esphome/components/ads1118/sensor/__init__.py +98 -0
  88. esphome/components/ads1118/sensor/ads1118_sensor.cpp +29 -0
  89. esphome/components/ads1118/sensor/ads1118_sensor.h +36 -0
  90. esphome/components/ags10/__init__.py +1 -0
  91. esphome/components/ags10/ags10.cpp +196 -0
  92. esphome/components/ags10/ags10.h +140 -0
  93. esphome/components/ags10/sensor.py +132 -0
  94. esphome/components/aht10/__init__.py +0 -0
  95. esphome/components/aht10/aht10.cpp +166 -0
  96. esphome/components/aht10/aht10.h +36 -0
  97. esphome/components/aht10/sensor.py +65 -0
  98. esphome/components/aic3204/__init__.py +0 -0
  99. esphome/components/aic3204/aic3204.cpp +171 -0
  100. esphome/components/aic3204/aic3204.h +87 -0
  101. esphome/components/aic3204/audio_dac.py +52 -0
  102. esphome/components/aic3204/automation.h +23 -0
  103. esphome/components/airthings_ble/__init__.py +23 -0
  104. esphome/components/airthings_ble/airthings_listener.cpp +34 -0
  105. esphome/components/airthings_ble/airthings_listener.h +19 -0
  106. esphome/components/airthings_wave_base/__init__.py +102 -0
  107. esphome/components/airthings_wave_base/airthings_wave_base.cpp +211 -0
  108. esphome/components/airthings_wave_base/airthings_wave_base.h +90 -0
  109. esphome/components/airthings_wave_mini/__init__.py +1 -0
  110. esphome/components/airthings_wave_mini/airthings_wave_mini.cpp +55 -0
  111. esphome/components/airthings_wave_mini/airthings_wave_mini.h +40 -0
  112. esphome/components/airthings_wave_mini/sensor.py +25 -0
  113. esphome/components/airthings_wave_plus/__init__.py +1 -0
  114. esphome/components/airthings_wave_plus/airthings_wave_plus.cpp +104 -0
  115. esphome/components/airthings_wave_plus/airthings_wave_plus.h +64 -0
  116. esphome/components/airthings_wave_plus/sensor.py +102 -0
  117. esphome/components/alarm_control_panel/__init__.py +344 -0
  118. esphome/components/alarm_control_panel/alarm_control_panel.cpp +161 -0
  119. esphome/components/alarm_control_panel/alarm_control_panel.h +200 -0
  120. esphome/components/alarm_control_panel/alarm_control_panel_call.cpp +103 -0
  121. esphome/components/alarm_control_panel/alarm_control_panel_call.h +40 -0
  122. esphome/components/alarm_control_panel/alarm_control_panel_state.cpp +34 -0
  123. esphome/components/alarm_control_panel/alarm_control_panel_state.h +29 -0
  124. esphome/components/alarm_control_panel/automation.h +191 -0
  125. esphome/components/alpha3/__init__.py +1 -0
  126. esphome/components/alpha3/alpha3.cpp +191 -0
  127. esphome/components/alpha3/alpha3.h +72 -0
  128. esphome/components/alpha3/sensor.py +85 -0
  129. esphome/components/am2315c/__init__.py +1 -0
  130. esphome/components/am2315c/am2315c.cpp +182 -0
  131. esphome/components/am2315c/am2315c.h +50 -0
  132. esphome/components/am2315c/sensor.py +54 -0
  133. esphome/components/am2320/__init__.py +0 -0
  134. esphome/components/am2320/am2320.cpp +91 -0
  135. esphome/components/am2320/am2320.h +29 -0
  136. esphome/components/am2320/sensor.py +56 -0
  137. esphome/components/am43/__init__.py +1 -0
  138. esphome/components/am43/am43_base.cpp +144 -0
  139. esphome/components/am43/am43_base.h +78 -0
  140. esphome/components/am43/cover/__init__.py +35 -0
  141. esphome/components/am43/cover/am43_cover.cpp +159 -0
  142. esphome/components/am43/cover/am43_cover.h +44 -0
  143. esphome/components/am43/sensor/__init__.py +53 -0
  144. esphome/components/am43/sensor/am43_sensor.cpp +117 -0
  145. esphome/components/am43/sensor/am43_sensor.h +44 -0
  146. esphome/components/analog_threshold/__init__.py +1 -0
  147. esphome/components/analog_threshold/analog_threshold_binary_sensor.cpp +47 -0
  148. esphome/components/analog_threshold/analog_threshold_binary_sensor.h +27 -0
  149. esphome/components/analog_threshold/binary_sensor.py +49 -0
  150. esphome/components/animation/__init__.py +108 -0
  151. esphome/components/animation/animation.cpp +70 -0
  152. esphome/components/animation/animation.h +68 -0
  153. esphome/components/anova/__init__.py +0 -0
  154. esphome/components/anova/anova.cpp +161 -0
  155. esphome/components/anova/anova.h +51 -0
  156. esphome/components/anova/anova_base.cpp +134 -0
  157. esphome/components/anova/anova_base.h +79 -0
  158. esphome/components/anova/climate.py +35 -0
  159. esphome/components/apds9306/__init__.py +4 -0
  160. esphome/components/apds9306/apds9306.cpp +151 -0
  161. esphome/components/apds9306/apds9306.h +66 -0
  162. esphome/components/apds9306/sensor.py +95 -0
  163. esphome/components/apds9960/__init__.py +69 -0
  164. esphome/components/apds9960/apds9960.cpp +407 -0
  165. esphome/components/apds9960/apds9960.h +76 -0
  166. esphome/components/apds9960/binary_sensor.py +26 -0
  167. esphome/components/apds9960/sensor.py +34 -0
  168. esphome/components/api/__init__.py +802 -0
  169. esphome/components/api/api_connection.cpp +1983 -0
  170. esphome/components/api/api_connection.h +739 -0
  171. esphome/components/api/api_frame_helper.cpp +266 -0
  172. esphome/components/api/api_frame_helper.h +215 -0
  173. esphome/components/api/api_frame_helper_noise.cpp +604 -0
  174. esphome/components/api/api_frame_helper_noise.h +63 -0
  175. esphome/components/api/api_frame_helper_plaintext.cpp +292 -0
  176. esphome/components/api/api_frame_helper_plaintext.h +50 -0
  177. esphome/components/api/api_noise_context.h +30 -0
  178. esphome/components/api/api_pb2.cpp +3250 -0
  179. esphome/components/api/api_pb2.h +3072 -0
  180. esphome/components/api/api_pb2_dump.cpp +2243 -0
  181. esphome/components/api/api_pb2_includes.h +34 -0
  182. esphome/components/api/api_pb2_service.cpp +857 -0
  183. esphome/components/api/api_pb2_service.h +486 -0
  184. esphome/components/api/api_server.cpp +702 -0
  185. esphome/components/api/api_server.h +312 -0
  186. esphome/components/api/client.py +82 -0
  187. esphome/components/api/custom_api_device.h +296 -0
  188. esphome/components/api/homeassistant_service.h +243 -0
  189. esphome/components/api/list_entities.cpp +96 -0
  190. esphome/components/api/list_entities.h +99 -0
  191. esphome/components/api/proto.cpp +150 -0
  192. esphome/components/api/proto.h +892 -0
  193. esphome/components/api/subscribe_state.cpp +72 -0
  194. esphome/components/api/subscribe_state.h +92 -0
  195. esphome/components/api/user_services.cpp +91 -0
  196. esphome/components/api/user_services.h +307 -0
  197. esphome/components/as3935/__init__.py +59 -0
  198. esphome/components/as3935/as3935.cpp +324 -0
  199. esphome/components/as3935/as3935.h +132 -0
  200. esphome/components/as3935/binary_sensor.py +19 -0
  201. esphome/components/as3935/sensor.py +41 -0
  202. esphome/components/as3935_i2c/__init__.py +26 -0
  203. esphome/components/as3935_i2c/as3935_i2c.cpp +44 -0
  204. esphome/components/as3935_i2c/as3935_i2c.h +19 -0
  205. esphome/components/as3935_spi/__init__.py +26 -0
  206. esphome/components/as3935_spi/as3935_spi.cpp +46 -0
  207. esphome/components/as3935_spi/as3935_spi.h +25 -0
  208. esphome/components/as5600/__init__.py +227 -0
  209. esphome/components/as5600/as5600.cpp +138 -0
  210. esphome/components/as5600/as5600.h +104 -0
  211. esphome/components/as5600/sensor/__init__.py +119 -0
  212. esphome/components/as5600/sensor/as5600_sensor.cpp +98 -0
  213. esphome/components/as5600/sensor/as5600_sensor.h +43 -0
  214. esphome/components/as7341/__init__.py +0 -0
  215. esphome/components/as7341/as7341.cpp +272 -0
  216. esphome/components/as7341/as7341.h +144 -0
  217. esphome/components/as7341/sensor.py +111 -0
  218. esphome/components/async_tcp/__init__.py +37 -0
  219. esphome/components/at581x/__init__.py +219 -0
  220. esphome/components/at581x/at581x.cpp +198 -0
  221. esphome/components/at581x/at581x.h +62 -0
  222. esphome/components/at581x/automation.h +71 -0
  223. esphome/components/at581x/switch/__init__.py +29 -0
  224. esphome/components/at581x/switch/rf_switch.cpp +12 -0
  225. esphome/components/at581x/switch/rf_switch.h +15 -0
  226. esphome/components/atc_mithermometer/__init__.py +0 -0
  227. esphome/components/atc_mithermometer/atc_mithermometer.cpp +133 -0
  228. esphome/components/atc_mithermometer/atc_mithermometer.h +50 -0
  229. esphome/components/atc_mithermometer/sensor.py +100 -0
  230. esphome/components/atm90e26/__init__.py +1 -0
  231. esphome/components/atm90e26/atm90e26.cpp +234 -0
  232. esphome/components/atm90e26/atm90e26.h +72 -0
  233. esphome/components/atm90e26/atm90e26_reg.h +70 -0
  234. esphome/components/atm90e26/sensor.py +159 -0
  235. esphome/components/atm90e32/__init__.py +8 -0
  236. esphome/components/atm90e32/atm90e32.cpp +1233 -0
  237. esphome/components/atm90e32/atm90e32.h +275 -0
  238. esphome/components/atm90e32/atm90e32_reg.h +272 -0
  239. esphome/components/atm90e32/button/__init__.py +95 -0
  240. esphome/components/atm90e32/button/atm90e32_button.cpp +79 -0
  241. esphome/components/atm90e32/button/atm90e32_button.h +59 -0
  242. esphome/components/atm90e32/number/__init__.py +130 -0
  243. esphome/components/atm90e32/number/atm90e32_number.h +16 -0
  244. esphome/components/atm90e32/sensor.py +252 -0
  245. esphome/components/atm90e32/text_sensor/__init__.py +48 -0
  246. esphome/components/audio/__init__.py +168 -0
  247. esphome/components/audio/audio.cpp +67 -0
  248. esphome/components/audio/audio.h +187 -0
  249. esphome/components/audio/audio_decoder.cpp +393 -0
  250. esphome/components/audio/audio_decoder.h +135 -0
  251. esphome/components/audio/audio_reader.cpp +328 -0
  252. esphome/components/audio/audio_reader.h +85 -0
  253. esphome/components/audio/audio_resampler.cpp +163 -0
  254. esphome/components/audio/audio_resampler.h +102 -0
  255. esphome/components/audio/audio_transfer_buffer.cpp +175 -0
  256. esphome/components/audio/audio_transfer_buffer.h +144 -0
  257. esphome/components/audio_adc/__init__.py +41 -0
  258. esphome/components/audio_adc/audio_adc.h +17 -0
  259. esphome/components/audio_adc/automation.h +23 -0
  260. esphome/components/audio_dac/__init__.py +57 -0
  261. esphome/components/audio_dac/audio_dac.h +23 -0
  262. esphome/components/audio_dac/automation.h +43 -0
  263. esphome/components/axs15231/__init__.py +6 -0
  264. esphome/components/axs15231/touchscreen/__init__.py +36 -0
  265. esphome/components/axs15231/touchscreen/axs15231_touchscreen.cpp +68 -0
  266. esphome/components/axs15231/touchscreen/axs15231_touchscreen.h +27 -0
  267. esphome/components/b_parasite/__init__.py +0 -0
  268. esphome/components/b_parasite/b_parasite.cpp +108 -0
  269. esphome/components/b_parasite/b_parasite.h +41 -0
  270. esphome/components/b_parasite/sensor.py +92 -0
  271. esphome/components/ballu/__init__.py +0 -0
  272. esphome/components/ballu/ballu.cpp +239 -0
  273. esphome/components/ballu/ballu.h +31 -0
  274. esphome/components/ballu/climate.py +14 -0
  275. esphome/components/bang_bang/__init__.py +1 -0
  276. esphome/components/bang_bang/bang_bang_climate.cpp +232 -0
  277. esphome/components/bang_bang/bang_bang_climate.h +92 -0
  278. esphome/components/bang_bang/climate.py +81 -0
  279. esphome/components/bedjet/__init__.py +48 -0
  280. esphome/components/bedjet/bedjet_child.h +23 -0
  281. esphome/components/bedjet/bedjet_codec.cpp +169 -0
  282. esphome/components/bedjet/bedjet_codec.h +194 -0
  283. esphome/components/bedjet/bedjet_const.h +105 -0
  284. esphome/components/bedjet/bedjet_hub.cpp +553 -0
  285. esphome/components/bedjet/bedjet_hub.h +178 -0
  286. esphome/components/bedjet/climate/__init__.py +67 -0
  287. esphome/components/bedjet/climate/bedjet_climate.cpp +351 -0
  288. esphome/components/bedjet/climate/bedjet_climate.h +85 -0
  289. esphome/components/bedjet/fan/__init__.py +22 -0
  290. esphome/components/bedjet/fan/bedjet_fan.cpp +113 -0
  291. esphome/components/bedjet/fan/bedjet_fan.h +40 -0
  292. esphome/components/bedjet/sensor/__init__.py +52 -0
  293. esphome/components/bedjet/sensor/bedjet_sensor.cpp +34 -0
  294. esphome/components/bedjet/sensor/bedjet_sensor.h +32 -0
  295. esphome/components/beken_spi_led_strip/__init__.py +0 -0
  296. esphome/components/beken_spi_led_strip/led_strip.cpp +388 -0
  297. esphome/components/beken_spi_led_strip/led_strip.h +85 -0
  298. esphome/components/beken_spi_led_strip/light.py +134 -0
  299. esphome/components/bh1750/__init__.py +0 -0
  300. esphome/components/bh1750/bh1750.cpp +168 -0
  301. esphome/components/bh1750/bh1750.h +33 -0
  302. esphome/components/bh1750/sensor.py +41 -0
  303. esphome/components/bh1900nux/__init__.py +0 -0
  304. esphome/components/bh1900nux/bh1900nux.cpp +54 -0
  305. esphome/components/bh1900nux/bh1900nux.h +18 -0
  306. esphome/components/bh1900nux/sensor.py +34 -0
  307. esphome/components/binary/__init__.py +3 -0
  308. esphome/components/binary/fan/__init__.py +36 -0
  309. esphome/components/binary/fan/binary_fan.cpp +40 -0
  310. esphome/components/binary/fan/binary_fan.h +31 -0
  311. esphome/components/binary/light/__init__.py +23 -0
  312. esphome/components/binary/light/binary_light_output.h +33 -0
  313. esphome/components/binary_sensor/__init__.py +679 -0
  314. esphome/components/binary_sensor/automation.cpp +120 -0
  315. esphome/components/binary_sensor/automation.h +174 -0
  316. esphome/components/binary_sensor/binary_sensor.cpp +71 -0
  317. esphome/components/binary_sensor/binary_sensor.h +73 -0
  318. esphome/components/binary_sensor/filter.cpp +133 -0
  319. esphome/components/binary_sensor/filter.h +140 -0
  320. esphome/components/binary_sensor_map/__init__.py +0 -0
  321. esphome/components/binary_sensor_map/binary_sensor_map.cpp +142 -0
  322. esphome/components/binary_sensor_map/binary_sensor_map.h +100 -0
  323. esphome/components/binary_sensor_map/sensor.py +105 -0
  324. esphome/components/bk72xx/__init__.py +52 -0
  325. esphome/components/bk72xx/boards.py +1264 -0
  326. esphome/components/bl0906/__init__.py +1 -0
  327. esphome/components/bl0906/bl0906.cpp +238 -0
  328. esphome/components/bl0906/bl0906.h +96 -0
  329. esphome/components/bl0906/const.py +4 -0
  330. esphome/components/bl0906/constants.h +122 -0
  331. esphome/components/bl0906/sensor.py +185 -0
  332. esphome/components/bl0939/__init__.py +1 -0
  333. esphome/components/bl0939/bl0939.cpp +146 -0
  334. esphome/components/bl0939/bl0939.h +107 -0
  335. esphome/components/bl0939/sensor.py +119 -0
  336. esphome/components/bl0940/__init__.py +6 -0
  337. esphome/components/bl0940/bl0940.cpp +275 -0
  338. esphome/components/bl0940/bl0940.h +154 -0
  339. esphome/components/bl0940/button/__init__.py +27 -0
  340. esphome/components/bl0940/button/calibration_reset_button.cpp +20 -0
  341. esphome/components/bl0940/button/calibration_reset_button.h +19 -0
  342. esphome/components/bl0940/number/__init__.py +94 -0
  343. esphome/components/bl0940/number/calibration_number.cpp +29 -0
  344. esphome/components/bl0940/number/calibration_number.h +26 -0
  345. esphome/components/bl0940/sensor.py +250 -0
  346. esphome/components/bl0942/__init__.py +1 -0
  347. esphome/components/bl0942/bl0942.cpp +218 -0
  348. esphome/components/bl0942/bl0942.h +152 -0
  349. esphome/components/bl0942/sensor.py +128 -0
  350. esphome/components/ble_client/__init__.py +316 -0
  351. esphome/components/ble_client/automation.cpp +11 -0
  352. esphome/components/ble_client/automation.h +395 -0
  353. esphome/components/ble_client/ble_client.cpp +86 -0
  354. esphome/components/ble_client/ble_client.h +79 -0
  355. esphome/components/ble_client/output/__init__.py +68 -0
  356. esphome/components/ble_client/output/ble_binary_output.cpp +78 -0
  357. esphome/components/ble_client/output/ble_binary_output.h +40 -0
  358. esphome/components/ble_client/sensor/__init__.py +161 -0
  359. esphome/components/ble_client/sensor/automation.h +39 -0
  360. esphome/components/ble_client/sensor/ble_rssi_sensor.cpp +81 -0
  361. esphome/components/ble_client/sensor/ble_rssi_sensor.h +32 -0
  362. esphome/components/ble_client/sensor/ble_sensor.cpp +150 -0
  363. esphome/components/ble_client/sensor/ble_sensor.h +51 -0
  364. esphome/components/ble_client/switch/__init__.py +22 -0
  365. esphome/components/ble_client/switch/ble_switch.cpp +34 -0
  366. esphome/components/ble_client/switch/ble_switch.h +27 -0
  367. esphome/components/ble_client/text_sensor/__init__.py +106 -0
  368. esphome/components/ble_client/text_sensor/automation.h +37 -0
  369. esphome/components/ble_client/text_sensor/ble_text_sensor.cpp +141 -0
  370. esphome/components/ble_client/text_sensor/ble_text_sensor.h +43 -0
  371. esphome/components/ble_nus/__init__.py +29 -0
  372. esphome/components/ble_nus/ble_nus.cpp +161 -0
  373. esphome/components/ble_nus/ble_nus.h +48 -0
  374. esphome/components/ble_presence/__init__.py +0 -0
  375. esphome/components/ble_presence/binary_sensor.py +93 -0
  376. esphome/components/ble_presence/ble_presence_device.cpp +16 -0
  377. esphome/components/ble_presence/ble_presence_device.h +142 -0
  378. esphome/components/ble_rssi/__init__.py +0 -0
  379. esphome/components/ble_rssi/ble_rssi_sensor.cpp +16 -0
  380. esphome/components/ble_rssi/ble_rssi_sensor.h +125 -0
  381. esphome/components/ble_rssi/sensor.py +89 -0
  382. esphome/components/ble_scanner/__init__.py +0 -0
  383. esphome/components/ble_scanner/ble_scanner.cpp +16 -0
  384. esphome/components/ble_scanner/ble_scanner.h +37 -0
  385. esphome/components/ble_scanner/text_sensor.py +25 -0
  386. esphome/components/bluetooth_proxy/__init__.py +110 -0
  387. esphome/components/bluetooth_proxy/bluetooth_connection.cpp +579 -0
  388. esphome/components/bluetooth_proxy/bluetooth_connection.h +56 -0
  389. esphome/components/bluetooth_proxy/bluetooth_proxy.cpp +455 -0
  390. esphome/components/bluetooth_proxy/bluetooth_proxy.h +183 -0
  391. esphome/components/bm8563/__init__.py +1 -0
  392. esphome/components/bm8563/bm8563.cpp +198 -0
  393. esphome/components/bm8563/bm8563.h +57 -0
  394. esphome/components/bm8563/time.py +80 -0
  395. esphome/components/bme280_base/__init__.py +108 -0
  396. esphome/components/bme280_base/bme280_base.cpp +357 -0
  397. esphome/components/bme280_base/bme280_base.h +114 -0
  398. esphome/components/bme280_i2c/__init__.py +0 -0
  399. esphome/components/bme280_i2c/bme280_i2c.cpp +30 -0
  400. esphome/components/bme280_i2c/bme280_i2c.h +20 -0
  401. esphome/components/bme280_i2c/sensor.py +22 -0
  402. esphome/components/bme280_spi/__init__.py +0 -0
  403. esphome/components/bme280_spi/bme280_spi.cpp +65 -0
  404. esphome/components/bme280_spi/bme280_spi.h +20 -0
  405. esphome/components/bme280_spi/sensor.py +24 -0
  406. esphome/components/bme680/__init__.py +0 -0
  407. esphome/components/bme680/bme680.cpp +514 -0
  408. esphome/components/bme680/bme680.h +139 -0
  409. esphome/components/bme680/sensor.py +159 -0
  410. esphome/components/bme680_bsec/__init__.py +96 -0
  411. esphome/components/bme680_bsec/bme680_bsec.cpp +565 -0
  412. esphome/components/bme680_bsec/bme680_bsec.h +137 -0
  413. esphome/components/bme680_bsec/sensor.py +124 -0
  414. esphome/components/bme680_bsec/text_sensor.py +33 -0
  415. esphome/components/bme68x_bsec2/__init__.py +197 -0
  416. esphome/components/bme68x_bsec2/bme68x_bsec2.cpp +531 -0
  417. esphome/components/bme68x_bsec2/bme68x_bsec2.h +161 -0
  418. esphome/components/bme68x_bsec2/sensor.py +130 -0
  419. esphome/components/bme68x_bsec2/text_sensor.py +33 -0
  420. esphome/components/bme68x_bsec2_i2c/__init__.py +28 -0
  421. esphome/components/bme68x_bsec2_i2c/bme68x_bsec2_i2c.cpp +54 -0
  422. esphome/components/bme68x_bsec2_i2c/bme68x_bsec2_i2c.h +28 -0
  423. esphome/components/bmi160/__init__.py +1 -0
  424. esphome/components/bmi160/bmi160.cpp +269 -0
  425. esphome/components/bmi160/bmi160.h +44 -0
  426. esphome/components/bmi160/sensor.py +102 -0
  427. esphome/components/bmp085/__init__.py +0 -0
  428. esphome/components/bmp085/bmp085.cpp +137 -0
  429. esphome/components/bmp085/bmp085.h +45 -0
  430. esphome/components/bmp085/sensor.py +56 -0
  431. esphome/components/bmp280/__init__.py +0 -0
  432. esphome/components/bmp280/sensor.py +5 -0
  433. esphome/components/bmp280_base/__init__.py +88 -0
  434. esphome/components/bmp280_base/bmp280_base.cpp +273 -0
  435. esphome/components/bmp280_base/bmp280_base.h +98 -0
  436. esphome/components/bmp280_i2c/__init__.py +0 -0
  437. esphome/components/bmp280_i2c/bmp280_i2c.cpp +14 -0
  438. esphome/components/bmp280_i2c/bmp280_i2c.h +24 -0
  439. esphome/components/bmp280_i2c/sensor.py +23 -0
  440. esphome/components/bmp280_spi/__init__.py +0 -0
  441. esphome/components/bmp280_spi/bmp280_spi.cpp +65 -0
  442. esphome/components/bmp280_spi/bmp280_spi.h +20 -0
  443. esphome/components/bmp280_spi/sensor.py +23 -0
  444. esphome/components/bmp3xx/__init__.py +0 -0
  445. esphome/components/bmp3xx/sensor.py +7 -0
  446. esphome/components/bmp3xx_base/__init__.py +95 -0
  447. esphome/components/bmp3xx_base/bmp3xx_base.cpp +388 -0
  448. esphome/components/bmp3xx_base/bmp3xx_base.h +242 -0
  449. esphome/components/bmp3xx_i2c/__init__.py +0 -0
  450. esphome/components/bmp3xx_i2c/bmp3xx_i2c.cpp +29 -0
  451. esphome/components/bmp3xx_i2c/bmp3xx_i2c.h +17 -0
  452. esphome/components/bmp3xx_i2c/sensor.py +23 -0
  453. esphome/components/bmp3xx_spi/__init__.py +0 -0
  454. esphome/components/bmp3xx_spi/bmp3xx_spi.cpp +57 -0
  455. esphome/components/bmp3xx_spi/bmp3xx_spi.h +19 -0
  456. esphome/components/bmp3xx_spi/sensor.py +23 -0
  457. esphome/components/bmp581/__init__.py +0 -0
  458. esphome/components/bmp581/bmp581.cpp +600 -0
  459. esphome/components/bmp581/bmp581.h +220 -0
  460. esphome/components/bmp581/sensor.py +164 -0
  461. esphome/components/bp1658cj/__init__.py +40 -0
  462. esphome/components/bp1658cj/bp1658cj.cpp +132 -0
  463. esphome/components/bp1658cj/bp1658cj.h +64 -0
  464. esphome/components/bp1658cj/output.py +28 -0
  465. esphome/components/bp5758d/__init__.py +29 -0
  466. esphome/components/bp5758d/bp5758d.cpp +168 -0
  467. esphome/components/bp5758d/bp5758d.h +64 -0
  468. esphome/components/bp5758d/output.py +30 -0
  469. esphome/components/button/__init__.py +134 -0
  470. esphome/components/button/automation.h +26 -0
  471. esphome/components/button/button.cpp +28 -0
  472. esphome/components/button/button.h +47 -0
  473. esphome/components/bytebuffer/__init__.py +5 -0
  474. esphome/components/bytebuffer/bytebuffer.h +421 -0
  475. esphome/components/camera/__init__.py +1 -0
  476. esphome/components/camera/buffer.h +18 -0
  477. esphome/components/camera/buffer_impl.cpp +20 -0
  478. esphome/components/camera/buffer_impl.h +26 -0
  479. esphome/components/camera/camera.cpp +22 -0
  480. esphome/components/camera/camera.h +138 -0
  481. esphome/components/camera/encoder.h +69 -0
  482. esphome/components/camera_encoder/__init__.py +60 -0
  483. esphome/components/camera_encoder/encoder_buffer_impl.cpp +23 -0
  484. esphome/components/camera_encoder/encoder_buffer_impl.h +25 -0
  485. esphome/components/camera_encoder/esp32_camera_jpeg_encoder.cpp +84 -0
  486. esphome/components/camera_encoder/esp32_camera_jpeg_encoder.h +41 -0
  487. esphome/components/canbus/__init__.py +183 -0
  488. esphome/components/canbus/canbus.cpp +106 -0
  489. esphome/components/canbus/canbus.h +184 -0
  490. esphome/components/cap1188/__init__.py +45 -0
  491. esphome/components/cap1188/binary_sensor.py +24 -0
  492. esphome/components/cap1188/cap1188.cpp +104 -0
  493. esphome/components/cap1188/cap1188.h +71 -0
  494. esphome/components/captive_portal/__init__.py +115 -0
  495. esphome/components/captive_portal/captive_index.h +89 -0
  496. esphome/components/captive_portal/captive_portal.cpp +130 -0
  497. esphome/components/captive_portal/captive_portal.h +80 -0
  498. esphome/components/captive_portal/dns_server_esp32_idf.cpp +205 -0
  499. esphome/components/captive_portal/dns_server_esp32_idf.h +27 -0
  500. esphome/components/cc1101/__init__.py +220 -0
  501. esphome/components/cc1101/cc1101.cpp +549 -0
  502. esphome/components/cc1101/cc1101.h +110 -0
  503. esphome/components/cc1101/cc1101defs.h +644 -0
  504. esphome/components/cc1101/cc1101pa.h +174 -0
  505. esphome/components/ccs811/__init__.py +0 -0
  506. esphome/components/ccs811/ccs811.cpp +190 -0
  507. esphome/components/ccs811/ccs811.h +55 -0
  508. esphome/components/ccs811/sensor.py +87 -0
  509. esphome/components/cd74hc4067/__init__.py +51 -0
  510. esphome/components/cd74hc4067/cd74hc4067.cpp +85 -0
  511. esphome/components/cd74hc4067/cd74hc4067.h +65 -0
  512. esphome/components/cd74hc4067/sensor.py +56 -0
  513. esphome/components/ch422g/__init__.py +76 -0
  514. esphome/components/ch422g/ch422g.cpp +138 -0
  515. esphome/components/ch422g/ch422g.h +70 -0
  516. esphome/components/chsc6x/__init__.py +2 -0
  517. esphome/components/chsc6x/chsc6x_touchscreen.cpp +46 -0
  518. esphome/components/chsc6x/chsc6x_touchscreen.h +34 -0
  519. esphome/components/chsc6x/touchscreen.py +33 -0
  520. esphome/components/climate/__init__.py +517 -0
  521. esphome/components/climate/automation.h +60 -0
  522. esphome/components/climate/climate.cpp +764 -0
  523. esphome/components/climate/climate.h +347 -0
  524. esphome/components/climate/climate_mode.cpp +109 -0
  525. esphome/components/climate/climate_mode.h +134 -0
  526. esphome/components/climate/climate_traits.cpp +13 -0
  527. esphome/components/climate/climate_traits.h +294 -0
  528. esphome/components/climate_ir/__init__.py +78 -0
  529. esphome/components/climate_ir/climate_ir.cpp +99 -0
  530. esphome/components/climate_ir/climate_ir.h +75 -0
  531. esphome/components/climate_ir_lg/__init__.py +0 -0
  532. esphome/components/climate_ir_lg/climate.py +44 -0
  533. esphome/components/climate_ir_lg/climate_ir_lg.cpp +222 -0
  534. esphome/components/climate_ir_lg/climate_ir_lg.h +57 -0
  535. esphome/components/cm1106/__init__.py +1 -0
  536. esphome/components/cm1106/cm1106.cpp +111 -0
  537. esphome/components/cm1106/cm1106.h +40 -0
  538. esphome/components/cm1106/sensor.py +72 -0
  539. esphome/components/color/__init__.py +109 -0
  540. esphome/components/color_temperature/__init__.py +0 -0
  541. esphome/components/color_temperature/ct_light_output.h +38 -0
  542. esphome/components/color_temperature/light.py +42 -0
  543. esphome/components/combination/__init__.py +0 -0
  544. esphome/components/combination/combination.cpp +262 -0
  545. esphome/components/combination/combination.h +141 -0
  546. esphome/components/combination/sensor.py +176 -0
  547. esphome/components/const/__init__.py +17 -0
  548. esphome/components/coolix/__init__.py +0 -0
  549. esphome/components/coolix/climate.py +14 -0
  550. esphome/components/coolix/coolix.cpp +163 -0
  551. esphome/components/coolix/coolix.h +45 -0
  552. esphome/components/copy/__init__.py +5 -0
  553. esphome/components/copy/binary_sensor/__init__.py +41 -0
  554. esphome/components/copy/binary_sensor/copy_binary_sensor.cpp +18 -0
  555. esphome/components/copy/binary_sensor/copy_binary_sensor.h +20 -0
  556. esphome/components/copy/button/__init__.py +41 -0
  557. esphome/components/copy/button/copy_button.cpp +14 -0
  558. esphome/components/copy/button/copy_button.h +21 -0
  559. esphome/components/copy/cover/__init__.py +39 -0
  560. esphome/components/copy/cover/copy_cover.cpp +51 -0
  561. esphome/components/copy/cover/copy_cover.h +24 -0
  562. esphome/components/copy/fan/__init__.py +33 -0
  563. esphome/components/copy/fan/copy_fan.cpp +58 -0
  564. esphome/components/copy/fan/copy_fan.h +25 -0
  565. esphome/components/copy/lock/__init__.py +33 -0
  566. esphome/components/copy/lock/copy_lock.cpp +29 -0
  567. esphome/components/copy/lock/copy_lock.h +22 -0
  568. esphome/components/copy/number/__init__.py +41 -0
  569. esphome/components/copy/number/copy_number.cpp +29 -0
  570. esphome/components/copy/number/copy_number.h +22 -0
  571. esphome/components/copy/select/__init__.py +34 -0
  572. esphome/components/copy/select/copy_select.cpp +27 -0
  573. esphome/components/copy/select/copy_select.h +22 -0
  574. esphome/components/copy/sensor/__init__.py +45 -0
  575. esphome/components/copy/sensor/copy_sensor.cpp +18 -0
  576. esphome/components/copy/sensor/copy_sensor.h +20 -0
  577. esphome/components/copy/switch/__init__.py +39 -0
  578. esphome/components/copy/switch/copy_switch.cpp +26 -0
  579. esphome/components/copy/switch/copy_switch.h +22 -0
  580. esphome/components/copy/text/__init__.py +34 -0
  581. esphome/components/copy/text/copy_text.cpp +25 -0
  582. esphome/components/copy/text/copy_text.h +22 -0
  583. esphome/components/copy/text_sensor/__init__.py +33 -0
  584. esphome/components/copy/text_sensor/copy_text_sensor.cpp +18 -0
  585. esphome/components/copy/text_sensor/copy_text_sensor.h +20 -0
  586. esphome/components/cover/__init__.py +263 -0
  587. esphome/components/cover/automation.h +133 -0
  588. esphome/components/cover/cover.cpp +214 -0
  589. esphome/components/cover/cover.h +160 -0
  590. esphome/components/cover/cover_traits.h +28 -0
  591. esphome/components/cs5460a/__init__.py +0 -0
  592. esphome/components/cs5460a/cs5460a.cpp +343 -0
  593. esphome/components/cs5460a/cs5460a.h +124 -0
  594. esphome/components/cs5460a/sensor.py +138 -0
  595. esphome/components/cse7761/__init__.py +0 -0
  596. esphome/components/cse7761/cse7761.cpp +243 -0
  597. esphome/components/cse7761/cse7761.h +52 -0
  598. esphome/components/cse7761/sensor.py +90 -0
  599. esphome/components/cse7766/__init__.py +0 -0
  600. esphome/components/cse7766/cse7766.cpp +239 -0
  601. esphome/components/cse7766/cse7766.h +52 -0
  602. esphome/components/cse7766/sensor.py +111 -0
  603. esphome/components/cst226/__init__.py +6 -0
  604. esphome/components/cst226/binary_sensor/__init__.py +28 -0
  605. esphome/components/cst226/binary_sensor/cs226_button.h +22 -0
  606. esphome/components/cst226/binary_sensor/cstt6_button.cpp +19 -0
  607. esphome/components/cst226/touchscreen/__init__.py +37 -0
  608. esphome/components/cst226/touchscreen/cst226_touchscreen.cpp +114 -0
  609. esphome/components/cst226/touchscreen/cst226_touchscreen.h +44 -0
  610. esphome/components/cst816/__init__.py +6 -0
  611. esphome/components/cst816/binary_sensor/__init__.py +5 -0
  612. esphome/components/cst816/touchscreen/__init__.py +37 -0
  613. esphome/components/cst816/touchscreen/cst816_touchscreen.cpp +125 -0
  614. esphome/components/cst816/touchscreen/cst816_touchscreen.h +61 -0
  615. esphome/components/ct_clamp/__init__.py +0 -0
  616. esphome/components/ct_clamp/ct_clamp_sensor.cpp +74 -0
  617. esphome/components/ct_clamp/ct_clamp_sensor.h +54 -0
  618. esphome/components/ct_clamp/sensor.py +45 -0
  619. esphome/components/current_based/__init__.py +1 -0
  620. esphome/components/current_based/cover.py +128 -0
  621. esphome/components/current_based/current_based_cover.cpp +273 -0
  622. esphome/components/current_based/current_based_cover.h +97 -0
  623. esphome/components/custom/__init__.py +0 -0
  624. esphome/components/custom/binary_sensor/__init__.py +5 -0
  625. esphome/components/custom/climate/__init__.py +5 -0
  626. esphome/components/custom/cover/__init__.py +5 -0
  627. esphome/components/custom/light/__init__.py +5 -0
  628. esphome/components/custom/output/__init__.py +5 -0
  629. esphome/components/custom/sensor/__init__.py +5 -0
  630. esphome/components/custom/switch/__init__.py +5 -0
  631. esphome/components/custom/text_sensor/__init__.py +5 -0
  632. esphome/components/custom_component/__init__.py +7 -0
  633. esphome/components/cwww/__init__.py +0 -0
  634. esphome/components/cwww/cwww_light_output.h +40 -0
  635. esphome/components/cwww/light.py +48 -0
  636. esphome/components/dac7678/__init__.py +32 -0
  637. esphome/components/dac7678/dac7678_output.cpp +84 -0
  638. esphome/components/dac7678/dac7678_output.h +55 -0
  639. esphome/components/dac7678/output.py +28 -0
  640. esphome/components/daikin/__init__.py +0 -0
  641. esphome/components/daikin/climate.py +13 -0
  642. esphome/components/daikin/daikin.cpp +255 -0
  643. esphome/components/daikin/daikin.h +64 -0
  644. esphome/components/daikin_arc/__init__.py +1 -0
  645. esphome/components/daikin_arc/climate.py +13 -0
  646. esphome/components/daikin_arc/daikin_arc.cpp +492 -0
  647. esphome/components/daikin_arc/daikin_arc.h +76 -0
  648. esphome/components/daikin_brc/__init__.py +1 -0
  649. esphome/components/daikin_brc/climate.py +21 -0
  650. esphome/components/daikin_brc/daikin_brc.cpp +273 -0
  651. esphome/components/daikin_brc/daikin_brc.h +82 -0
  652. esphome/components/dallas/__init__.py +7 -0
  653. esphome/components/dallas/sensor.py +5 -0
  654. esphome/components/dallas_temp/__init__.py +1 -0
  655. esphome/components/dallas_temp/dallas_temp.cpp +160 -0
  656. esphome/components/dallas_temp/dallas_temp.h +31 -0
  657. esphome/components/dallas_temp/sensor.py +43 -0
  658. esphome/components/daly_bms/__init__.py +33 -0
  659. esphome/components/daly_bms/binary_sensor.py +39 -0
  660. esphome/components/daly_bms/daly_bms.cpp +327 -0
  661. esphome/components/daly_bms/daly_bms.h +93 -0
  662. esphome/components/daly_bms/sensor.py +236 -0
  663. esphome/components/daly_bms/text_sensor.py +35 -0
  664. esphome/components/dashboard_import/__init__.py +167 -0
  665. esphome/components/dashboard_import/dashboard_import.cpp +12 -0
  666. esphome/components/dashboard_import/dashboard_import.h +10 -0
  667. esphome/components/datetime/__init__.py +273 -0
  668. esphome/components/datetime/date_entity.cpp +133 -0
  669. esphome/components/datetime/date_entity.h +115 -0
  670. esphome/components/datetime/datetime_base.h +39 -0
  671. esphome/components/datetime/datetime_entity.cpp +254 -0
  672. esphome/components/datetime/datetime_entity.h +150 -0
  673. esphome/components/datetime/time_entity.cpp +156 -0
  674. esphome/components/datetime/time_entity.h +129 -0
  675. esphome/components/debug/__init__.py +81 -0
  676. esphome/components/debug/debug_component.cpp +98 -0
  677. esphome/components/debug/debug_component.h +92 -0
  678. esphome/components/debug/debug_esp32.cpp +241 -0
  679. esphome/components/debug/debug_esp8266.cpp +94 -0
  680. esphome/components/debug/debug_host.cpp +18 -0
  681. esphome/components/debug/debug_libretiny.cpp +44 -0
  682. esphome/components/debug/debug_rp2040.cpp +23 -0
  683. esphome/components/debug/debug_zephyr.cpp +378 -0
  684. esphome/components/debug/sensor.py +102 -0
  685. esphome/components/debug/text_sensor.py +40 -0
  686. esphome/components/deep_sleep/__init__.py +367 -0
  687. esphome/components/deep_sleep/deep_sleep_component.cpp +81 -0
  688. esphome/components/deep_sleep/deep_sleep_component.h +219 -0
  689. esphome/components/deep_sleep/deep_sleep_esp32.cpp +172 -0
  690. esphome/components/deep_sleep/deep_sleep_esp8266.cpp +23 -0
  691. esphome/components/delonghi/__init__.py +1 -0
  692. esphome/components/delonghi/climate.py +13 -0
  693. esphome/components/delonghi/delonghi.cpp +186 -0
  694. esphome/components/delonghi/delonghi.h +64 -0
  695. esphome/components/demo/__init__.py +629 -0
  696. esphome/components/demo/demo_alarm_control_panel.h +65 -0
  697. esphome/components/demo/demo_binary_sensor.h +22 -0
  698. esphome/components/demo/demo_button.h +15 -0
  699. esphome/components/demo/demo_climate.h +152 -0
  700. esphome/components/demo/demo_cover.h +87 -0
  701. esphome/components/demo/demo_date.h +34 -0
  702. esphome/components/demo/demo_datetime.h +40 -0
  703. esphome/components/demo/demo_fan.h +66 -0
  704. esphome/components/demo/demo_light.h +68 -0
  705. esphome/components/demo/demo_lock.h +17 -0
  706. esphome/components/demo/demo_number.h +39 -0
  707. esphome/components/demo/demo_select.h +15 -0
  708. esphome/components/demo/demo_sensor.h +29 -0
  709. esphome/components/demo/demo_switch.h +22 -0
  710. esphome/components/demo/demo_text.h +18 -0
  711. esphome/components/demo/demo_text_sensor.h +25 -0
  712. esphome/components/demo/demo_time.h +34 -0
  713. esphome/components/demo/demo_valve.h +54 -0
  714. esphome/components/dfplayer/__init__.py +373 -0
  715. esphome/components/dfplayer/dfplayer.cpp +276 -0
  716. esphome/components/dfplayer/dfplayer.h +182 -0
  717. esphome/components/dfrobot_sen0395/__init__.py +204 -0
  718. esphome/components/dfrobot_sen0395/automation.h +89 -0
  719. esphome/components/dfrobot_sen0395/binary_sensor.py +23 -0
  720. esphome/components/dfrobot_sen0395/commands.cpp +321 -0
  721. esphome/components/dfrobot_sen0395/commands.h +156 -0
  722. esphome/components/dfrobot_sen0395/dfrobot_sen0395.cpp +143 -0
  723. esphome/components/dfrobot_sen0395/dfrobot_sen0395.h +125 -0
  724. esphome/components/dfrobot_sen0395/switch/__init__.py +63 -0
  725. esphome/components/dfrobot_sen0395/switch/dfrobot_sen0395_switch.cpp +48 -0
  726. esphome/components/dfrobot_sen0395/switch/dfrobot_sen0395_switch.h +34 -0
  727. esphome/components/dht/__init__.py +1 -0
  728. esphome/components/dht/dht.cpp +237 -0
  729. esphome/components/dht/dht.h +65 -0
  730. esphome/components/dht/sensor.py +70 -0
  731. esphome/components/dht12/__init__.py +0 -0
  732. esphome/components/dht12/dht12.cpp +69 -0
  733. esphome/components/dht12/dht12.h +28 -0
  734. esphome/components/dht12/sensor.py +54 -0
  735. esphome/components/display/__init__.py +224 -0
  736. esphome/components/display/display.cpp +929 -0
  737. esphome/components/display/display.h +875 -0
  738. esphome/components/display/display_buffer.cpp +72 -0
  739. esphome/components/display/display_buffer.h +34 -0
  740. esphome/components/display/display_color_utils.h +159 -0
  741. esphome/components/display/rect.cpp +94 -0
  742. esphome/components/display/rect.h +36 -0
  743. esphome/components/display_menu_base/__init__.py +428 -0
  744. esphome/components/display_menu_base/automation.h +133 -0
  745. esphome/components/display_menu_base/display_menu_base.cpp +329 -0
  746. esphome/components/display_menu_base/display_menu_base.h +82 -0
  747. esphome/components/display_menu_base/menu_item.cpp +202 -0
  748. esphome/components/display_menu_base/menu_item.h +191 -0
  749. esphome/components/dps310/__init__.py +0 -0
  750. esphome/components/dps310/dps310.cpp +189 -0
  751. esphome/components/dps310/dps310.h +65 -0
  752. esphome/components/dps310/sensor.py +62 -0
  753. esphome/components/ds1307/__init__.py +0 -0
  754. esphome/components/ds1307/ds1307.cpp +108 -0
  755. esphome/components/ds1307/ds1307.h +70 -0
  756. esphome/components/ds1307/time.py +57 -0
  757. esphome/components/ds2484/__init__.py +1 -0
  758. esphome/components/ds2484/ds2484.cpp +208 -0
  759. esphome/components/ds2484/ds2484.h +43 -0
  760. esphome/components/ds2484/one_wire.py +37 -0
  761. esphome/components/dsmr/__init__.py +89 -0
  762. esphome/components/dsmr/dsmr.cpp +335 -0
  763. esphome/components/dsmr/dsmr.h +146 -0
  764. esphome/components/dsmr/sensor.py +291 -0
  765. esphome/components/dsmr/text_sensor.py +52 -0
  766. esphome/components/duty_cycle/__init__.py +0 -0
  767. esphome/components/duty_cycle/duty_cycle_sensor.cpp +62 -0
  768. esphome/components/duty_cycle/duty_cycle_sensor.h +37 -0
  769. esphome/components/duty_cycle/sensor.py +30 -0
  770. esphome/components/duty_time/__init__.py +1 -0
  771. esphome/components/duty_time/duty_time_sensor.cpp +107 -0
  772. esphome/components/duty_time/duty_time_sensor.h +75 -0
  773. esphome/components/duty_time/sensor.py +127 -0
  774. esphome/components/e131/__init__.py +58 -0
  775. esphome/components/e131/e131.cpp +127 -0
  776. esphome/components/e131/e131.h +55 -0
  777. esphome/components/e131/e131_addressable_light_effect.cpp +94 -0
  778. esphome/components/e131/e131_addressable_light_effect.h +45 -0
  779. esphome/components/e131/e131_packet.cpp +147 -0
  780. esphome/components/ee895/__init__.py +0 -0
  781. esphome/components/ee895/ee895.cpp +114 -0
  782. esphome/components/ee895/ee895.h +34 -0
  783. esphome/components/ee895/sensor.py +69 -0
  784. esphome/components/ektf2232/__init__.py +0 -0
  785. esphome/components/ektf2232/touchscreen/__init__.py +44 -0
  786. esphome/components/ektf2232/touchscreen/ektf2232.cpp +134 -0
  787. esphome/components/ektf2232/touchscreen/ektf2232.h +35 -0
  788. esphome/components/emc2101/__init__.py +83 -0
  789. esphome/components/emc2101/emc2101.cpp +169 -0
  790. esphome/components/emc2101/emc2101.h +115 -0
  791. esphome/components/emc2101/output/__init__.py +22 -0
  792. esphome/components/emc2101/output/emc2101_output.cpp +9 -0
  793. esphome/components/emc2101/output/emc2101_output.h +22 -0
  794. esphome/components/emc2101/sensor/__init__.py +75 -0
  795. esphome/components/emc2101/sensor/emc2101_sensor.cpp +43 -0
  796. esphome/components/emc2101/sensor/emc2101_sensor.h +39 -0
  797. esphome/components/emmeti/__init__.py +0 -0
  798. esphome/components/emmeti/climate.py +14 -0
  799. esphome/components/emmeti/emmeti.cpp +316 -0
  800. esphome/components/emmeti/emmeti.h +109 -0
  801. esphome/components/endstop/__init__.py +0 -0
  802. esphome/components/endstop/cover.py +60 -0
  803. esphome/components/endstop/endstop_cover.cpp +193 -0
  804. esphome/components/endstop/endstop_cover.h +58 -0
  805. esphome/components/ens160/__init__.py +0 -0
  806. esphome/components/ens160/sensor.py +7 -0
  807. esphome/components/ens160_base/__init__.py +81 -0
  808. esphome/components/ens160_base/ens160_base.cpp +318 -0
  809. esphome/components/ens160_base/ens160_base.h +63 -0
  810. esphome/components/ens160_i2c/__init__.py +0 -0
  811. esphome/components/ens160_i2c/ens160_i2c.cpp +32 -0
  812. esphome/components/ens160_i2c/ens160_i2c.h +19 -0
  813. esphome/components/ens160_i2c/sensor.py +23 -0
  814. esphome/components/ens160_spi/__init__.py +0 -0
  815. esphome/components/ens160_spi/ens160_spi.cpp +59 -0
  816. esphome/components/ens160_spi/ens160_spi.h +22 -0
  817. esphome/components/ens160_spi/sensor.py +23 -0
  818. esphome/components/ens210/__init__.py +0 -0
  819. esphome/components/ens210/ens210.cpp +229 -0
  820. esphome/components/ens210/ens210.h +39 -0
  821. esphome/components/ens210/sensor.py +58 -0
  822. esphome/components/epaper_spi/__init__.py +1 -0
  823. esphome/components/epaper_spi/display.py +233 -0
  824. esphome/components/epaper_spi/epaper_spi.cpp +346 -0
  825. esphome/components/epaper_spi/epaper_spi.h +181 -0
  826. esphome/components/epaper_spi/epaper_spi_spectra_e6.cpp +159 -0
  827. esphome/components/epaper_spi/epaper_spi_spectra_e6.h +28 -0
  828. esphome/components/epaper_spi/epaper_spi_ssd1677.cpp +86 -0
  829. esphome/components/epaper_spi/epaper_spi_ssd1677.h +25 -0
  830. esphome/components/epaper_spi/models/__init__.py +65 -0
  831. esphome/components/epaper_spi/models/spectra_e6.py +55 -0
  832. esphome/components/epaper_spi/models/ssd1677.py +42 -0
  833. esphome/components/es7210/__init__.py +0 -0
  834. esphome/components/es7210/audio_adc.py +51 -0
  835. esphome/components/es7210/es7210.cpp +228 -0
  836. esphome/components/es7210/es7210.h +61 -0
  837. esphome/components/es7210/es7210_const.h +129 -0
  838. esphome/components/es7243e/__init__.py +0 -0
  839. esphome/components/es7243e/audio_adc.py +34 -0
  840. esphome/components/es7243e/es7243e.cpp +123 -0
  841. esphome/components/es7243e/es7243e.h +36 -0
  842. esphome/components/es7243e/es7243e_const.h +54 -0
  843. esphome/components/es8156/__init__.py +0 -0
  844. esphome/components/es8156/audio_dac.py +27 -0
  845. esphome/components/es8156/es8156.cpp +85 -0
  846. esphome/components/es8156/es8156.h +50 -0
  847. esphome/components/es8156/es8156_const.h +68 -0
  848. esphome/components/es8311/__init__.py +0 -0
  849. esphome/components/es8311/audio_dac.py +67 -0
  850. esphome/components/es8311/es8311.cpp +227 -0
  851. esphome/components/es8311/es8311.h +134 -0
  852. esphome/components/es8311/es8311_const.h +195 -0
  853. esphome/components/es8388/__init__.py +0 -0
  854. esphome/components/es8388/audio_dac.py +26 -0
  855. esphome/components/es8388/es8388.cpp +287 -0
  856. esphome/components/es8388/es8388.h +80 -0
  857. esphome/components/es8388/es8388_const.h +83 -0
  858. esphome/components/es8388/select/__init__.py +47 -0
  859. esphome/components/es8388/select/adc_input_mic_select.cpp +12 -0
  860. esphome/components/es8388/select/adc_input_mic_select.h +15 -0
  861. esphome/components/es8388/select/dac_output_select.cpp +12 -0
  862. esphome/components/es8388/select/dac_output_select.h +15 -0
  863. esphome/components/esp32/__init__.py +1323 -0
  864. esphome/components/esp32/boards.py +2536 -0
  865. esphome/components/esp32/const.py +51 -0
  866. esphome/components/esp32/core.cpp +114 -0
  867. esphome/components/esp32/gpio.cpp +209 -0
  868. esphome/components/esp32/gpio.h +57 -0
  869. esphome/components/esp32/gpio.py +239 -0
  870. esphome/components/esp32/gpio_esp32.py +70 -0
  871. esphome/components/esp32/gpio_esp32_c2.py +32 -0
  872. esphome/components/esp32/gpio_esp32_c3.py +45 -0
  873. esphome/components/esp32/gpio_esp32_c5.py +58 -0
  874. esphome/components/esp32/gpio_esp32_c6.py +58 -0
  875. esphome/components/esp32/gpio_esp32_c61.py +46 -0
  876. esphome/components/esp32/gpio_esp32_h2.py +47 -0
  877. esphome/components/esp32/gpio_esp32_p4.py +52 -0
  878. esphome/components/esp32/gpio_esp32_s2.py +74 -0
  879. esphome/components/esp32/gpio_esp32_s3.py +64 -0
  880. esphome/components/esp32/helpers.cpp +109 -0
  881. esphome/components/esp32/iram_fix.py.script +71 -0
  882. esphome/components/esp32/post_build.py.script +128 -0
  883. esphome/components/esp32/pre_build.py.script +9 -0
  884. esphome/components/esp32/preferences.cpp +209 -0
  885. esphome/components/esp32/preferences.h +12 -0
  886. esphome/components/esp32_ble/__init__.py +553 -0
  887. esphome/components/esp32_ble/ble.cpp +673 -0
  888. esphome/components/esp32_ble/ble.h +230 -0
  889. esphome/components/esp32_ble/ble_advertising.cpp +170 -0
  890. esphome/components/esp32_ble/ble_advertising.h +69 -0
  891. esphome/components/esp32_ble/ble_event.h +467 -0
  892. esphome/components/esp32_ble/ble_scan_result.h +22 -0
  893. esphome/components/esp32_ble/ble_uuid.cpp +190 -0
  894. esphome/components/esp32_ble/ble_uuid.h +48 -0
  895. esphome/components/esp32_ble_beacon/__init__.py +90 -0
  896. esphome/components/esp32_ble_beacon/esp32_ble_beacon.cpp +127 -0
  897. esphome/components/esp32_ble_beacon/esp32_ble_beacon.h +71 -0
  898. esphome/components/esp32_ble_client/__init__.py +11 -0
  899. esphome/components/esp32_ble_client/ble_characteristic.cpp +99 -0
  900. esphome/components/esp32_ble_client/ble_characteristic.h +41 -0
  901. esphome/components/esp32_ble_client/ble_client_base.cpp +683 -0
  902. esphome/components/esp32_ble_client/ble_client_base.h +148 -0
  903. esphome/components/esp32_ble_client/ble_descriptor.h +27 -0
  904. esphome/components/esp32_ble_client/ble_service.cpp +77 -0
  905. esphome/components/esp32_ble_client/ble_service.h +38 -0
  906. esphome/components/esp32_ble_server/__init__.py +649 -0
  907. esphome/components/esp32_ble_server/ble_2902.cpp +20 -0
  908. esphome/components/esp32_ble_server/ble_2902.h +18 -0
  909. esphome/components/esp32_ble_server/ble_characteristic.cpp +328 -0
  910. esphome/components/esp32_ble_server/ble_characteristic.h +120 -0
  911. esphome/components/esp32_ble_server/ble_descriptor.cpp +93 -0
  912. esphome/components/esp32_ble_server/ble_descriptor.h +69 -0
  913. esphome/components/esp32_ble_server/ble_server.cpp +239 -0
  914. esphome/components/esp32_ble_server/ble_server.h +116 -0
  915. esphome/components/esp32_ble_server/ble_server_automations.cpp +93 -0
  916. esphome/components/esp32_ble_server/ble_server_automations.h +130 -0
  917. esphome/components/esp32_ble_server/ble_service.cpp +179 -0
  918. esphome/components/esp32_ble_server/ble_service.h +86 -0
  919. esphome/components/esp32_ble_tracker/__init__.py +451 -0
  920. esphome/components/esp32_ble_tracker/automation.h +115 -0
  921. esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp +868 -0
  922. esphome/components/esp32_ble_tracker/esp32_ble_tracker.h +389 -0
  923. esphome/components/esp32_camera/__init__.py +368 -0
  924. esphome/components/esp32_camera/esp32_camera.cpp +443 -0
  925. esphome/components/esp32_camera/esp32_camera.h +247 -0
  926. esphome/components/esp32_camera_web_server/__init__.py +44 -0
  927. esphome/components/esp32_camera_web_server/camera_web_server.cpp +248 -0
  928. esphome/components/esp32_camera_web_server/camera_web_server.h +54 -0
  929. esphome/components/esp32_can/__init__.py +0 -0
  930. esphome/components/esp32_can/canbus.py +130 -0
  931. esphome/components/esp32_can/esp32_can.cpp +177 -0
  932. esphome/components/esp32_can/esp32_can.h +40 -0
  933. esphome/components/esp32_dac/__init__.py +0 -0
  934. esphome/components/esp32_dac/esp32_dac.cpp +47 -0
  935. esphome/components/esp32_dac/esp32_dac.h +36 -0
  936. esphome/components/esp32_dac/output.py +46 -0
  937. esphome/components/esp32_hall/__init__.py +0 -0
  938. esphome/components/esp32_hall/sensor.py +5 -0
  939. esphome/components/esp32_hosted/__init__.py +107 -0
  940. esphome/components/esp32_hosted/esp32_hosted.py.script +12 -0
  941. esphome/components/esp32_hosted/update/__init__.py +78 -0
  942. esphome/components/esp32_hosted/update/esp32_hosted_update.cpp +169 -0
  943. esphome/components/esp32_hosted/update/esp32_hosted_update.h +32 -0
  944. esphome/components/esp32_improv/__init__.py +158 -0
  945. esphome/components/esp32_improv/automation.h +72 -0
  946. esphome/components/esp32_improv/esp32_improv_component.cpp +482 -0
  947. esphome/components/esp32_improv/esp32_improv_component.h +130 -0
  948. esphome/components/esp32_rmt/__init__.py +22 -0
  949. esphome/components/esp32_rmt_led_strip/__init__.py +0 -0
  950. esphome/components/esp32_rmt_led_strip/led_strip.cpp +309 -0
  951. esphome/components/esp32_rmt_led_strip/led_strip.h +106 -0
  952. esphome/components/esp32_rmt_led_strip/light.py +170 -0
  953. esphome/components/esp32_touch/__init__.py +325 -0
  954. esphome/components/esp32_touch/binary_sensor.py +36 -0
  955. esphome/components/esp32_touch/esp32_touch.h +271 -0
  956. esphome/components/esp32_touch/esp32_touch_common.cpp +164 -0
  957. esphome/components/esp32_touch/esp32_touch_v1.cpp +244 -0
  958. esphome/components/esp32_touch/esp32_touch_v2.cpp +401 -0
  959. esphome/components/esp8266/__init__.py +280 -0
  960. esphome/components/esp8266/boards.py +362 -0
  961. esphome/components/esp8266/const.py +11 -0
  962. esphome/components/esp8266/core.cpp +73 -0
  963. esphome/components/esp8266/core.h +12 -0
  964. esphome/components/esp8266/gpio.cpp +183 -0
  965. esphome/components/esp8266/gpio.h +37 -0
  966. esphome/components/esp8266/gpio.py +212 -0
  967. esphome/components/esp8266/helpers.cpp +35 -0
  968. esphome/components/esp8266/post_build.py.script +23 -0
  969. esphome/components/esp8266/preferences.cpp +293 -0
  970. esphome/components/esp8266/preferences.h +12 -0
  971. esphome/components/esp8266/testing_mode.py.script +166 -0
  972. esphome/components/esp8266_pwm/__init__.py +0 -0
  973. esphome/components/esp8266_pwm/esp8266_pwm.cpp +57 -0
  974. esphome/components/esp8266_pwm/esp8266_pwm.h +54 -0
  975. esphome/components/esp8266_pwm/output.py +63 -0
  976. esphome/components/esp_ldo/__init__.py +93 -0
  977. esphome/components/esp_ldo/esp_ldo.cpp +43 -0
  978. esphome/components/esp_ldo/esp_ldo.h +46 -0
  979. esphome/components/esphome/ota/__init__.py +166 -0
  980. esphome/components/esphome/ota/ota_esphome.cpp +802 -0
  981. esphome/components/esphome/ota/ota_esphome.h +103 -0
  982. esphome/components/espnow/__init__.py +314 -0
  983. esphome/components/espnow/automation.h +175 -0
  984. esphome/components/espnow/espnow_component.cpp +486 -0
  985. esphome/components/espnow/espnow_component.h +183 -0
  986. esphome/components/espnow/espnow_err.h +19 -0
  987. esphome/components/espnow/espnow_packet.h +166 -0
  988. esphome/components/espnow/packet_transport/__init__.py +39 -0
  989. esphome/components/espnow/packet_transport/espnow_transport.cpp +97 -0
  990. esphome/components/espnow/packet_transport/espnow_transport.h +44 -0
  991. esphome/components/ethernet/__init__.py +470 -0
  992. esphome/components/ethernet/esp_eth_phy_jl1101.c +344 -0
  993. esphome/components/ethernet/ethernet_component.cpp +813 -0
  994. esphome/components/ethernet/ethernet_component.h +180 -0
  995. esphome/components/ethernet_info/__init__.py +1 -0
  996. esphome/components/ethernet_info/ethernet_info_text_sensor.cpp +18 -0
  997. esphome/components/ethernet_info/ethernet_info_text_sensor.h +70 -0
  998. esphome/components/ethernet_info/text_sensor.py +64 -0
  999. esphome/components/event/__init__.py +143 -0
  1000. esphome/components/event/automation.h +25 -0
  1001. esphome/components/event/event.cpp +53 -0
  1002. esphome/components/event/event.h +63 -0
  1003. esphome/components/exposure_notifications/__init__.py +39 -0
  1004. esphome/components/exposure_notifications/exposure_notifications.cpp +49 -0
  1005. esphome/components/exposure_notifications/exposure_notifications.h +29 -0
  1006. esphome/components/external_components/__init__.py +118 -0
  1007. esphome/components/ezo/__init__.py +0 -0
  1008. esphome/components/ezo/automation.h +53 -0
  1009. esphome/components/ezo/ezo.cpp +235 -0
  1010. esphome/components/ezo/ezo.h +110 -0
  1011. esphome/components/ezo/sensor.py +114 -0
  1012. esphome/components/ezo_pmp/__init__.py +296 -0
  1013. esphome/components/ezo_pmp/binary_sensor.py +42 -0
  1014. esphome/components/ezo_pmp/ezo_pmp.cpp +543 -0
  1015. esphome/components/ezo_pmp/ezo_pmp.h +251 -0
  1016. esphome/components/ezo_pmp/sensor.py +103 -0
  1017. esphome/components/ezo_pmp/text_sensor.py +35 -0
  1018. esphome/components/factory_reset/__init__.py +97 -0
  1019. esphome/components/factory_reset/button/__init__.py +28 -0
  1020. esphome/components/factory_reset/button/factory_reset_button.cpp +38 -0
  1021. esphome/components/factory_reset/button/factory_reset_button.h +23 -0
  1022. esphome/components/factory_reset/factory_reset.cpp +76 -0
  1023. esphome/components/factory_reset/factory_reset.h +43 -0
  1024. esphome/components/factory_reset/switch/__init__.py +22 -0
  1025. esphome/components/factory_reset/switch/factory_reset_switch.cpp +43 -0
  1026. esphome/components/factory_reset/switch/factory_reset_switch.h +22 -0
  1027. esphome/components/fan/__init__.py +398 -0
  1028. esphome/components/fan/automation.h +231 -0
  1029. esphome/components/fan/fan.cpp +276 -0
  1030. esphome/components/fan/fan.h +165 -0
  1031. esphome/components/fan/fan_traits.h +69 -0
  1032. esphome/components/fastled_base/__init__.py +45 -0
  1033. esphome/components/fastled_base/fastled_light.cpp +44 -0
  1034. esphome/components/fastled_base/fastled_light.h +243 -0
  1035. esphome/components/fastled_clockless/__init__.py +0 -0
  1036. esphome/components/fastled_clockless/light.py +85 -0
  1037. esphome/components/fastled_spi/__init__.py +0 -0
  1038. esphome/components/fastled_spi/light.py +75 -0
  1039. esphome/components/feedback/__init__.py +1 -0
  1040. esphome/components/feedback/cover.py +162 -0
  1041. esphome/components/feedback/feedback_cover.cpp +447 -0
  1042. esphome/components/feedback/feedback_cover.h +89 -0
  1043. esphome/components/fingerprint_grow/__init__.py +372 -0
  1044. esphome/components/fingerprint_grow/binary_sensor.py +21 -0
  1045. esphome/components/fingerprint_grow/fingerprint_grow.cpp +576 -0
  1046. esphome/components/fingerprint_grow/fingerprint_grow.h +336 -0
  1047. esphome/components/fingerprint_grow/sensor.py +74 -0
  1048. esphome/components/font/__init__.py +625 -0
  1049. esphome/components/font/font.cpp +288 -0
  1050. esphome/components/font/font.h +102 -0
  1051. esphome/components/fs3000/__init__.py +0 -0
  1052. esphome/components/fs3000/fs3000.cpp +105 -0
  1053. esphome/components/fs3000/fs3000.h +34 -0
  1054. esphome/components/fs3000/sensor.py +46 -0
  1055. esphome/components/ft5x06/__init__.py +6 -0
  1056. esphome/components/ft5x06/touchscreen/__init__.py +32 -0
  1057. esphome/components/ft5x06/touchscreen/ft5x06_touchscreen.cpp +103 -0
  1058. esphome/components/ft5x06/touchscreen/ft5x06_touchscreen.h +56 -0
  1059. esphome/components/ft63x6/__init__.py +1 -0
  1060. esphome/components/ft63x6/ft63x6.cpp +137 -0
  1061. esphome/components/ft63x6/ft63x6.h +51 -0
  1062. esphome/components/ft63x6/touchscreen.py +44 -0
  1063. esphome/components/fujitsu_general/__init__.py +0 -0
  1064. esphome/components/fujitsu_general/climate.py +15 -0
  1065. esphome/components/fujitsu_general/fujitsu_general.cpp +404 -0
  1066. esphome/components/fujitsu_general/fujitsu_general.h +82 -0
  1067. esphome/components/gcja5/__init__.py +1 -0
  1068. esphome/components/gcja5/gcja5.cpp +109 -0
  1069. esphome/components/gcja5/gcja5.h +56 -0
  1070. esphome/components/gcja5/sensor.py +118 -0
  1071. esphome/components/gdk101/__init__.py +32 -0
  1072. esphome/components/gdk101/binary_sensor.py +30 -0
  1073. esphome/components/gdk101/gdk101.cpp +191 -0
  1074. esphome/components/gdk101/gdk101.h +57 -0
  1075. esphome/components/gdk101/sensor.py +79 -0
  1076. esphome/components/gdk101/text_sensor.py +23 -0
  1077. esphome/components/gl_r01_i2c/__init__.py +0 -0
  1078. esphome/components/gl_r01_i2c/gl_r01_i2c.cpp +67 -0
  1079. esphome/components/gl_r01_i2c/gl_r01_i2c.h +22 -0
  1080. esphome/components/gl_r01_i2c/sensor.py +36 -0
  1081. esphome/components/globals/__init__.py +88 -0
  1082. esphome/components/globals/globals_component.h +148 -0
  1083. esphome/components/gp2y1010au0f/__init__.py +0 -0
  1084. esphome/components/gp2y1010au0f/gp2y1010au0f.cpp +69 -0
  1085. esphome/components/gp2y1010au0f/gp2y1010au0f.h +52 -0
  1086. esphome/components/gp2y1010au0f/sensor.py +61 -0
  1087. esphome/components/gp8403/__init__.py +46 -0
  1088. esphome/components/gp8403/gp8403.cpp +55 -0
  1089. esphome/components/gp8403/gp8403.h +35 -0
  1090. esphome/components/gp8403/output/__init__.py +30 -0
  1091. esphome/components/gp8403/output/gp8403_output.cpp +20 -0
  1092. esphome/components/gp8403/output/gp8403_output.h +23 -0
  1093. esphome/components/gpio/__init__.py +4 -0
  1094. esphome/components/gpio/binary_sensor/__init__.py +102 -0
  1095. esphome/components/gpio/binary_sensor/gpio_binary_sensor.cpp +101 -0
  1096. esphome/components/gpio/binary_sensor/gpio_binary_sensor.h +68 -0
  1097. esphome/components/gpio/one_wire/__init__.py +26 -0
  1098. esphome/components/gpio/one_wire/gpio_one_wire.cpp +206 -0
  1099. esphome/components/gpio/one_wire/gpio_one_wire.h +42 -0
  1100. esphome/components/gpio/output/__init__.py +25 -0
  1101. esphome/components/gpio/output/gpio_binary_output.cpp +16 -0
  1102. esphome/components/gpio/output/gpio_binary_output.h +29 -0
  1103. esphome/components/gpio/switch/__init__.py +40 -0
  1104. esphome/components/gpio/switch/gpio_switch.cpp +73 -0
  1105. esphome/components/gpio/switch/gpio_switch.h +33 -0
  1106. esphome/components/gpio_expander/__init__.py +0 -0
  1107. esphome/components/gpio_expander/cached_gpio.h +82 -0
  1108. esphome/components/gps/__init__.py +130 -0
  1109. esphome/components/gps/gps.cpp +95 -0
  1110. esphome/components/gps/gps.h +71 -0
  1111. esphome/components/gps/time/__init__.py +28 -0
  1112. esphome/components/gps/time/gps_time.cpp +32 -0
  1113. esphome/components/gps/time/gps_time.h +25 -0
  1114. esphome/components/graph/__init__.py +219 -0
  1115. esphome/components/graph/graph.cpp +397 -0
  1116. esphome/components/graph/graph.h +187 -0
  1117. esphome/components/graphical_display_menu/__init__.py +100 -0
  1118. esphome/components/graphical_display_menu/graphical_display_menu.cpp +250 -0
  1119. esphome/components/graphical_display_menu/graphical_display_menu.h +84 -0
  1120. esphome/components/gree/__init__.py +3 -0
  1121. esphome/components/gree/climate.py +33 -0
  1122. esphome/components/gree/gree.cpp +252 -0
  1123. esphome/components/gree/gree.h +109 -0
  1124. esphome/components/gree/switch/__init__.py +74 -0
  1125. esphome/components/gree/switch/gree_switch.cpp +24 -0
  1126. esphome/components/gree/switch/gree_switch.h +24 -0
  1127. esphome/components/grove_gas_mc_v2/__init__.py +0 -0
  1128. esphome/components/grove_gas_mc_v2/grove_gas_mc_v2.cpp +86 -0
  1129. esphome/components/grove_gas_mc_v2/grove_gas_mc_v2.h +37 -0
  1130. esphome/components/grove_gas_mc_v2/sensor.py +77 -0
  1131. esphome/components/grove_tb6612fng/__init__.py +176 -0
  1132. esphome/components/grove_tb6612fng/grove_tb6612fng.cpp +170 -0
  1133. esphome/components/grove_tb6612fng/grove_tb6612fng.h +215 -0
  1134. esphome/components/growatt_solar/__init__.py +0 -0
  1135. esphome/components/growatt_solar/growatt_solar.cpp +145 -0
  1136. esphome/components/growatt_solar/growatt_solar.h +87 -0
  1137. esphome/components/growatt_solar/sensor.py +212 -0
  1138. esphome/components/gt911/__init__.py +6 -0
  1139. esphome/components/gt911/binary_sensor/__init__.py +31 -0
  1140. esphome/components/gt911/binary_sensor/gt911_button.cpp +27 -0
  1141. esphome/components/gt911/binary_sensor/gt911_button.h +28 -0
  1142. esphome/components/gt911/touchscreen/__init__.py +33 -0
  1143. esphome/components/gt911/touchscreen/gt911_touchscreen.cpp +146 -0
  1144. esphome/components/gt911/touchscreen/gt911_touchscreen.h +59 -0
  1145. esphome/components/haier/__init__.py +0 -0
  1146. esphome/components/haier/automation.h +130 -0
  1147. esphome/components/haier/binary_sensor/__init__.py +65 -0
  1148. esphome/components/haier/button/__init__.py +38 -0
  1149. esphome/components/haier/button/self_cleaning.cpp +9 -0
  1150. esphome/components/haier/button/self_cleaning.h +18 -0
  1151. esphome/components/haier/button/steri_cleaning.cpp +9 -0
  1152. esphome/components/haier/button/steri_cleaning.h +18 -0
  1153. esphome/components/haier/climate.py +521 -0
  1154. esphome/components/haier/haier_base.cpp +427 -0
  1155. esphome/components/haier/haier_base.h +186 -0
  1156. esphome/components/haier/hon_climate.cpp +1384 -0
  1157. esphome/components/haier/hon_climate.h +214 -0
  1158. esphome/components/haier/hon_packet.h +260 -0
  1159. esphome/components/haier/logger_handler.cpp +33 -0
  1160. esphome/components/haier/logger_handler.h +14 -0
  1161. esphome/components/haier/sensor/__init__.py +150 -0
  1162. esphome/components/haier/smartair2_climate.cpp +553 -0
  1163. esphome/components/haier/smartair2_climate.h +40 -0
  1164. esphome/components/haier/smartair2_packet.h +88 -0
  1165. esphome/components/haier/switch/__init__.py +88 -0
  1166. esphome/components/haier/switch/beeper.cpp +14 -0
  1167. esphome/components/haier/switch/beeper.h +18 -0
  1168. esphome/components/haier/switch/display.cpp +14 -0
  1169. esphome/components/haier/switch/display.h +18 -0
  1170. esphome/components/haier/switch/health_mode.cpp +14 -0
  1171. esphome/components/haier/switch/health_mode.h +18 -0
  1172. esphome/components/haier/switch/quiet_mode.cpp +14 -0
  1173. esphome/components/haier/switch/quiet_mode.h +18 -0
  1174. esphome/components/haier/text_sensor/__init__.py +49 -0
  1175. esphome/components/havells_solar/__init__.py +0 -0
  1176. esphome/components/havells_solar/havells_solar.cpp +168 -0
  1177. esphome/components/havells_solar/havells_solar.h +117 -0
  1178. esphome/components/havells_solar/havells_solar_registers.h +49 -0
  1179. esphome/components/havells_solar/sensor.py +291 -0
  1180. esphome/components/hbridge/__init__.py +3 -0
  1181. esphome/components/hbridge/fan/__init__.py +78 -0
  1182. esphome/components/hbridge/fan/hbridge_fan.cpp +94 -0
  1183. esphome/components/hbridge/fan/hbridge_fan.h +58 -0
  1184. esphome/components/hbridge/light/__init__.py +31 -0
  1185. esphome/components/hbridge/light/hbridge_light_output.h +58 -0
  1186. esphome/components/hbridge/switch/__init__.py +44 -0
  1187. esphome/components/hbridge/switch/hbridge_switch.cpp +93 -0
  1188. esphome/components/hbridge/switch/hbridge_switch.h +50 -0
  1189. esphome/components/hc8/__init__.py +1 -0
  1190. esphome/components/hc8/hc8.cpp +99 -0
  1191. esphome/components/hc8/hc8.h +37 -0
  1192. esphome/components/hc8/sensor.py +79 -0
  1193. esphome/components/hdc1080/__init__.py +0 -0
  1194. esphome/components/hdc1080/hdc1080.cpp +82 -0
  1195. esphome/components/hdc1080/hdc1080.h +27 -0
  1196. esphome/components/hdc1080/sensor.py +56 -0
  1197. esphome/components/hdc2010/__init__.py +1 -0
  1198. esphome/components/hdc2010/hdc2010.cpp +111 -0
  1199. esphome/components/hdc2010/hdc2010.h +32 -0
  1200. esphome/components/hdc2010/sensor.py +56 -0
  1201. esphome/components/he60r/__init__.py +1 -0
  1202. esphome/components/he60r/cover.py +42 -0
  1203. esphome/components/he60r/he60r.cpp +265 -0
  1204. esphome/components/he60r/he60r.h +45 -0
  1205. esphome/components/heatpumpir/__init__.py +0 -0
  1206. esphome/components/heatpumpir/climate.py +131 -0
  1207. esphome/components/heatpumpir/heatpumpir.cpp +213 -0
  1208. esphome/components/heatpumpir/heatpumpir.h +132 -0
  1209. esphome/components/heatpumpir/ir_sender_esphome.cpp +32 -0
  1210. esphome/components/heatpumpir/ir_sender_esphome.h +25 -0
  1211. esphome/components/hitachi_ac344/__init__.py +0 -0
  1212. esphome/components/hitachi_ac344/climate.py +13 -0
  1213. esphome/components/hitachi_ac344/hitachi_ac344.cpp +370 -0
  1214. esphome/components/hitachi_ac344/hitachi_ac344.h +121 -0
  1215. esphome/components/hitachi_ac424/__init__.py +1 -0
  1216. esphome/components/hitachi_ac424/climate.py +13 -0
  1217. esphome/components/hitachi_ac424/hitachi_ac424.cpp +371 -0
  1218. esphome/components/hitachi_ac424/hitachi_ac424.h +123 -0
  1219. esphome/components/hlk_fm22x/__init__.py +247 -0
  1220. esphome/components/hlk_fm22x/binary_sensor.py +21 -0
  1221. esphome/components/hlk_fm22x/hlk_fm22x.cpp +325 -0
  1222. esphome/components/hlk_fm22x/hlk_fm22x.h +224 -0
  1223. esphome/components/hlk_fm22x/sensor.py +47 -0
  1224. esphome/components/hlk_fm22x/text_sensor.py +42 -0
  1225. esphome/components/hlw8012/__init__.py +0 -0
  1226. esphome/components/hlw8012/hlw8012.cpp +109 -0
  1227. esphome/components/hlw8012/hlw8012.h +77 -0
  1228. esphome/components/hlw8012/sensor.py +124 -0
  1229. esphome/components/hlw8032/__init__.py +1 -0
  1230. esphome/components/hlw8032/hlw8032.cpp +194 -0
  1231. esphome/components/hlw8032/hlw8032.h +44 -0
  1232. esphome/components/hlw8032/sensor.py +93 -0
  1233. esphome/components/hm3301/__init__.py +0 -0
  1234. esphome/components/hm3301/abstract_aqi_calculator.h +14 -0
  1235. esphome/components/hm3301/aqi_calculator.h +50 -0
  1236. esphome/components/hm3301/aqi_calculator_factory.h +29 -0
  1237. esphome/components/hm3301/caqi_calculator.h +52 -0
  1238. esphome/components/hm3301/hm3301.cpp +100 -0
  1239. esphome/components/hm3301/hm3301.h +52 -0
  1240. esphome/components/hm3301/sensor.py +111 -0
  1241. esphome/components/hmac_md5/__init__.py +2 -0
  1242. esphome/components/hmac_md5/hmac_md5.cpp +58 -0
  1243. esphome/components/hmac_md5/hmac_md5.h +49 -0
  1244. esphome/components/hmc5883l/__init__.py +0 -0
  1245. esphome/components/hmc5883l/hmc5883l.cpp +145 -0
  1246. esphome/components/hmc5883l/hmc5883l.h +70 -0
  1247. esphome/components/hmc5883l/sensor.py +142 -0
  1248. esphome/components/homeassistant/__init__.py +41 -0
  1249. esphome/components/homeassistant/binary_sensor/__init__.py +24 -0
  1250. esphome/components/homeassistant/binary_sensor/homeassistant_binary_sensor.cpp +47 -0
  1251. esphome/components/homeassistant/binary_sensor/homeassistant_binary_sensor.h +24 -0
  1252. esphome/components/homeassistant/number/__init__.py +34 -0
  1253. esphome/components/homeassistant/number/homeassistant_number.cpp +103 -0
  1254. esphome/components/homeassistant/number/homeassistant_number.h +31 -0
  1255. esphome/components/homeassistant/sensor/__init__.py +24 -0
  1256. esphome/components/homeassistant/sensor/homeassistant_sensor.cpp +38 -0
  1257. esphome/components/homeassistant/sensor/homeassistant_sensor.h +23 -0
  1258. esphome/components/homeassistant/switch/__init__.py +44 -0
  1259. esphome/components/homeassistant/switch/homeassistant_switch.cpp +63 -0
  1260. esphome/components/homeassistant/switch/homeassistant_switch.h +22 -0
  1261. esphome/components/homeassistant/text_sensor/__init__.py +24 -0
  1262. esphome/components/homeassistant/text_sensor/homeassistant_text_sensor.cpp +30 -0
  1263. esphome/components/homeassistant/text_sensor/homeassistant_text_sensor.h +23 -0
  1264. esphome/components/homeassistant/time/__init__.py +23 -0
  1265. esphome/components/homeassistant/time/homeassistant_time.cpp +22 -0
  1266. esphome/components/homeassistant/time/homeassistant_time.h +22 -0
  1267. esphome/components/honeywell_hih_i2c/__init__.py +3 -0
  1268. esphome/components/honeywell_hih_i2c/honeywell_hih.cpp +97 -0
  1269. esphome/components/honeywell_hih_i2c/honeywell_hih.h +34 -0
  1270. esphome/components/honeywell_hih_i2c/sensor.py +56 -0
  1271. esphome/components/honeywellabp/__init__.py +1 -0
  1272. esphome/components/honeywellabp/honeywellabp.cpp +101 -0
  1273. esphome/components/honeywellabp/honeywellabp.h +45 -0
  1274. esphome/components/honeywellabp/sensor.py +68 -0
  1275. esphome/components/honeywellabp2_i2c/__init__.py +3 -0
  1276. esphome/components/honeywellabp2_i2c/honeywellabp2.cpp +111 -0
  1277. esphome/components/honeywellabp2_i2c/honeywellabp2.h +59 -0
  1278. esphome/components/honeywellabp2_i2c/sensor.py +74 -0
  1279. esphome/components/host/__init__.py +50 -0
  1280. esphome/components/host/const.py +5 -0
  1281. esphome/components/host/core.cpp +77 -0
  1282. esphome/components/host/gpio.cpp +59 -0
  1283. esphome/components/host/gpio.h +38 -0
  1284. esphome/components/host/gpio.py +65 -0
  1285. esphome/components/host/helpers.cpp +57 -0
  1286. esphome/components/host/preferences.cpp +87 -0
  1287. esphome/components/host/preferences.h +67 -0
  1288. esphome/components/host/time/__init__.py +20 -0
  1289. esphome/components/host/time/host_time.h +15 -0
  1290. esphome/components/hrxl_maxsonar_wr/__init__.py +0 -0
  1291. esphome/components/hrxl_maxsonar_wr/hrxl_maxsonar_wr.cpp +77 -0
  1292. esphome/components/hrxl_maxsonar_wr/hrxl_maxsonar_wr.h +25 -0
  1293. esphome/components/hrxl_maxsonar_wr/sensor.py +29 -0
  1294. esphome/components/hte501/__init__.py +0 -0
  1295. esphome/components/hte501/hte501.cpp +71 -0
  1296. esphome/components/hte501/hte501.h +29 -0
  1297. esphome/components/hte501/sensor.py +58 -0
  1298. esphome/components/http_request/__init__.py +339 -0
  1299. esphome/components/http_request/http_request.cpp +46 -0
  1300. esphome/components/http_request/http_request.h +306 -0
  1301. esphome/components/http_request/http_request_arduino.cpp +183 -0
  1302. esphome/components/http_request/http_request_arduino.h +42 -0
  1303. esphome/components/http_request/http_request_host.cpp +145 -0
  1304. esphome/components/http_request/http_request_host.h +33 -0
  1305. esphome/components/http_request/http_request_idf.cpp +251 -0
  1306. esphome/components/http_request/http_request_idf.h +54 -0
  1307. esphome/components/http_request/httplib.h +9695 -0
  1308. esphome/components/http_request/ota/__init__.py +97 -0
  1309. esphome/components/http_request/ota/automation.h +42 -0
  1310. esphome/components/http_request/ota/ota_http_request.cpp +268 -0
  1311. esphome/components/http_request/ota/ota_http_request.h +61 -0
  1312. esphome/components/http_request/update/__init__.py +43 -0
  1313. esphome/components/http_request/update/http_request_update.cpp +205 -0
  1314. esphome/components/http_request/update/http_request_update.h +44 -0
  1315. esphome/components/htu21d/__init__.py +0 -0
  1316. esphome/components/htu21d/htu21d.cpp +149 -0
  1317. esphome/components/htu21d/htu21d.h +63 -0
  1318. esphome/components/htu21d/sensor.py +121 -0
  1319. esphome/components/htu31d/__init__.py +1 -0
  1320. esphome/components/htu31d/htu31d.cpp +269 -0
  1321. esphome/components/htu31d/htu31d.h +33 -0
  1322. esphome/components/htu31d/sensor.py +56 -0
  1323. esphome/components/hub75/__init__.py +6 -0
  1324. esphome/components/hub75/boards/__init__.py +80 -0
  1325. esphome/components/hub75/boards/adafruit.py +23 -0
  1326. esphome/components/hub75/boards/apollo.py +41 -0
  1327. esphome/components/hub75/boards/huidu.py +22 -0
  1328. esphome/components/hub75/boards/trinity.py +24 -0
  1329. esphome/components/hub75/display.py +578 -0
  1330. esphome/components/hub75/hub75.cpp +192 -0
  1331. esphome/components/hub75/hub75_component.h +55 -0
  1332. esphome/components/hx711/__init__.py +0 -0
  1333. esphome/components/hx711/hx711.cpp +82 -0
  1334. esphome/components/hx711/hx711.h +38 -0
  1335. esphome/components/hx711/sensor.py +45 -0
  1336. esphome/components/hydreon_rgxx/__init__.py +12 -0
  1337. esphome/components/hydreon_rgxx/binary_sensor.py +49 -0
  1338. esphome/components/hydreon_rgxx/hydreon_rgxx.cpp +290 -0
  1339. esphome/components/hydreon_rgxx/hydreon_rgxx.h +98 -0
  1340. esphome/components/hydreon_rgxx/sensor.py +156 -0
  1341. esphome/components/hyt271/__init__.py +1 -0
  1342. esphome/components/hyt271/hyt271.cpp +52 -0
  1343. esphome/components/hyt271/hyt271.h +27 -0
  1344. esphome/components/hyt271/sensor.py +56 -0
  1345. esphome/components/i2c/__init__.py +336 -0
  1346. esphome/components/i2c/i2c.cpp +122 -0
  1347. esphome/components/i2c/i2c.h +307 -0
  1348. esphome/components/i2c/i2c_bus.h +147 -0
  1349. esphome/components/i2c/i2c_bus_arduino.cpp +264 -0
  1350. esphome/components/i2c/i2c_bus_arduino.h +51 -0
  1351. esphome/components/i2c/i2c_bus_esp_idf.cpp +311 -0
  1352. esphome/components/i2c/i2c_bus_esp_idf.h +62 -0
  1353. esphome/components/i2c/i2c_bus_zephyr.cpp +134 -0
  1354. esphome/components/i2c/i2c_bus_zephyr.h +38 -0
  1355. esphome/components/i2c_device/__init__.py +26 -0
  1356. esphome/components/i2c_device/i2c_device.cpp +17 -0
  1357. esphome/components/i2c_device/i2c_device.h +17 -0
  1358. esphome/components/i2s_audio/__init__.py +284 -0
  1359. esphome/components/i2s_audio/i2s_audio.cpp +27 -0
  1360. esphome/components/i2s_audio/i2s_audio.h +115 -0
  1361. esphome/components/i2s_audio/media_player/__init__.py +120 -0
  1362. esphome/components/i2s_audio/media_player/i2s_audio_media_player.cpp +257 -0
  1363. esphome/components/i2s_audio/media_player/i2s_audio_media_player.h +87 -0
  1364. esphome/components/i2s_audio/microphone/__init__.py +146 -0
  1365. esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp +547 -0
  1366. esphome/components/i2s_audio/microphone/i2s_audio_microphone.h +92 -0
  1367. esphome/components/i2s_audio/speaker/__init__.py +199 -0
  1368. esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp +728 -0
  1369. esphome/components/i2s_audio/speaker/i2s_audio_speaker.h +143 -0
  1370. esphome/components/iaqcore/__init__.py +0 -0
  1371. esphome/components/iaqcore/iaqcore.cpp +99 -0
  1372. esphome/components/iaqcore/iaqcore.h +27 -0
  1373. esphome/components/iaqcore/sensor.py +57 -0
  1374. esphome/components/ili9341/__init__.py +0 -0
  1375. esphome/components/ili9341/display.py +5 -0
  1376. esphome/components/ili9xxx/__init__.py +0 -0
  1377. esphome/components/ili9xxx/display.py +313 -0
  1378. esphome/components/ili9xxx/ili9xxx_defines.h +100 -0
  1379. esphome/components/ili9xxx/ili9xxx_display.cpp +463 -0
  1380. esphome/components/ili9xxx/ili9xxx_display.h +287 -0
  1381. esphome/components/ili9xxx/ili9xxx_init.h +482 -0
  1382. esphome/components/image/__init__.py +760 -0
  1383. esphome/components/image/image.cpp +251 -0
  1384. esphome/components/image/image.h +65 -0
  1385. esphome/components/improv_base/__init__.py +45 -0
  1386. esphome/components/improv_base/improv_base.cpp +51 -0
  1387. esphome/components/improv_base/improv_base.h +23 -0
  1388. esphome/components/improv_serial/__init__.py +45 -0
  1389. esphome/components/improv_serial/improv_serial_component.cpp +315 -0
  1390. esphome/components/improv_serial/improv_serial_component.h +104 -0
  1391. esphome/components/ina219/__init__.py +0 -0
  1392. esphome/components/ina219/ina219.cpp +202 -0
  1393. esphome/components/ina219/ina219.h +40 -0
  1394. esphome/components/ina219/sensor.py +96 -0
  1395. esphome/components/ina226/__init__.py +1 -0
  1396. esphome/components/ina226/ina226.cpp +167 -0
  1397. esphome/components/ina226/ina226.h +78 -0
  1398. esphome/components/ina226/sensor.py +147 -0
  1399. esphome/components/ina260/__init__.py +0 -0
  1400. esphome/components/ina260/ina260.cpp +126 -0
  1401. esphome/components/ina260/ina260.h +37 -0
  1402. esphome/components/ina260/sensor.py +71 -0
  1403. esphome/components/ina2xx_base/__init__.py +257 -0
  1404. esphome/components/ina2xx_base/ina2xx_base.cpp +611 -0
  1405. esphome/components/ina2xx_base/ina2xx_base.h +255 -0
  1406. esphome/components/ina2xx_i2c/__init__.py +0 -0
  1407. esphome/components/ina2xx_i2c/ina2xx_i2c.cpp +39 -0
  1408. esphome/components/ina2xx_i2c/ina2xx_i2c.h +21 -0
  1409. esphome/components/ina2xx_i2c/sensor.py +34 -0
  1410. esphome/components/ina2xx_spi/__init__.py +0 -0
  1411. esphome/components/ina2xx_spi/ina2xx_spi.cpp +38 -0
  1412. esphome/components/ina2xx_spi/ina2xx_spi.h +22 -0
  1413. esphome/components/ina2xx_spi/sensor.py +33 -0
  1414. esphome/components/ina3221/__init__.py +0 -0
  1415. esphome/components/ina3221/ina3221.cpp +133 -0
  1416. esphome/components/ina3221/ina3221.h +40 -0
  1417. esphome/components/ina3221/sensor.py +99 -0
  1418. esphome/components/inkbird_ibsth1_mini/__init__.py +0 -0
  1419. esphome/components/inkbird_ibsth1_mini/inkbird_ibsth1_mini.cpp +110 -0
  1420. esphome/components/inkbird_ibsth1_mini/inkbird_ibsth1_mini.h +35 -0
  1421. esphome/components/inkbird_ibsth1_mini/sensor.py +83 -0
  1422. esphome/components/inkplate/__init__.py +1 -0
  1423. esphome/components/inkplate/const.py +105 -0
  1424. esphome/components/inkplate/display.py +246 -0
  1425. esphome/components/inkplate/inkplate.cpp +805 -0
  1426. esphome/components/inkplate/inkplate.h +214 -0
  1427. esphome/components/inkplate6/__init__.py +0 -0
  1428. esphome/components/inkplate6/display.py +5 -0
  1429. esphome/components/integration/__init__.py +1 -0
  1430. esphome/components/integration/integration_sensor.cpp +51 -0
  1431. esphome/components/integration/integration_sensor.h +85 -0
  1432. esphome/components/integration/sensor.py +115 -0
  1433. esphome/components/internal_temperature/__init__.py +1 -0
  1434. esphome/components/internal_temperature/internal_temperature.cpp +109 -0
  1435. esphome/components/internal_temperature/internal_temperature.h +18 -0
  1436. esphome/components/internal_temperature/sensor.py +34 -0
  1437. esphome/components/interval/__init__.py +32 -0
  1438. esphome/components/interval/interval.h +28 -0
  1439. esphome/components/jsn_sr04t/__init__.py +1 -0
  1440. esphome/components/jsn_sr04t/jsn_sr04t.cpp +64 -0
  1441. esphome/components/jsn_sr04t/jsn_sr04t.h +34 -0
  1442. esphome/components/jsn_sr04t/sensor.py +57 -0
  1443. esphome/components/json/__init__.py +17 -0
  1444. esphome/components/json/json_util.cpp +75 -0
  1445. esphome/components/json/json_util.h +86 -0
  1446. esphome/components/kalman_combinator/__init__.py +0 -0
  1447. esphome/components/kalman_combinator/sensor.py +6 -0
  1448. esphome/components/kamstrup_kmp/__init__.py +0 -0
  1449. esphome/components/kamstrup_kmp/kamstrup_kmp.cpp +301 -0
  1450. esphome/components/kamstrup_kmp/kamstrup_kmp.h +131 -0
  1451. esphome/components/kamstrup_kmp/sensor.py +132 -0
  1452. esphome/components/key_collector/__init__.py +131 -0
  1453. esphome/components/key_collector/key_collector.cpp +107 -0
  1454. esphome/components/key_collector/key_collector.h +63 -0
  1455. esphome/components/key_provider/__init__.py +6 -0
  1456. esphome/components/key_provider/key_provider.cpp +13 -0
  1457. esphome/components/key_provider/key_provider.h +21 -0
  1458. esphome/components/kmeteriso/__init__.py +0 -0
  1459. esphome/components/kmeteriso/kmeteriso.cpp +80 -0
  1460. esphome/components/kmeteriso/kmeteriso.h +34 -0
  1461. esphome/components/kmeteriso/sensor.py +55 -0
  1462. esphome/components/kuntze/__init__.py +0 -0
  1463. esphome/components/kuntze/kuntze.cpp +94 -0
  1464. esphome/components/kuntze/kuntze.h +42 -0
  1465. esphome/components/kuntze/sensor.py +123 -0
  1466. esphome/components/lc709203f/__init__.py +1 -0
  1467. esphome/components/lc709203f/lc709203f.cpp +284 -0
  1468. esphome/components/lc709203f/lc709203f.h +54 -0
  1469. esphome/components/lc709203f/sensor.py +93 -0
  1470. esphome/components/lcd_base/__init__.py +59 -0
  1471. esphome/components/lcd_base/lcd_display.cpp +177 -0
  1472. esphome/components/lcd_base/lcd_display.h +66 -0
  1473. esphome/components/lcd_gpio/__init__.py +0 -0
  1474. esphome/components/lcd_gpio/display.py +62 -0
  1475. esphome/components/lcd_gpio/gpio_lcd_display.cpp +67 -0
  1476. esphome/components/lcd_gpio/gpio_lcd_display.h +55 -0
  1477. esphome/components/lcd_menu/__init__.py +69 -0
  1478. esphome/components/lcd_menu/lcd_menu.cpp +76 -0
  1479. esphome/components/lcd_menu/lcd_menu.h +45 -0
  1480. esphome/components/lcd_pcf8574/__init__.py +0 -0
  1481. esphome/components/lcd_pcf8574/display.py +32 -0
  1482. esphome/components/lcd_pcf8574/pcf8574_display.cpp +60 -0
  1483. esphome/components/lcd_pcf8574/pcf8574_display.h +36 -0
  1484. esphome/components/ld2410/__init__.py +107 -0
  1485. esphome/components/ld2410/automation.h +20 -0
  1486. esphome/components/ld2410/binary_sensor.py +60 -0
  1487. esphome/components/ld2410/button/__init__.py +58 -0
  1488. esphome/components/ld2410/button/factory_reset_button.cpp +7 -0
  1489. esphome/components/ld2410/button/factory_reset_button.h +16 -0
  1490. esphome/components/ld2410/button/query_button.cpp +7 -0
  1491. esphome/components/ld2410/button/query_button.h +16 -0
  1492. esphome/components/ld2410/button/restart_button.cpp +7 -0
  1493. esphome/components/ld2410/button/restart_button.h +16 -0
  1494. esphome/components/ld2410/ld2410.cpp +784 -0
  1495. esphome/components/ld2410/ld2410.h +135 -0
  1496. esphome/components/ld2410/number/__init__.py +129 -0
  1497. esphome/components/ld2410/number/gate_threshold_number.cpp +12 -0
  1498. esphome/components/ld2410/number/gate_threshold_number.h +17 -0
  1499. esphome/components/ld2410/number/light_threshold_number.cpp +10 -0
  1500. esphome/components/ld2410/number/light_threshold_number.h +16 -0
  1501. esphome/components/ld2410/number/max_distance_timeout_number.cpp +10 -0
  1502. esphome/components/ld2410/number/max_distance_timeout_number.h +16 -0
  1503. esphome/components/ld2410/select/__init__.py +82 -0
  1504. esphome/components/ld2410/select/baud_rate_select.cpp +10 -0
  1505. esphome/components/ld2410/select/baud_rate_select.h +16 -0
  1506. esphome/components/ld2410/select/distance_resolution_select.cpp +10 -0
  1507. esphome/components/ld2410/select/distance_resolution_select.h +16 -0
  1508. esphome/components/ld2410/select/light_out_control_select.cpp +10 -0
  1509. esphome/components/ld2410/select/light_out_control_select.h +16 -0
  1510. esphome/components/ld2410/sensor.py +183 -0
  1511. esphome/components/ld2410/switch/__init__.py +45 -0
  1512. esphome/components/ld2410/switch/bluetooth_switch.cpp +10 -0
  1513. esphome/components/ld2410/switch/bluetooth_switch.h +16 -0
  1514. esphome/components/ld2410/switch/engineering_mode_switch.cpp +10 -0
  1515. esphome/components/ld2410/switch/engineering_mode_switch.h +16 -0
  1516. esphome/components/ld2410/text_sensor.py +34 -0
  1517. esphome/components/ld2412/__init__.py +46 -0
  1518. esphome/components/ld2412/binary_sensor.py +70 -0
  1519. esphome/components/ld2412/button/__init__.py +74 -0
  1520. esphome/components/ld2412/button/factory_reset_button.cpp +7 -0
  1521. esphome/components/ld2412/button/factory_reset_button.h +16 -0
  1522. esphome/components/ld2412/button/query_button.cpp +7 -0
  1523. esphome/components/ld2412/button/query_button.h +16 -0
  1524. esphome/components/ld2412/button/restart_button.cpp +7 -0
  1525. esphome/components/ld2412/button/restart_button.h +16 -0
  1526. esphome/components/ld2412/button/start_dynamic_background_correction_button.cpp +9 -0
  1527. esphome/components/ld2412/button/start_dynamic_background_correction_button.h +16 -0
  1528. esphome/components/ld2412/ld2412.cpp +857 -0
  1529. esphome/components/ld2412/ld2412.h +139 -0
  1530. esphome/components/ld2412/number/__init__.py +126 -0
  1531. esphome/components/ld2412/number/gate_threshold_number.cpp +12 -0
  1532. esphome/components/ld2412/number/gate_threshold_number.h +17 -0
  1533. esphome/components/ld2412/number/light_threshold_number.cpp +10 -0
  1534. esphome/components/ld2412/number/light_threshold_number.h +16 -0
  1535. esphome/components/ld2412/number/max_distance_timeout_number.cpp +10 -0
  1536. esphome/components/ld2412/number/max_distance_timeout_number.h +16 -0
  1537. esphome/components/ld2412/select/__init__.py +82 -0
  1538. esphome/components/ld2412/select/baud_rate_select.cpp +10 -0
  1539. esphome/components/ld2412/select/baud_rate_select.h +16 -0
  1540. esphome/components/ld2412/select/distance_resolution_select.cpp +10 -0
  1541. esphome/components/ld2412/select/distance_resolution_select.h +16 -0
  1542. esphome/components/ld2412/select/light_out_control_select.cpp +10 -0
  1543. esphome/components/ld2412/select/light_out_control_select.h +16 -0
  1544. esphome/components/ld2412/sensor.py +184 -0
  1545. esphome/components/ld2412/switch/__init__.py +45 -0
  1546. esphome/components/ld2412/switch/bluetooth_switch.cpp +10 -0
  1547. esphome/components/ld2412/switch/bluetooth_switch.h +16 -0
  1548. esphome/components/ld2412/switch/engineering_mode_switch.cpp +10 -0
  1549. esphome/components/ld2412/switch/engineering_mode_switch.h +16 -0
  1550. esphome/components/ld2412/text_sensor.py +34 -0
  1551. esphome/components/ld2420/__init__.py +39 -0
  1552. esphome/components/ld2420/binary_sensor/__init__.py +33 -0
  1553. esphome/components/ld2420/binary_sensor/ld2420_binary_sensor.cpp +14 -0
  1554. esphome/components/ld2420/binary_sensor/ld2420_binary_sensor.h +23 -0
  1555. esphome/components/ld2420/button/__init__.py +70 -0
  1556. esphome/components/ld2420/button/reconfig_buttons.cpp +14 -0
  1557. esphome/components/ld2420/button/reconfig_buttons.h +40 -0
  1558. esphome/components/ld2420/ld2420.cpp +900 -0
  1559. esphome/components/ld2420/ld2420.h +195 -0
  1560. esphome/components/ld2420/number/__init__.py +184 -0
  1561. esphome/components/ld2420/number/gate_config_number.cpp +71 -0
  1562. esphome/components/ld2420/number/gate_config_number.h +76 -0
  1563. esphome/components/ld2420/select/__init__.py +34 -0
  1564. esphome/components/ld2420/select/operating_mode_select.cpp +14 -0
  1565. esphome/components/ld2420/select/operating_mode_select.h +16 -0
  1566. esphome/components/ld2420/sensor/__init__.py +40 -0
  1567. esphome/components/ld2420/sensor/ld2420_sensor.cpp +14 -0
  1568. esphome/components/ld2420/sensor/ld2420_sensor.h +32 -0
  1569. esphome/components/ld2420/text_sensor/__init__.py +34 -0
  1570. esphome/components/ld2420/text_sensor/ld2420_text_sensor.cpp +14 -0
  1571. esphome/components/ld2420/text_sensor/ld2420_text_sensor.h +22 -0
  1572. esphome/components/ld2450/__init__.py +47 -0
  1573. esphome/components/ld2450/binary_sensor.py +50 -0
  1574. esphome/components/ld2450/button/__init__.py +45 -0
  1575. esphome/components/ld2450/button/factory_reset_button.cpp +7 -0
  1576. esphome/components/ld2450/button/factory_reset_button.h +16 -0
  1577. esphome/components/ld2450/button/restart_button.cpp +7 -0
  1578. esphome/components/ld2450/button/restart_button.h +16 -0
  1579. esphome/components/ld2450/ld2450.cpp +941 -0
  1580. esphome/components/ld2450/ld2450.h +195 -0
  1581. esphome/components/ld2450/number/__init__.py +121 -0
  1582. esphome/components/ld2450/number/presence_timeout_number.cpp +10 -0
  1583. esphome/components/ld2450/number/presence_timeout_number.h +16 -0
  1584. esphome/components/ld2450/number/zone_coordinate_number.cpp +12 -0
  1585. esphome/components/ld2450/number/zone_coordinate_number.h +17 -0
  1586. esphome/components/ld2450/select/__init__.py +56 -0
  1587. esphome/components/ld2450/select/baud_rate_select.cpp +10 -0
  1588. esphome/components/ld2450/select/baud_rate_select.h +16 -0
  1589. esphome/components/ld2450/select/zone_type_select.cpp +10 -0
  1590. esphome/components/ld2450/select/zone_type_select.h +16 -0
  1591. esphome/components/ld2450/sensor.py +270 -0
  1592. esphome/components/ld2450/switch/__init__.py +45 -0
  1593. esphome/components/ld2450/switch/bluetooth_switch.cpp +10 -0
  1594. esphome/components/ld2450/switch/bluetooth_switch.h +16 -0
  1595. esphome/components/ld2450/switch/multi_target_switch.cpp +10 -0
  1596. esphome/components/ld2450/switch/multi_target_switch.h +16 -0
  1597. esphome/components/ld2450/text_sensor.py +63 -0
  1598. esphome/components/ld24xx/__init__.py +1 -0
  1599. esphome/components/ld24xx/ld24xx.h +85 -0
  1600. esphome/components/ledc/__init__.py +1 -0
  1601. esphome/components/ledc/ledc_output.cpp +209 -0
  1602. esphome/components/ledc/ledc_output.h +62 -0
  1603. esphome/components/ledc/output.py +84 -0
  1604. esphome/components/libretiny/__init__.py +349 -0
  1605. esphome/components/libretiny/const.py +95 -0
  1606. esphome/components/libretiny/core.cpp +40 -0
  1607. esphome/components/libretiny/core.h +11 -0
  1608. esphome/components/libretiny/generate_components.py +330 -0
  1609. esphome/components/libretiny/gpio.py +207 -0
  1610. esphome/components/libretiny/gpio_arduino.cpp +105 -0
  1611. esphome/components/libretiny/gpio_arduino.h +37 -0
  1612. esphome/components/libretiny/helpers.cpp +39 -0
  1613. esphome/components/libretiny/lt_component.cpp +31 -0
  1614. esphome/components/libretiny/lt_component.h +36 -0
  1615. esphome/components/libretiny/preferences.cpp +196 -0
  1616. esphome/components/libretiny/preferences.h +13 -0
  1617. esphome/components/libretiny/text_sensor.py +31 -0
  1618. esphome/components/libretiny_pwm/__init__.py +1 -0
  1619. esphome/components/libretiny_pwm/libretiny_pwm.cpp +53 -0
  1620. esphome/components/libretiny_pwm/libretiny_pwm.h +55 -0
  1621. esphome/components/libretiny_pwm/output.py +45 -0
  1622. esphome/components/light/__init__.py +288 -0
  1623. esphome/components/light/addressable_light.cpp +114 -0
  1624. esphome/components/light/addressable_light.h +118 -0
  1625. esphome/components/light/addressable_light_effect.h +373 -0
  1626. esphome/components/light/addressable_light_wrapper.h +125 -0
  1627. esphome/components/light/automation.cpp +13 -0
  1628. esphome/components/light/automation.h +226 -0
  1629. esphome/components/light/automation.py +281 -0
  1630. esphome/components/light/base_light_effects.h +237 -0
  1631. esphome/components/light/color_mode.h +212 -0
  1632. esphome/components/light/effects.py +577 -0
  1633. esphome/components/light/esp_color_correction.cpp +25 -0
  1634. esphome/components/light/esp_color_correction.h +75 -0
  1635. esphome/components/light/esp_color_view.h +108 -0
  1636. esphome/components/light/esp_hsv_color.cpp +72 -0
  1637. esphome/components/light/esp_hsv_color.h +34 -0
  1638. esphome/components/light/esp_range_view.cpp +94 -0
  1639. esphome/components/light/esp_range_view.h +78 -0
  1640. esphome/components/light/light_call.cpp +652 -0
  1641. esphome/components/light/light_call.h +260 -0
  1642. esphome/components/light/light_color_values.h +312 -0
  1643. esphome/components/light/light_effect.cpp +34 -0
  1644. esphome/components/light/light_effect.h +57 -0
  1645. esphome/components/light/light_json_schema.cpp +174 -0
  1646. esphome/components/light/light_json_schema.h +26 -0
  1647. esphome/components/light/light_output.cpp +10 -0
  1648. esphome/components/light/light_output.h +31 -0
  1649. esphome/components/light/light_state.cpp +343 -0
  1650. esphome/components/light/light_state.h +333 -0
  1651. esphome/components/light/light_traits.h +47 -0
  1652. esphome/components/light/light_transformer.h +61 -0
  1653. esphome/components/light/transformers.h +120 -0
  1654. esphome/components/light/types.py +87 -0
  1655. esphome/components/lightwaverf/LwRx.cpp +427 -0
  1656. esphome/components/lightwaverf/LwRx.h +142 -0
  1657. esphome/components/lightwaverf/LwTx.cpp +208 -0
  1658. esphome/components/lightwaverf/LwTx.h +94 -0
  1659. esphome/components/lightwaverf/__init__.py +81 -0
  1660. esphome/components/lightwaverf/lightwaverf.cpp +65 -0
  1661. esphome/components/lightwaverf/lightwaverf.h +70 -0
  1662. esphome/components/lilygo_t5_47/__init__.py +3 -0
  1663. esphome/components/lilygo_t5_47/touchscreen/__init__.py +38 -0
  1664. esphome/components/lilygo_t5_47/touchscreen/lilygo_t5_47_touchscreen.cpp +104 -0
  1665. esphome/components/lilygo_t5_47/touchscreen/lilygo_t5_47_touchscreen.h +31 -0
  1666. esphome/components/lm75b/__init__.py +0 -0
  1667. esphome/components/lm75b/lm75b.cpp +39 -0
  1668. esphome/components/lm75b/lm75b.h +19 -0
  1669. esphome/components/lm75b/sensor.py +34 -0
  1670. esphome/components/ln882x/__init__.py +52 -0
  1671. esphome/components/ln882x/boards.py +285 -0
  1672. esphome/components/lock/__init__.py +155 -0
  1673. esphome/components/lock/automation.h +66 -0
  1674. esphome/components/lock/lock.cpp +109 -0
  1675. esphome/components/lock/lock.h +182 -0
  1676. esphome/components/logger/__init__.py +534 -0
  1677. esphome/components/logger/logger.cpp +299 -0
  1678. esphome/components/logger/logger.h +565 -0
  1679. esphome/components/logger/logger_esp32.cpp +167 -0
  1680. esphome/components/logger/logger_esp8266.cpp +54 -0
  1681. esphome/components/logger/logger_host.cpp +22 -0
  1682. esphome/components/logger/logger_libretiny.cpp +70 -0
  1683. esphome/components/logger/logger_rp2040.cpp +48 -0
  1684. esphome/components/logger/logger_zephyr.cpp +96 -0
  1685. esphome/components/logger/select/__init__.py +37 -0
  1686. esphome/components/logger/select/logger_level_select.cpp +19 -0
  1687. esphome/components/logger/select/logger_level_select.h +25 -0
  1688. esphome/components/logger/task_log_buffer.cpp +136 -0
  1689. esphome/components/logger/task_log_buffer.h +67 -0
  1690. esphome/components/lps22/__init__.py +0 -0
  1691. esphome/components/lps22/lps22.cpp +75 -0
  1692. esphome/components/lps22/lps22.h +27 -0
  1693. esphome/components/lps22/sensor.py +58 -0
  1694. esphome/components/ltr390/__init__.py +0 -0
  1695. esphome/components/ltr390/ltr390.cpp +206 -0
  1696. esphome/components/ltr390/ltr390.h +89 -0
  1697. esphome/components/ltr390/sensor.py +141 -0
  1698. esphome/components/ltr501/__init__.py +1 -0
  1699. esphome/components/ltr501/ltr501.cpp +547 -0
  1700. esphome/components/ltr501/ltr501.h +183 -0
  1701. esphome/components/ltr501/ltr_definitions_501.h +260 -0
  1702. esphome/components/ltr501/sensor.py +274 -0
  1703. esphome/components/ltr_als_ps/__init__.py +1 -0
  1704. esphome/components/ltr_als_ps/ltr_als_ps.cpp +526 -0
  1705. esphome/components/ltr_als_ps/ltr_als_ps.h +183 -0
  1706. esphome/components/ltr_als_ps/ltr_definitions.h +275 -0
  1707. esphome/components/ltr_als_ps/sensor.py +271 -0
  1708. esphome/components/lvgl/__init__.py +454 -0
  1709. esphome/components/lvgl/automation.py +416 -0
  1710. esphome/components/lvgl/binary_sensor/__init__.py +37 -0
  1711. esphome/components/lvgl/defines.py +596 -0
  1712. esphome/components/lvgl/encoders.py +81 -0
  1713. esphome/components/lvgl/gradient.py +61 -0
  1714. esphome/components/lvgl/helpers.py +76 -0
  1715. esphome/components/lvgl/keypads.py +77 -0
  1716. esphome/components/lvgl/layout.py +389 -0
  1717. esphome/components/lvgl/light/__init__.py +31 -0
  1718. esphome/components/lvgl/light/lvgl_light.h +48 -0
  1719. esphome/components/lvgl/lv_validation.py +538 -0
  1720. esphome/components/lvgl/lvcode.py +360 -0
  1721. esphome/components/lvgl/lvgl_esphome.cpp +616 -0
  1722. esphome/components/lvgl/lvgl_esphome.h +412 -0
  1723. esphome/components/lvgl/lvgl_hal.h +21 -0
  1724. esphome/components/lvgl/lvgl_proxy.h +17 -0
  1725. esphome/components/lvgl/number/__init__.py +66 -0
  1726. esphome/components/lvgl/number/lvgl_number.h +52 -0
  1727. esphome/components/lvgl/schemas.py +489 -0
  1728. esphome/components/lvgl/select/__init__.py +30 -0
  1729. esphome/components/lvgl/select/lvgl_select.h +75 -0
  1730. esphome/components/lvgl/sensor/__init__.py +41 -0
  1731. esphome/components/lvgl/styles.py +97 -0
  1732. esphome/components/lvgl/switch/__init__.py +58 -0
  1733. esphome/components/lvgl/switch/lvgl_switch.h +25 -0
  1734. esphome/components/lvgl/text/__init__.py +50 -0
  1735. esphome/components/lvgl/text/lvgl_text.h +36 -0
  1736. esphome/components/lvgl/text_sensor/__init__.py +43 -0
  1737. esphome/components/lvgl/touchscreens.py +44 -0
  1738. esphome/components/lvgl/trigger.py +111 -0
  1739. esphome/components/lvgl/types.py +245 -0
  1740. esphome/components/lvgl/widgets/__init__.py +470 -0
  1741. esphome/components/lvgl/widgets/animimg.py +112 -0
  1742. esphome/components/lvgl/widgets/arc.py +114 -0
  1743. esphome/components/lvgl/widgets/button.py +52 -0
  1744. esphome/components/lvgl/widgets/buttonmatrix.py +279 -0
  1745. esphome/components/lvgl/widgets/canvas.py +422 -0
  1746. esphome/components/lvgl/widgets/checkbox.py +31 -0
  1747. esphome/components/lvgl/widgets/container.py +39 -0
  1748. esphome/components/lvgl/widgets/dropdown.py +93 -0
  1749. esphome/components/lvgl/widgets/img.py +86 -0
  1750. esphome/components/lvgl/widgets/keyboard.py +56 -0
  1751. esphome/components/lvgl/widgets/label.py +41 -0
  1752. esphome/components/lvgl/widgets/led.py +29 -0
  1753. esphome/components/lvgl/widgets/line.py +50 -0
  1754. esphome/components/lvgl/widgets/lv_bar.py +76 -0
  1755. esphome/components/lvgl/widgets/meter.py +324 -0
  1756. esphome/components/lvgl/widgets/msgbox.py +148 -0
  1757. esphome/components/lvgl/widgets/obj.py +19 -0
  1758. esphome/components/lvgl/widgets/page.py +193 -0
  1759. esphome/components/lvgl/widgets/qrcode.py +51 -0
  1760. esphome/components/lvgl/widgets/roller.py +84 -0
  1761. esphome/components/lvgl/widgets/slider.py +63 -0
  1762. esphome/components/lvgl/widgets/spinbox.py +176 -0
  1763. esphome/components/lvgl/widgets/spinner.py +43 -0
  1764. esphome/components/lvgl/widgets/switch.py +20 -0
  1765. esphome/components/lvgl/widgets/tabview.py +121 -0
  1766. esphome/components/lvgl/widgets/textarea.py +65 -0
  1767. esphome/components/lvgl/widgets/tileview.py +131 -0
  1768. esphome/components/m5stack_8angle/__init__.py +32 -0
  1769. esphome/components/m5stack_8angle/binary_sensor/__init__.py +29 -0
  1770. esphome/components/m5stack_8angle/binary_sensor/m5stack_8angle_binary_sensor.cpp +17 -0
  1771. esphome/components/m5stack_8angle/binary_sensor/m5stack_8angle_binary_sensor.h +19 -0
  1772. esphome/components/m5stack_8angle/light/__init__.py +29 -0
  1773. esphome/components/m5stack_8angle/light/m5stack_8angle_light.cpp +45 -0
  1774. esphome/components/m5stack_8angle/light/m5stack_8angle_light.h +37 -0
  1775. esphome/components/m5stack_8angle/m5stack_8angle.cpp +73 -0
  1776. esphome/components/m5stack_8angle/m5stack_8angle.h +34 -0
  1777. esphome/components/m5stack_8angle/sensor/__init__.py +64 -0
  1778. esphome/components/m5stack_8angle/sensor/m5stack_8angle_sensor.cpp +24 -0
  1779. esphome/components/m5stack_8angle/sensor/m5stack_8angle_sensor.h +27 -0
  1780. esphome/components/mapping/__init__.py +142 -0
  1781. esphome/components/mapping/mapping.h +69 -0
  1782. esphome/components/matrix_keypad/__init__.py +88 -0
  1783. esphome/components/matrix_keypad/binary_sensor/__init__.py +50 -0
  1784. esphome/components/matrix_keypad/binary_sensor/matrix_keypad_binary_sensor.h +51 -0
  1785. esphome/components/matrix_keypad/matrix_keypad.cpp +116 -0
  1786. esphome/components/matrix_keypad/matrix_keypad.h +53 -0
  1787. esphome/components/max17043/__init__.py +1 -0
  1788. esphome/components/max17043/automation.h +20 -0
  1789. esphome/components/max17043/max17043.cpp +96 -0
  1790. esphome/components/max17043/max17043.h +29 -0
  1791. esphome/components/max17043/sensor.py +77 -0
  1792. esphome/components/max31855/__init__.py +0 -0
  1793. esphome/components/max31855/max31855.cpp +106 -0
  1794. esphome/components/max31855/max31855.h +31 -0
  1795. esphome/components/max31855/sensor.py +44 -0
  1796. esphome/components/max31856/__init__.py +0 -0
  1797. esphome/components/max31856/max31856.cpp +203 -0
  1798. esphome/components/max31856/max31856.h +103 -0
  1799. esphome/components/max31856/sensor.py +66 -0
  1800. esphome/components/max31865/__init__.py +0 -0
  1801. esphome/components/max31865/max31865.cpp +233 -0
  1802. esphome/components/max31865/max31865.h +58 -0
  1803. esphome/components/max31865/sensor.py +62 -0
  1804. esphome/components/max44009/__init__.py +0 -0
  1805. esphome/components/max44009/max44009.cpp +143 -0
  1806. esphome/components/max44009/max44009.h +37 -0
  1807. esphome/components/max44009/sensor.py +53 -0
  1808. esphome/components/max6675/__init__.py +0 -0
  1809. esphome/components/max6675/max6675.cpp +49 -0
  1810. esphome/components/max6675/max6675.h +26 -0
  1811. esphome/components/max6675/sensor.py +31 -0
  1812. esphome/components/max6956/__init__.py +142 -0
  1813. esphome/components/max6956/automation.h +40 -0
  1814. esphome/components/max6956/max6956.cpp +171 -0
  1815. esphome/components/max6956/max6956.h +96 -0
  1816. esphome/components/max6956/output/__init__.py +29 -0
  1817. esphome/components/max6956/output/max6956_led_output.cpp +26 -0
  1818. esphome/components/max6956/output/max6956_led_output.h +28 -0
  1819. esphome/components/max7219/__init__.py +0 -0
  1820. esphome/components/max7219/display.py +43 -0
  1821. esphome/components/max7219/max7219.cpp +244 -0
  1822. esphome/components/max7219/max7219.h +65 -0
  1823. esphome/components/max7219digit/__init__.py +0 -0
  1824. esphome/components/max7219digit/automation.h +52 -0
  1825. esphome/components/max7219digit/display.py +193 -0
  1826. esphome/components/max7219digit/max7219digit.cpp +353 -0
  1827. esphome/components/max7219digit/max7219digit.h +124 -0
  1828. esphome/components/max7219digit/max7219font.h +270 -0
  1829. esphome/components/max9611/__init__.py +1 -0
  1830. esphome/components/max9611/max9611.cpp +95 -0
  1831. esphome/components/max9611/max9611.h +61 -0
  1832. esphome/components/max9611/sensor.py +92 -0
  1833. esphome/components/mcp23008/__init__.py +28 -0
  1834. esphome/components/mcp23008/mcp23008.cpp +42 -0
  1835. esphome/components/mcp23008/mcp23008.h +24 -0
  1836. esphome/components/mcp23016/__init__.py +73 -0
  1837. esphome/components/mcp23016/mcp23016.cpp +109 -0
  1838. esphome/components/mcp23016/mcp23016.h +80 -0
  1839. esphome/components/mcp23017/__init__.py +28 -0
  1840. esphome/components/mcp23017/mcp23017.cpp +43 -0
  1841. esphome/components/mcp23017/mcp23017.h +24 -0
  1842. esphome/components/mcp23s08/__init__.py +32 -0
  1843. esphome/components/mcp23s08/mcp23s08.cpp +58 -0
  1844. esphome/components/mcp23s08/mcp23s08.h +30 -0
  1845. esphome/components/mcp23s17/__init__.py +32 -0
  1846. esphome/components/mcp23s17/mcp23s17.cpp +68 -0
  1847. esphome/components/mcp23s17/mcp23s17.h +29 -0
  1848. esphome/components/mcp23x08_base/__init__.py +10 -0
  1849. esphome/components/mcp23x08_base/mcp23x08_base.cpp +86 -0
  1850. esphome/components/mcp23x08_base/mcp23x08_base.h +44 -0
  1851. esphome/components/mcp23x17_base/__init__.py +10 -0
  1852. esphome/components/mcp23x17_base/mcp23x17_base.cpp +102 -0
  1853. esphome/components/mcp23x17_base/mcp23x17_base.h +57 -0
  1854. esphome/components/mcp23xxx_base/__init__.py +92 -0
  1855. esphome/components/mcp23xxx_base/mcp23xxx_base.cpp +27 -0
  1856. esphome/components/mcp23xxx_base/mcp23xxx_base.h +58 -0
  1857. esphome/components/mcp2515/__init__.py +0 -0
  1858. esphome/components/mcp2515/canbus.py +50 -0
  1859. esphome/components/mcp2515/mcp2515.cpp +710 -0
  1860. esphome/components/mcp2515/mcp2515.h +112 -0
  1861. esphome/components/mcp2515/mcp2515_defs.h +375 -0
  1862. esphome/components/mcp3008/__init__.py +25 -0
  1863. esphome/components/mcp3008/mcp3008.cpp +40 -0
  1864. esphome/components/mcp3008/mcp3008.h +22 -0
  1865. esphome/components/mcp3008/sensor/__init__.py +53 -0
  1866. esphome/components/mcp3008/sensor/mcp3008_sensor.cpp +29 -0
  1867. esphome/components/mcp3008/sensor/mcp3008_sensor.h +31 -0
  1868. esphome/components/mcp3204/__init__.py +26 -0
  1869. esphome/components/mcp3204/mcp3204.cpp +37 -0
  1870. esphome/components/mcp3204/mcp3204.h +28 -0
  1871. esphome/components/mcp3204/sensor/__init__.py +39 -0
  1872. esphome/components/mcp3204/sensor/mcp3204_sensor.cpp +22 -0
  1873. esphome/components/mcp3204/sensor/mcp3204_sensor.h +31 -0
  1874. esphome/components/mcp3221/__init__.py +1 -0
  1875. esphome/components/mcp3221/mcp3221_sensor.cpp +31 -0
  1876. esphome/components/mcp3221/mcp3221_sensor.h +28 -0
  1877. esphome/components/mcp3221/sensor.py +49 -0
  1878. esphome/components/mcp4461/__init__.py +42 -0
  1879. esphome/components/mcp4461/mcp4461.cpp +631 -0
  1880. esphome/components/mcp4461/mcp4461.h +172 -0
  1881. esphome/components/mcp4461/output/__init__.py +61 -0
  1882. esphome/components/mcp4461/output/mcp4461_output.cpp +73 -0
  1883. esphome/components/mcp4461/output/mcp4461_output.h +49 -0
  1884. esphome/components/mcp4725/__init__.py +0 -0
  1885. esphome/components/mcp4725/mcp4725.cpp +34 -0
  1886. esphome/components/mcp4725/mcp4725.h +23 -0
  1887. esphome/components/mcp4725/output.py +26 -0
  1888. esphome/components/mcp4728/__init__.py +30 -0
  1889. esphome/components/mcp4728/mcp4728.cpp +113 -0
  1890. esphome/components/mcp4728/mcp4728.h +67 -0
  1891. esphome/components/mcp4728/output/__init__.py +63 -0
  1892. esphome/components/mcp4728/output/mcp4728_output.cpp +17 -0
  1893. esphome/components/mcp4728/output/mcp4728_output.h +32 -0
  1894. esphome/components/mcp47a1/__init__.py +0 -0
  1895. esphome/components/mcp47a1/mcp47a1.cpp +21 -0
  1896. esphome/components/mcp47a1/mcp47a1.h +17 -0
  1897. esphome/components/mcp47a1/output.py +27 -0
  1898. esphome/components/mcp9600/__init__.py +0 -0
  1899. esphome/components/mcp9600/mcp9600.cpp +113 -0
  1900. esphome/components/mcp9600/mcp9600.h +49 -0
  1901. esphome/components/mcp9600/sensor.py +81 -0
  1902. esphome/components/mcp9808/__init__.py +0 -0
  1903. esphome/components/mcp9808/mcp9808.cpp +79 -0
  1904. esphome/components/mcp9808/mcp9808.h +20 -0
  1905. esphome/components/mcp9808/sensor.py +34 -0
  1906. esphome/components/md5/__init__.py +7 -0
  1907. esphome/components/md5/md5.cpp +44 -0
  1908. esphome/components/md5/md5.h +55 -0
  1909. esphome/components/mdns/__init__.py +240 -0
  1910. esphome/components/mdns/mdns_component.cpp +194 -0
  1911. esphome/components/mdns/mdns_component.h +118 -0
  1912. esphome/components/mdns/mdns_esp32.cpp +54 -0
  1913. esphome/components/mdns/mdns_esp8266.cpp +50 -0
  1914. esphome/components/mdns/mdns_host.cpp +28 -0
  1915. esphome/components/mdns/mdns_libretiny.cpp +44 -0
  1916. esphome/components/mdns/mdns_rp2040.cpp +49 -0
  1917. esphome/components/media_player/__init__.py +305 -0
  1918. esphome/components/media_player/automation.h +109 -0
  1919. esphome/components/media_player/media_player.cpp +160 -0
  1920. esphome/components/media_player/media_player.h +164 -0
  1921. esphome/components/mhz19/__init__.py +0 -0
  1922. esphome/components/mhz19/mhz19.cpp +119 -0
  1923. esphome/components/mhz19/mhz19.h +70 -0
  1924. esphome/components/mhz19/sensor.py +100 -0
  1925. esphome/components/micro_wake_word/__init__.py +567 -0
  1926. esphome/components/micro_wake_word/automation.h +54 -0
  1927. esphome/components/micro_wake_word/micro_wake_word.cpp +473 -0
  1928. esphome/components/micro_wake_word/micro_wake_word.h +129 -0
  1929. esphome/components/micro_wake_word/preprocessor_settings.h +37 -0
  1930. esphome/components/micro_wake_word/streaming_model.cpp +316 -0
  1931. esphome/components/micro_wake_word/streaming_model.h +156 -0
  1932. esphome/components/micronova/__init__.py +81 -0
  1933. esphome/components/micronova/button/__init__.py +42 -0
  1934. esphome/components/micronova/button/micronova_button.cpp +10 -0
  1935. esphome/components/micronova/button/micronova_button.h +24 -0
  1936. esphome/components/micronova/micronova.cpp +156 -0
  1937. esphome/components/micronova/micronova.h +101 -0
  1938. esphome/components/micronova/number/__init__.py +80 -0
  1939. esphome/components/micronova/number/micronova_number.cpp +29 -0
  1940. esphome/components/micronova/number/micronova_number.h +28 -0
  1941. esphome/components/micronova/sensor/__init__.py +148 -0
  1942. esphome/components/micronova/sensor/micronova_sensor.cpp +23 -0
  1943. esphome/components/micronova/sensor/micronova_sensor.h +33 -0
  1944. esphome/components/micronova/switch/__init__.py +54 -0
  1945. esphome/components/micronova/switch/micronova_switch.cpp +38 -0
  1946. esphome/components/micronova/switch/micronova_switch.h +33 -0
  1947. esphome/components/micronova/text_sensor/__init__.py +41 -0
  1948. esphome/components/micronova/text_sensor/micronova_text_sensor.cpp +14 -0
  1949. esphome/components/micronova/text_sensor/micronova_text_sensor.h +33 -0
  1950. esphome/components/microphone/__init__.py +219 -0
  1951. esphome/components/microphone/automation.h +44 -0
  1952. esphome/components/microphone/microphone.cpp +19 -0
  1953. esphome/components/microphone/microphone.h +45 -0
  1954. esphome/components/microphone/microphone_source.cpp +95 -0
  1955. esphome/components/microphone/microphone_source.h +80 -0
  1956. esphome/components/mics_4514/__init__.py +0 -0
  1957. esphome/components/mics_4514/mics_4514.cpp +130 -0
  1958. esphome/components/mics_4514/mics_4514.h +34 -0
  1959. esphome/components/mics_4514/sensor.py +67 -0
  1960. esphome/components/midea/__init__.py +0 -0
  1961. esphome/components/midea/ac_adapter.cpp +179 -0
  1962. esphome/components/midea/ac_adapter.h +51 -0
  1963. esphome/components/midea/ac_automations.h +70 -0
  1964. esphome/components/midea/air_conditioner.cpp +179 -0
  1965. esphome/components/midea/air_conditioner.h +69 -0
  1966. esphome/components/midea/appliance_base.h +102 -0
  1967. esphome/components/midea/climate.py +293 -0
  1968. esphome/components/midea/ir_transmitter.h +91 -0
  1969. esphome/components/midea_ac/__init__.py +0 -0
  1970. esphome/components/midea_ac/climate.py +3 -0
  1971. esphome/components/midea_ir/__init__.py +0 -0
  1972. esphome/components/midea_ir/climate.py +22 -0
  1973. esphome/components/midea_ir/midea_data.h +92 -0
  1974. esphome/components/midea_ir/midea_ir.cpp +202 -0
  1975. esphome/components/midea_ir/midea_ir.h +47 -0
  1976. esphome/components/mipi/__init__.py +492 -0
  1977. esphome/components/mipi_dsi/__init__.py +5 -0
  1978. esphome/components/mipi_dsi/display.py +233 -0
  1979. esphome/components/mipi_dsi/mipi_dsi.cpp +385 -0
  1980. esphome/components/mipi_dsi/mipi_dsi.h +120 -0
  1981. esphome/components/mipi_dsi/models/__init__.py +0 -0
  1982. esphome/components/mipi_dsi/models/guition.py +104 -0
  1983. esphome/components/mipi_dsi/models/m5stack.py +57 -0
  1984. esphome/components/mipi_dsi/models/waveshare.py +96 -0
  1985. esphome/components/mipi_rgb/__init__.py +2 -0
  1986. esphome/components/mipi_rgb/display.py +320 -0
  1987. esphome/components/mipi_rgb/mipi_rgb.cpp +382 -0
  1988. esphome/components/mipi_rgb/mipi_rgb.h +127 -0
  1989. esphome/components/mipi_rgb/models/guition.py +25 -0
  1990. esphome/components/mipi_rgb/models/lilygo.py +226 -0
  1991. esphome/components/mipi_rgb/models/rpi.py +9 -0
  1992. esphome/components/mipi_rgb/models/st7701s.py +215 -0
  1993. esphome/components/mipi_rgb/models/waveshare.py +146 -0
  1994. esphome/components/mipi_spi/__init__.py +6 -0
  1995. esphome/components/mipi_spi/display.py +448 -0
  1996. esphome/components/mipi_spi/mipi_spi.cpp +6 -0
  1997. esphome/components/mipi_spi/mipi_spi.h +625 -0
  1998. esphome/components/mipi_spi/models/__init__.py +0 -0
  1999. esphome/components/mipi_spi/models/adafruit.py +30 -0
  2000. esphome/components/mipi_spi/models/amoled.py +110 -0
  2001. esphome/components/mipi_spi/models/cyd.py +10 -0
  2002. esphome/components/mipi_spi/models/ili.py +762 -0
  2003. esphome/components/mipi_spi/models/jc.py +592 -0
  2004. esphome/components/mipi_spi/models/lanbon.py +15 -0
  2005. esphome/components/mipi_spi/models/lilygo.py +60 -0
  2006. esphome/components/mipi_spi/models/waveshare.py +164 -0
  2007. esphome/components/mitsubishi/__init__.py +0 -0
  2008. esphome/components/mitsubishi/climate.py +68 -0
  2009. esphome/components/mitsubishi/mitsubishi.cpp +398 -0
  2010. esphome/components/mitsubishi/mitsubishi.h +83 -0
  2011. esphome/components/mixer/__init__.py +0 -0
  2012. esphome/components/mixer/speaker/__init__.py +171 -0
  2013. esphome/components/mixer/speaker/automation.h +19 -0
  2014. esphome/components/mixer/speaker/mixer_speaker.cpp +624 -0
  2015. esphome/components/mixer/speaker/mixer_speaker.h +207 -0
  2016. esphome/components/mlx90393/__init__.py +1 -0
  2017. esphome/components/mlx90393/sensor.py +162 -0
  2018. esphome/components/mlx90393/sensor_mlx90393.cpp +276 -0
  2019. esphome/components/mlx90393/sensor_mlx90393.h +81 -0
  2020. esphome/components/mlx90614/__init__.py +0 -0
  2021. esphome/components/mlx90614/mlx90614.cpp +107 -0
  2022. esphome/components/mlx90614/mlx90614.h +33 -0
  2023. esphome/components/mlx90614/sensor.py +63 -0
  2024. esphome/components/mmc5603/__init__.py +1 -0
  2025. esphome/components/mmc5603/mmc5603.cpp +161 -0
  2026. esphome/components/mmc5603/mmc5603.h +43 -0
  2027. esphome/components/mmc5603/sensor.py +90 -0
  2028. esphome/components/mmc5983/__init__.py +1 -0
  2029. esphome/components/mmc5983/mmc5983.cpp +139 -0
  2030. esphome/components/mmc5983/mmc5983.h +28 -0
  2031. esphome/components/mmc5983/sensor.py +55 -0
  2032. esphome/components/modbus/__init__.py +100 -0
  2033. esphome/components/modbus/modbus.cpp +284 -0
  2034. esphome/components/modbus/modbus.h +89 -0
  2035. esphome/components/modbus/modbus_definitions.h +86 -0
  2036. esphome/components/modbus_controller/__init__.py +398 -0
  2037. esphome/components/modbus_controller/automation.h +35 -0
  2038. esphome/components/modbus_controller/binary_sensor/__init__.py +60 -0
  2039. esphome/components/modbus_controller/binary_sensor/modbus_binarysensor.cpp +38 -0
  2040. esphome/components/modbus_controller/binary_sensor/modbus_binarysensor.h +44 -0
  2041. esphome/components/modbus_controller/const.py +24 -0
  2042. esphome/components/modbus_controller/modbus_controller.cpp +830 -0
  2043. esphome/components/modbus_controller/modbus_controller.h +599 -0
  2044. esphome/components/modbus_controller/number/__init__.py +125 -0
  2045. esphome/components/modbus_controller/number/modbus_number.cpp +86 -0
  2046. esphome/components/modbus_controller/number/modbus_number.h +50 -0
  2047. esphome/components/modbus_controller/output/__init__.py +105 -0
  2048. esphome/components/modbus_controller/output/modbus_output.cpp +115 -0
  2049. esphome/components/modbus_controller/output/modbus_output.h +76 -0
  2050. esphome/components/modbus_controller/select/__init__.py +143 -0
  2051. esphome/components/modbus_controller/select/modbus_select.cpp +90 -0
  2052. esphome/components/modbus_controller/select/modbus_select.h +53 -0
  2053. esphome/components/modbus_controller/sensor/__init__.py +68 -0
  2054. esphome/components/modbus_controller/sensor/modbus_sensor.cpp +31 -0
  2055. esphome/components/modbus_controller/sensor/modbus_sensor.h +37 -0
  2056. esphome/components/modbus_controller/switch/__init__.py +81 -0
  2057. esphome/components/modbus_controller/switch/modbus_switch.cpp +108 -0
  2058. esphome/components/modbus_controller/switch/modbus_switch.h +53 -0
  2059. esphome/components/modbus_controller/text_sensor/__init__.py +84 -0
  2060. esphome/components/modbus_controller/text_sensor/modbus_textsensor.cpp +52 -0
  2061. esphome/components/modbus_controller/text_sensor/modbus_textsensor.h +43 -0
  2062. esphome/components/monochromatic/__init__.py +0 -0
  2063. esphome/components/monochromatic/light.py +24 -0
  2064. esphome/components/monochromatic/monochromatic_light_output.h +29 -0
  2065. esphome/components/mopeka_ble/__init__.py +30 -0
  2066. esphome/components/mopeka_ble/mopeka_ble.cpp +91 -0
  2067. esphome/components/mopeka_ble/mopeka_ble.h +27 -0
  2068. esphome/components/mopeka_pro_check/__init__.py +1 -0
  2069. esphome/components/mopeka_pro_check/mopeka_pro_check.cpp +159 -0
  2070. esphome/components/mopeka_pro_check/mopeka_pro_check.h +71 -0
  2071. esphome/components/mopeka_pro_check/sensor.py +174 -0
  2072. esphome/components/mopeka_std_check/__init__.py +1 -0
  2073. esphome/components/mopeka_std_check/mopeka_std_check.cpp +227 -0
  2074. esphome/components/mopeka_std_check/mopeka_std_check.h +80 -0
  2075. esphome/components/mopeka_std_check/sensor.py +138 -0
  2076. esphome/components/mpl3115a2/__init__.py +0 -0
  2077. esphome/components/mpl3115a2/mpl3115a2.cpp +98 -0
  2078. esphome/components/mpl3115a2/mpl3115a2.h +106 -0
  2079. esphome/components/mpl3115a2/sensor.py +75 -0
  2080. esphome/components/mpr121/__init__.py +128 -0
  2081. esphome/components/mpr121/binary_sensor/__init__.py +38 -0
  2082. esphome/components/mpr121/binary_sensor/mpr121_binary_sensor.cpp +20 -0
  2083. esphome/components/mpr121/binary_sensor/mpr121_binary_sensor.h +26 -0
  2084. esphome/components/mpr121/mpr121.cpp +163 -0
  2085. esphome/components/mpr121/mpr121.h +129 -0
  2086. esphome/components/mpu6050/__init__.py +0 -0
  2087. esphome/components/mpu6050/mpu6050.cpp +146 -0
  2088. esphome/components/mpu6050/mpu6050.h +39 -0
  2089. esphome/components/mpu6050/sensor.py +84 -0
  2090. esphome/components/mpu6886/__init__.py +1 -0
  2091. esphome/components/mpu6886/mpu6886.cpp +152 -0
  2092. esphome/components/mpu6886/mpu6886.h +39 -0
  2093. esphome/components/mpu6886/sensor.py +85 -0
  2094. esphome/components/mqtt/__init__.py +627 -0
  2095. esphome/components/mqtt/custom_mqtt_device.cpp +35 -0
  2096. esphome/components/mqtt/custom_mqtt_device.h +220 -0
  2097. esphome/components/mqtt/mqtt_alarm_control_panel.cpp +130 -0
  2098. esphome/components/mqtt/mqtt_alarm_control_panel.h +39 -0
  2099. esphome/components/mqtt/mqtt_backend.h +72 -0
  2100. esphome/components/mqtt/mqtt_backend_esp32.cpp +284 -0
  2101. esphome/components/mqtt/mqtt_backend_esp32.h +280 -0
  2102. esphome/components/mqtt/mqtt_backend_esp8266.h +74 -0
  2103. esphome/components/mqtt/mqtt_backend_libretiny.h +74 -0
  2104. esphome/components/mqtt/mqtt_binary_sensor.cpp +64 -0
  2105. esphome/components/mqtt/mqtt_binary_sensor.h +43 -0
  2106. esphome/components/mqtt/mqtt_button.cpp +50 -0
  2107. esphome/components/mqtt/mqtt_button.h +40 -0
  2108. esphome/components/mqtt/mqtt_client.cpp +753 -0
  2109. esphome/components/mqtt/mqtt_client.h +468 -0
  2110. esphome/components/mqtt/mqtt_climate.cpp +467 -0
  2111. esphome/components/mqtt/mqtt_climate.h +56 -0
  2112. esphome/components/mqtt/mqtt_component.cpp +304 -0
  2113. esphome/components/mqtt/mqtt_component.h +211 -0
  2114. esphome/components/mqtt/mqtt_const.h +547 -0
  2115. esphome/components/mqtt/mqtt_cover.cpp +126 -0
  2116. esphome/components/mqtt/mqtt_cover.h +43 -0
  2117. esphome/components/mqtt/mqtt_date.cpp +69 -0
  2118. esphome/components/mqtt/mqtt_date.h +45 -0
  2119. esphome/components/mqtt/mqtt_datetime.cpp +85 -0
  2120. esphome/components/mqtt/mqtt_datetime.h +45 -0
  2121. esphome/components/mqtt/mqtt_event.cpp +61 -0
  2122. esphome/components/mqtt/mqtt_event.h +39 -0
  2123. esphome/components/mqtt/mqtt_fan.cpp +189 -0
  2124. esphome/components/mqtt/mqtt_fan.h +54 -0
  2125. esphome/components/mqtt/mqtt_light.cpp +100 -0
  2126. esphome/components/mqtt/mqtt_light.h +44 -0
  2127. esphome/components/mqtt/mqtt_lock.cpp +65 -0
  2128. esphome/components/mqtt/mqtt_lock.h +41 -0
  2129. esphome/components/mqtt/mqtt_number.cpp +87 -0
  2130. esphome/components/mqtt/mqtt_number.h +46 -0
  2131. esphome/components/mqtt/mqtt_select.cpp +61 -0
  2132. esphome/components/mqtt/mqtt_select.h +46 -0
  2133. esphome/components/mqtt/mqtt_sensor.cpp +93 -0
  2134. esphome/components/mqtt/mqtt_sensor.h +58 -0
  2135. esphome/components/mqtt/mqtt_switch.cpp +64 -0
  2136. esphome/components/mqtt/mqtt_switch.h +41 -0
  2137. esphome/components/mqtt/mqtt_text.cpp +64 -0
  2138. esphome/components/mqtt/mqtt_text.h +46 -0
  2139. esphome/components/mqtt/mqtt_text_sensor.cpp +50 -0
  2140. esphome/components/mqtt/mqtt_text_sensor.h +39 -0
  2141. esphome/components/mqtt/mqtt_time.cpp +69 -0
  2142. esphome/components/mqtt/mqtt_time.h +45 -0
  2143. esphome/components/mqtt/mqtt_update.cpp +63 -0
  2144. esphome/components/mqtt/mqtt_update.h +41 -0
  2145. esphome/components/mqtt/mqtt_valve.cpp +96 -0
  2146. esphome/components/mqtt/mqtt_valve.h +41 -0
  2147. esphome/components/mqtt_subscribe/__init__.py +3 -0
  2148. esphome/components/mqtt_subscribe/sensor/__init__.py +38 -0
  2149. esphome/components/mqtt_subscribe/sensor/mqtt_subscribe_sensor.cpp +38 -0
  2150. esphome/components/mqtt_subscribe/sensor/mqtt_subscribe_sensor.h +33 -0
  2151. esphome/components/mqtt_subscribe/text_sensor/__init__.py +36 -0
  2152. esphome/components/mqtt_subscribe/text_sensor/mqtt_subscribe_text_sensor.cpp +28 -0
  2153. esphome/components/mqtt_subscribe/text_sensor/mqtt_subscribe_text_sensor.h +32 -0
  2154. esphome/components/ms5611/__init__.py +0 -0
  2155. esphome/components/ms5611/ms5611.cpp +130 -0
  2156. esphome/components/ms5611/ms5611.h +31 -0
  2157. esphome/components/ms5611/sensor.py +58 -0
  2158. esphome/components/ms8607/__init__.py +1 -0
  2159. esphome/components/ms8607/ms8607.cpp +443 -0
  2160. esphome/components/ms8607/ms8607.h +108 -0
  2161. esphome/components/ms8607/sensor.py +83 -0
  2162. esphome/components/msa3xx/__init__.py +189 -0
  2163. esphome/components/msa3xx/binary_sensor.py +40 -0
  2164. esphome/components/msa3xx/msa3xx.cpp +419 -0
  2165. esphome/components/msa3xx/msa3xx.h +311 -0
  2166. esphome/components/msa3xx/sensor.py +42 -0
  2167. esphome/components/msa3xx/text_sensor.py +38 -0
  2168. esphome/components/my9231/__init__.py +41 -0
  2169. esphome/components/my9231/my9231.cpp +127 -0
  2170. esphome/components/my9231/my9231.h +64 -0
  2171. esphome/components/my9231/output.py +28 -0
  2172. esphome/components/nau7802/__init__.py +0 -0
  2173. esphome/components/nau7802/nau7802.cpp +320 -0
  2174. esphome/components/nau7802/nau7802.h +119 -0
  2175. esphome/components/nau7802/sensor.py +134 -0
  2176. esphome/components/neopixelbus/__init__.py +0 -0
  2177. esphome/components/neopixelbus/_methods.py +423 -0
  2178. esphome/components/neopixelbus/const.py +42 -0
  2179. esphome/components/neopixelbus/light.py +232 -0
  2180. esphome/components/neopixelbus/neopixelbus_light.h +146 -0
  2181. esphome/components/network/__init__.py +227 -0
  2182. esphome/components/network/ip_address.h +153 -0
  2183. esphome/components/network/util.cpp +114 -0
  2184. esphome/components/network/util.h +20 -0
  2185. esphome/components/nextion/__init__.py +26 -0
  2186. esphome/components/nextion/automation.h +139 -0
  2187. esphome/components/nextion/base_component.py +130 -0
  2188. esphome/components/nextion/binary_sensor/__init__.py +87 -0
  2189. esphome/components/nextion/binary_sensor/nextion_binarysensor.cpp +68 -0
  2190. esphome/components/nextion/binary_sensor/nextion_binarysensor.h +42 -0
  2191. esphome/components/nextion/display.py +224 -0
  2192. esphome/components/nextion/nextion.cpp +1299 -0
  2193. esphome/components/nextion/nextion.h +1499 -0
  2194. esphome/components/nextion/nextion_base.h +65 -0
  2195. esphome/components/nextion/nextion_commands.cpp +353 -0
  2196. esphome/components/nextion/nextion_component.cpp +114 -0
  2197. esphome/components/nextion/nextion_component.h +84 -0
  2198. esphome/components/nextion/nextion_component_base.h +106 -0
  2199. esphome/components/nextion/nextion_upload.cpp +39 -0
  2200. esphome/components/nextion/nextion_upload_arduino.cpp +360 -0
  2201. esphome/components/nextion/nextion_upload_idf.cpp +340 -0
  2202. esphome/components/nextion/sensor/__init__.py +127 -0
  2203. esphome/components/nextion/sensor/nextion_sensor.cpp +116 -0
  2204. esphome/components/nextion/sensor/nextion_sensor.h +49 -0
  2205. esphome/components/nextion/switch/__init__.py +69 -0
  2206. esphome/components/nextion/switch/nextion_switch.cpp +52 -0
  2207. esphome/components/nextion/switch/nextion_switch.h +34 -0
  2208. esphome/components/nextion/text_sensor/__init__.py +65 -0
  2209. esphome/components/nextion/text_sensor/nextion_textsensor.cpp +49 -0
  2210. esphome/components/nextion/text_sensor/nextion_textsensor.h +32 -0
  2211. esphome/components/nfc/__init__.py +13 -0
  2212. esphome/components/nfc/automation.cpp +9 -0
  2213. esphome/components/nfc/automation.h +17 -0
  2214. esphome/components/nfc/binary_sensor/__init__.py +72 -0
  2215. esphome/components/nfc/binary_sensor/nfc_binary_sensor.cpp +114 -0
  2216. esphome/components/nfc/binary_sensor/nfc_binary_sensor.h +38 -0
  2217. esphome/components/nfc/nci_core.h +144 -0
  2218. esphome/components/nfc/nci_message.cpp +166 -0
  2219. esphome/components/nfc/nci_message.h +50 -0
  2220. esphome/components/nfc/ndef_message.cpp +110 -0
  2221. esphome/components/nfc/ndef_message.h +42 -0
  2222. esphome/components/nfc/ndef_record.cpp +65 -0
  2223. esphome/components/nfc/ndef_record.h +57 -0
  2224. esphome/components/nfc/ndef_record_text.cpp +40 -0
  2225. esphome/components/nfc/ndef_record_text.h +43 -0
  2226. esphome/components/nfc/ndef_record_uri.cpp +48 -0
  2227. esphome/components/nfc/ndef_record_uri.h +78 -0
  2228. esphome/components/nfc/nfc.cpp +89 -0
  2229. esphome/components/nfc/nfc.h +84 -0
  2230. esphome/components/nfc/nfc_helpers.cpp +47 -0
  2231. esphome/components/nfc/nfc_helpers.h +17 -0
  2232. esphome/components/nfc/nfc_tag.cpp +9 -0
  2233. esphome/components/nfc/nfc_tag.h +57 -0
  2234. esphome/components/noblex/__init__.py +1 -0
  2235. esphome/components/noblex/climate.py +13 -0
  2236. esphome/components/noblex/noblex.cpp +309 -0
  2237. esphome/components/noblex/noblex.h +47 -0
  2238. esphome/components/npi19/__init__.py +0 -0
  2239. esphome/components/npi19/npi19.cpp +107 -0
  2240. esphome/components/npi19/npi19.h +30 -0
  2241. esphome/components/npi19/sensor.py +52 -0
  2242. esphome/components/nrf52/__init__.py +320 -0
  2243. esphome/components/nrf52/ble_logger.py +60 -0
  2244. esphome/components/nrf52/boards.py +42 -0
  2245. esphome/components/nrf52/const.py +19 -0
  2246. esphome/components/nrf52/dfu.cpp +51 -0
  2247. esphome/components/nrf52/dfu.h +24 -0
  2248. esphome/components/nrf52/gpio.py +82 -0
  2249. esphome/components/nrf52/uicr.cpp +121 -0
  2250. esphome/components/ntc/__init__.py +0 -0
  2251. esphome/components/ntc/ntc.cpp +31 -0
  2252. esphome/components/ntc/ntc.h +29 -0
  2253. esphome/components/ntc/sensor.py +144 -0
  2254. esphome/components/number/__init__.py +434 -0
  2255. esphome/components/number/automation.cpp +54 -0
  2256. esphome/components/number/automation.h +93 -0
  2257. esphome/components/number/number.cpp +45 -0
  2258. esphome/components/number/number.h +55 -0
  2259. esphome/components/number/number_call.cpp +127 -0
  2260. esphome/components/number/number_call.h +46 -0
  2261. esphome/components/number/number_traits.cpp +8 -0
  2262. esphome/components/number/number_traits.h +37 -0
  2263. esphome/components/one_wire/__init__.py +42 -0
  2264. esphome/components/one_wire/one_wire.cpp +48 -0
  2265. esphome/components/one_wire/one_wire.h +47 -0
  2266. esphome/components/one_wire/one_wire_bus.cpp +92 -0
  2267. esphome/components/one_wire/one_wire_bus.h +67 -0
  2268. esphome/components/online_image/__init__.py +240 -0
  2269. esphome/components/online_image/bmp_image.cpp +139 -0
  2270. esphome/components/online_image/bmp_image.h +42 -0
  2271. esphome/components/online_image/image_decoder.cpp +73 -0
  2272. esphome/components/online_image/image_decoder.h +121 -0
  2273. esphome/components/online_image/jpeg_image.cpp +94 -0
  2274. esphome/components/online_image/jpeg_image.h +34 -0
  2275. esphome/components/online_image/online_image.cpp +369 -0
  2276. esphome/components/online_image/online_image.h +245 -0
  2277. esphome/components/online_image/png_image.cpp +105 -0
  2278. esphome/components/online_image/png_image.h +40 -0
  2279. esphome/components/opentherm/__init__.py +149 -0
  2280. esphome/components/opentherm/automation.h +25 -0
  2281. esphome/components/opentherm/binary_sensor/__init__.py +31 -0
  2282. esphome/components/opentherm/const.py +12 -0
  2283. esphome/components/opentherm/generate.py +175 -0
  2284. esphome/components/opentherm/hub.cpp +423 -0
  2285. esphome/components/opentherm/hub.h +179 -0
  2286. esphome/components/opentherm/input.h +18 -0
  2287. esphome/components/opentherm/input.py +52 -0
  2288. esphome/components/opentherm/number/__init__.py +66 -0
  2289. esphome/components/opentherm/number/opentherm_number.cpp +42 -0
  2290. esphome/components/opentherm/number/opentherm_number.h +31 -0
  2291. esphome/components/opentherm/opentherm.cpp +601 -0
  2292. esphome/components/opentherm/opentherm.h +399 -0
  2293. esphome/components/opentherm/opentherm_macros.h +162 -0
  2294. esphome/components/opentherm/output/__init__.py +48 -0
  2295. esphome/components/opentherm/output/opentherm_output.cpp +18 -0
  2296. esphome/components/opentherm/output/opentherm_output.h +33 -0
  2297. esphome/components/opentherm/schema.py +891 -0
  2298. esphome/components/opentherm/sensor/__init__.py +50 -0
  2299. esphome/components/opentherm/switch/__init__.py +42 -0
  2300. esphome/components/opentherm/switch/opentherm_switch.cpp +28 -0
  2301. esphome/components/opentherm/switch/opentherm_switch.h +20 -0
  2302. esphome/components/opentherm/validate.py +36 -0
  2303. esphome/components/openthread/__init__.py +192 -0
  2304. esphome/components/openthread/const.py +12 -0
  2305. esphome/components/openthread/openthread.cpp +281 -0
  2306. esphome/components/openthread/openthread.h +96 -0
  2307. esphome/components/openthread/openthread_esp.cpp +214 -0
  2308. esphome/components/openthread_info/__init__.py +0 -0
  2309. esphome/components/openthread_info/openthread_info_text_sensor.cpp +24 -0
  2310. esphome/components/openthread_info/openthread_info_text_sensor.h +218 -0
  2311. esphome/components/openthread_info/text_sensor.py +105 -0
  2312. esphome/components/opt3001/__init__.py +0 -0
  2313. esphome/components/opt3001/opt3001.cpp +122 -0
  2314. esphome/components/opt3001/opt3001.h +27 -0
  2315. esphome/components/opt3001/sensor.py +31 -0
  2316. esphome/components/ota/__init__.py +139 -0
  2317. esphome/components/ota/automation.h +78 -0
  2318. esphome/components/ota/ota_backend.cpp +20 -0
  2319. esphome/components/ota/ota_backend.h +123 -0
  2320. esphome/components/ota/ota_backend_arduino_esp8266.cpp +89 -0
  2321. esphome/components/ota/ota_backend_arduino_esp8266.h +33 -0
  2322. esphome/components/ota/ota_backend_arduino_libretiny.cpp +72 -0
  2323. esphome/components/ota/ota_backend_arduino_libretiny.h +26 -0
  2324. esphome/components/ota/ota_backend_arduino_rp2040.cpp +82 -0
  2325. esphome/components/ota/ota_backend_arduino_rp2040.h +29 -0
  2326. esphome/components/ota/ota_backend_esp_idf.cpp +110 -0
  2327. esphome/components/ota/ota_backend_esp_idf.h +32 -0
  2328. esphome/components/output/__init__.py +147 -0
  2329. esphome/components/output/automation.cpp +10 -0
  2330. esphome/components/output/automation.h +68 -0
  2331. esphome/components/output/binary_output.h +73 -0
  2332. esphome/components/output/button/__init__.py +30 -0
  2333. esphome/components/output/button/output_button.cpp +21 -0
  2334. esphome/components/output/button/output_button.h +25 -0
  2335. esphome/components/output/float_output.cpp +46 -0
  2336. esphome/components/output/float_output.h +89 -0
  2337. esphome/components/output/lock/__init__.py +26 -0
  2338. esphome/components/output/lock/output_lock.cpp +22 -0
  2339. esphome/components/output/lock/output_lock.h +24 -0
  2340. esphome/components/output/switch/__init__.py +29 -0
  2341. esphome/components/output/switch/output_switch.cpp +29 -0
  2342. esphome/components/output/switch/output_switch.h +25 -0
  2343. esphome/components/packages/__init__.py +337 -0
  2344. esphome/components/packet_transport/__init__.py +199 -0
  2345. esphome/components/packet_transport/binary_sensor.py +76 -0
  2346. esphome/components/packet_transport/packet_transport.cpp +571 -0
  2347. esphome/components/packet_transport/packet_transport.h +160 -0
  2348. esphome/components/packet_transport/sensor.py +19 -0
  2349. esphome/components/partition/__init__.py +0 -0
  2350. esphome/components/partition/light.py +121 -0
  2351. esphome/components/partition/light_partition.cpp +10 -0
  2352. esphome/components/partition/light_partition.h +97 -0
  2353. esphome/components/pca6416a/__init__.py +79 -0
  2354. esphome/components/pca6416a/pca6416a.cpp +190 -0
  2355. esphome/components/pca6416a/pca6416a.h +72 -0
  2356. esphome/components/pca9554/__init__.py +87 -0
  2357. esphome/components/pca9554/pca9554.cpp +139 -0
  2358. esphome/components/pca9554/pca9554.h +79 -0
  2359. esphome/components/pca9685/__init__.py +62 -0
  2360. esphome/components/pca9685/output.py +27 -0
  2361. esphome/components/pca9685/pca9685_output.cpp +168 -0
  2362. esphome/components/pca9685/pca9685_output.h +80 -0
  2363. esphome/components/pcd8544/__init__.py +0 -0
  2364. esphome/components/pcd8544/display.py +60 -0
  2365. esphome/components/pcd8544/pcd_8544.cpp +126 -0
  2366. esphome/components/pcd8544/pcd_8544.h +78 -0
  2367. esphome/components/pcf85063/__init__.py +0 -0
  2368. esphome/components/pcf85063/pcf85063.cpp +108 -0
  2369. esphome/components/pcf85063/pcf85063.h +96 -0
  2370. esphome/components/pcf85063/time.py +59 -0
  2371. esphome/components/pcf8563/__init__.py +0 -0
  2372. esphome/components/pcf8563/pcf8563.cpp +108 -0
  2373. esphome/components/pcf8563/pcf8563.h +124 -0
  2374. esphome/components/pcf8563/time.py +62 -0
  2375. esphome/components/pcf8574/__init__.py +76 -0
  2376. esphome/components/pcf8574/pcf8574.cpp +114 -0
  2377. esphome/components/pcf8574/pcf8574.h +74 -0
  2378. esphome/components/pi4ioe5v6408/__init__.py +84 -0
  2379. esphome/components/pi4ioe5v6408/pi4ioe5v6408.cpp +170 -0
  2380. esphome/components/pi4ioe5v6408/pi4ioe5v6408.h +70 -0
  2381. esphome/components/pid/__init__.py +1 -0
  2382. esphome/components/pid/climate.py +192 -0
  2383. esphome/components/pid/pid_autotuner.cpp +361 -0
  2384. esphome/components/pid/pid_autotuner.h +115 -0
  2385. esphome/components/pid/pid_climate.cpp +188 -0
  2386. esphome/components/pid/pid_climate.h +160 -0
  2387. esphome/components/pid/pid_controller.cpp +129 -0
  2388. esphome/components/pid/pid_controller.h +71 -0
  2389. esphome/components/pid/pid_simulator.h +77 -0
  2390. esphome/components/pid/sensor/__init__.py +49 -0
  2391. esphome/components/pid/sensor/pid_climate_sensor.cpp +59 -0
  2392. esphome/components/pid/sensor/pid_climate_sensor.h +37 -0
  2393. esphome/components/pipsolar/__init__.py +32 -0
  2394. esphome/components/pipsolar/binary_sensor/__init__.py +141 -0
  2395. esphome/components/pipsolar/output/__init__.py +107 -0
  2396. esphome/components/pipsolar/output/pipsolar_output.cpp +22 -0
  2397. esphome/components/pipsolar/output/pipsolar_output.h +42 -0
  2398. esphome/components/pipsolar/pipsolar.cpp +786 -0
  2399. esphome/components/pipsolar/pipsolar.h +250 -0
  2400. esphome/components/pipsolar/sensor/__init__.py +324 -0
  2401. esphome/components/pipsolar/switch/__init__.py +51 -0
  2402. esphome/components/pipsolar/switch/pipsolar_switch.cpp +24 -0
  2403. esphome/components/pipsolar/switch/pipsolar_switch.h +25 -0
  2404. esphome/components/pipsolar/text_sensor/__init__.py +41 -0
  2405. esphome/components/pm1006/__init__.py +0 -0
  2406. esphome/components/pm1006/pm1006.cpp +99 -0
  2407. esphome/components/pm1006/pm1006.h +39 -0
  2408. esphome/components/pm1006/sensor.py +67 -0
  2409. esphome/components/pm2005/__init__.py +1 -0
  2410. esphome/components/pm2005/pm2005.cpp +121 -0
  2411. esphome/components/pm2005/pm2005.h +46 -0
  2412. esphome/components/pm2005/sensor.py +86 -0
  2413. esphome/components/pmsa003i/__init__.py +0 -0
  2414. esphome/components/pmsa003i/pmsa003i.cpp +135 -0
  2415. esphome/components/pmsa003i/pmsa003i.h +67 -0
  2416. esphome/components/pmsa003i/sensor.py +127 -0
  2417. esphome/components/pmsx003/__init__.py +0 -0
  2418. esphome/components/pmsx003/pmsx003.cpp +318 -0
  2419. esphome/components/pmsx003/pmsx003.h +121 -0
  2420. esphome/components/pmsx003/sensor.py +281 -0
  2421. esphome/components/pmwcs3/__init__.py +1 -0
  2422. esphome/components/pmwcs3/pmwcs3.cpp +112 -0
  2423. esphome/components/pmwcs3/pmwcs3.h +69 -0
  2424. esphome/components/pmwcs3/sensor.py +139 -0
  2425. esphome/components/pn532/__init__.py +96 -0
  2426. esphome/components/pn532/binary_sensor.py +48 -0
  2427. esphome/components/pn532/pn532.cpp +463 -0
  2428. esphome/components/pn532/pn532.h +150 -0
  2429. esphome/components/pn532/pn532_mifare_classic.cpp +262 -0
  2430. esphome/components/pn532/pn532_mifare_ultralight.cpp +192 -0
  2431. esphome/components/pn532_i2c/__init__.py +26 -0
  2432. esphome/components/pn532_i2c/pn532_i2c.cpp +129 -0
  2433. esphome/components/pn532_i2c/pn532_i2c.h +25 -0
  2434. esphome/components/pn532_spi/__init__.py +26 -0
  2435. esphome/components/pn532_spi/pn532_spi.cpp +136 -0
  2436. esphome/components/pn532_spi/pn532_spi.h +28 -0
  2437. esphome/components/pn7150/__init__.py +215 -0
  2438. esphome/components/pn7150/automation.h +82 -0
  2439. esphome/components/pn7150/pn7150.cpp +1143 -0
  2440. esphome/components/pn7150/pn7150.h +295 -0
  2441. esphome/components/pn7150/pn7150_mifare_classic.cpp +322 -0
  2442. esphome/components/pn7150/pn7150_mifare_ultralight.cpp +186 -0
  2443. esphome/components/pn7150_i2c/__init__.py +25 -0
  2444. esphome/components/pn7150_i2c/pn7150_i2c.cpp +49 -0
  2445. esphome/components/pn7150_i2c/pn7150_i2c.h +22 -0
  2446. esphome/components/pn7160/__init__.py +227 -0
  2447. esphome/components/pn7160/automation.h +82 -0
  2448. esphome/components/pn7160/pn7160.cpp +1167 -0
  2449. esphome/components/pn7160/pn7160.h +314 -0
  2450. esphome/components/pn7160/pn7160_mifare_classic.cpp +322 -0
  2451. esphome/components/pn7160/pn7160_mifare_ultralight.cpp +186 -0
  2452. esphome/components/pn7160_i2c/__init__.py +25 -0
  2453. esphome/components/pn7160_i2c/pn7160_i2c.cpp +49 -0
  2454. esphome/components/pn7160_i2c/pn7160_i2c.h +22 -0
  2455. esphome/components/pn7160_spi/__init__.py +26 -0
  2456. esphome/components/pn7160_spi/pn7160_spi.cpp +54 -0
  2457. esphome/components/pn7160_spi/pn7160_spi.h +30 -0
  2458. esphome/components/power_supply/__init__.py +42 -0
  2459. esphome/components/power_supply/power_supply.cpp +58 -0
  2460. esphome/components/power_supply/power_supply.h +67 -0
  2461. esphome/components/preferences/__init__.py +22 -0
  2462. esphome/components/preferences/syncer.h +32 -0
  2463. esphome/components/prometheus/__init__.py +52 -0
  2464. esphome/components/prometheus/prometheus_handler.cpp +1093 -0
  2465. esphome/components/prometheus/prometheus_handler.h +221 -0
  2466. esphome/components/psram/__init__.py +210 -0
  2467. esphome/components/psram/psram.cpp +31 -0
  2468. esphome/components/psram/psram.h +17 -0
  2469. esphome/components/pulse_counter/__init__.py +0 -0
  2470. esphome/components/pulse_counter/automation.h +24 -0
  2471. esphome/components/pulse_counter/pulse_counter_sensor.cpp +201 -0
  2472. esphome/components/pulse_counter/pulse_counter_sensor.h +90 -0
  2473. esphome/components/pulse_counter/sensor.py +159 -0
  2474. esphome/components/pulse_meter/__init__.py +0 -0
  2475. esphome/components/pulse_meter/automation.h +24 -0
  2476. esphome/components/pulse_meter/pulse_meter_sensor.cpp +189 -0
  2477. esphome/components/pulse_meter/pulse_meter_sensor.h +83 -0
  2478. esphome/components/pulse_meter/sensor.py +114 -0
  2479. esphome/components/pulse_width/__init__.py +0 -0
  2480. esphome/components/pulse_width/pulse_width.cpp +31 -0
  2481. esphome/components/pulse_width/pulse_width.h +43 -0
  2482. esphome/components/pulse_width/sensor.py +35 -0
  2483. esphome/components/pvvx_mithermometer/__init__.py +0 -0
  2484. esphome/components/pvvx_mithermometer/display/__init__.py +55 -0
  2485. esphome/components/pvvx_mithermometer/display/pvvx_display.cpp +189 -0
  2486. esphome/components/pvvx_mithermometer/display/pvvx_display.h +136 -0
  2487. esphome/components/pvvx_mithermometer/pvvx_mithermometer.cpp +141 -0
  2488. esphome/components/pvvx_mithermometer/pvvx_mithermometer.h +50 -0
  2489. esphome/components/pvvx_mithermometer/sensor.py +100 -0
  2490. esphome/components/pylontech/__init__.py +47 -0
  2491. esphome/components/pylontech/pylontech.cpp +103 -0
  2492. esphome/components/pylontech/pylontech.h +53 -0
  2493. esphome/components/pylontech/sensor/__init__.py +92 -0
  2494. esphome/components/pylontech/sensor/pylontech_sensor.cpp +62 -0
  2495. esphome/components/pylontech/sensor/pylontech_sensor.h +32 -0
  2496. esphome/components/pylontech/text_sensor/__init__.py +36 -0
  2497. esphome/components/pylontech/text_sensor/pylontech_text_sensor.cpp +42 -0
  2498. esphome/components/pylontech/text_sensor/pylontech_text_sensor.h +26 -0
  2499. esphome/components/pzem004t/__init__.py +0 -0
  2500. esphome/components/pzem004t/pzem004t.cpp +127 -0
  2501. esphome/components/pzem004t/pzem004t.h +46 -0
  2502. esphome/components/pzem004t/sensor.py +82 -0
  2503. esphome/components/pzemac/__init__.py +0 -0
  2504. esphome/components/pzemac/pzemac.cpp +87 -0
  2505. esphome/components/pzemac/pzemac.h +53 -0
  2506. esphome/components/pzemac/sensor.py +125 -0
  2507. esphome/components/pzemdc/__init__.py +0 -0
  2508. esphome/components/pzemdc/pzemdc.cpp +75 -0
  2509. esphome/components/pzemdc/pzemdc.h +46 -0
  2510. esphome/components/pzemdc/sensor.py +101 -0
  2511. esphome/components/qmc5883l/__init__.py +0 -0
  2512. esphome/components/qmc5883l/qmc5883l.cpp +189 -0
  2513. esphome/components/qmc5883l/qmc5883l.h +66 -0
  2514. esphome/components/qmc5883l/sensor.py +164 -0
  2515. esphome/components/qmp6988/__init__.py +1 -0
  2516. esphome/components/qmp6988/qmp6988.cpp +350 -0
  2517. esphome/components/qmp6988/qmp6988.h +110 -0
  2518. esphome/components/qmp6988/sensor.py +101 -0
  2519. esphome/components/qr_code/__init__.py +44 -0
  2520. esphome/components/qr_code/qr_code.cpp +69 -0
  2521. esphome/components/qr_code/qr_code.h +36 -0
  2522. esphome/components/qspi_amoled/display.py +3 -0
  2523. esphome/components/qspi_dbi/__init__.py +3 -0
  2524. esphome/components/qspi_dbi/display.py +212 -0
  2525. esphome/components/qspi_dbi/models.py +309 -0
  2526. esphome/components/qspi_dbi/qspi_dbi.cpp +221 -0
  2527. esphome/components/qspi_dbi/qspi_dbi.h +173 -0
  2528. esphome/components/qwiic_pir/__init__.py +0 -0
  2529. esphome/components/qwiic_pir/binary_sensor.py +63 -0
  2530. esphome/components/qwiic_pir/qwiic_pir.cpp +133 -0
  2531. esphome/components/qwiic_pir/qwiic_pir.h +69 -0
  2532. esphome/components/radon_eye_ble/__init__.py +23 -0
  2533. esphome/components/radon_eye_ble/radon_eye_listener.cpp +32 -0
  2534. esphome/components/radon_eye_ble/radon_eye_listener.h +19 -0
  2535. esphome/components/radon_eye_rd200/__init__.py +1 -0
  2536. esphome/components/radon_eye_rd200/radon_eye_rd200.cpp +179 -0
  2537. esphome/components/radon_eye_rd200/radon_eye_rd200.h +59 -0
  2538. esphome/components/radon_eye_rd200/sensor.py +54 -0
  2539. esphome/components/rc522/__init__.py +56 -0
  2540. esphome/components/rc522/binary_sensor.py +48 -0
  2541. esphome/components/rc522/rc522.cpp +483 -0
  2542. esphome/components/rc522/rc522.h +279 -0
  2543. esphome/components/rc522_i2c/__init__.py +26 -0
  2544. esphome/components/rc522_i2c/rc522_i2c.cpp +70 -0
  2545. esphome/components/rc522_i2c/rc522_i2c.h +42 -0
  2546. esphome/components/rc522_spi/__init__.py +30 -0
  2547. esphome/components/rc522_spi/binary_sensor.py +9 -0
  2548. esphome/components/rc522_spi/rc522_spi.cpp +139 -0
  2549. esphome/components/rc522_spi/rc522_spi.h +54 -0
  2550. esphome/components/rdm6300/__init__.py +41 -0
  2551. esphome/components/rdm6300/binary_sensor.py +28 -0
  2552. esphome/components/rdm6300/rdm6300.cpp +69 -0
  2553. esphome/components/rdm6300/rdm6300.h +56 -0
  2554. esphome/components/remote_base/__init__.py +2199 -0
  2555. esphome/components/remote_base/abbwelcome_protocol.cpp +123 -0
  2556. esphome/components/remote_base/abbwelcome_protocol.h +256 -0
  2557. esphome/components/remote_base/aeha_protocol.cpp +102 -0
  2558. esphome/components/remote_base/aeha_protocol.h +46 -0
  2559. esphome/components/remote_base/beo4_protocol.cpp +153 -0
  2560. esphome/components/remote_base/beo4_protocol.h +43 -0
  2561. esphome/components/remote_base/byronsx_protocol.cpp +139 -0
  2562. esphome/components/remote_base/byronsx_protocol.h +46 -0
  2563. esphome/components/remote_base/canalsat_protocol.cpp +108 -0
  2564. esphome/components/remote_base/canalsat_protocol.h +78 -0
  2565. esphome/components/remote_base/coolix_protocol.cpp +113 -0
  2566. esphome/components/remote_base/coolix_protocol.h +41 -0
  2567. esphome/components/remote_base/dish_protocol.cpp +94 -0
  2568. esphome/components/remote_base/dish_protocol.h +38 -0
  2569. esphome/components/remote_base/dooya_protocol.cpp +120 -0
  2570. esphome/components/remote_base/dooya_protocol.h +49 -0
  2571. esphome/components/remote_base/drayton_protocol.cpp +240 -0
  2572. esphome/components/remote_base/drayton_protocol.h +46 -0
  2573. esphome/components/remote_base/dyson_protocol.cpp +71 -0
  2574. esphome/components/remote_base/dyson_protocol.h +46 -0
  2575. esphome/components/remote_base/gobox_protocol.cpp +131 -0
  2576. esphome/components/remote_base/gobox_protocol.h +54 -0
  2577. esphome/components/remote_base/haier_protocol.cpp +84 -0
  2578. esphome/components/remote_base/haier_protocol.h +39 -0
  2579. esphome/components/remote_base/jvc_protocol.cpp +52 -0
  2580. esphome/components/remote_base/jvc_protocol.h +37 -0
  2581. esphome/components/remote_base/keeloq_protocol.cpp +194 -0
  2582. esphome/components/remote_base/keeloq_protocol.h +53 -0
  2583. esphome/components/remote_base/lg_protocol.cpp +58 -0
  2584. esphome/components/remote_base/lg_protocol.h +41 -0
  2585. esphome/components/remote_base/magiquest_protocol.cpp +83 -0
  2586. esphome/components/remote_base/magiquest_protocol.h +52 -0
  2587. esphome/components/remote_base/midea_protocol.cpp +76 -0
  2588. esphome/components/remote_base/midea_protocol.h +83 -0
  2589. esphome/components/remote_base/mirage_protocol.cpp +84 -0
  2590. esphome/components/remote_base/mirage_protocol.h +39 -0
  2591. esphome/components/remote_base/nec_protocol.cpp +102 -0
  2592. esphome/components/remote_base/nec_protocol.h +41 -0
  2593. esphome/components/remote_base/nexa_protocol.cpp +240 -0
  2594. esphome/components/remote_base/nexa_protocol.h +54 -0
  2595. esphome/components/remote_base/panasonic_protocol.cpp +74 -0
  2596. esphome/components/remote_base/panasonic_protocol.h +41 -0
  2597. esphome/components/remote_base/pioneer_protocol.cpp +156 -0
  2598. esphome/components/remote_base/pioneer_protocol.h +38 -0
  2599. esphome/components/remote_base/pronto_protocol.cpp +244 -0
  2600. esphome/components/remote_base/pronto_protocol.h +55 -0
  2601. esphome/components/remote_base/raw_protocol.cpp +47 -0
  2602. esphome/components/remote_base/raw_protocol.h +86 -0
  2603. esphome/components/remote_base/rc5_protocol.cpp +90 -0
  2604. esphome/components/remote_base/rc5_protocol.h +39 -0
  2605. esphome/components/remote_base/rc6_protocol.cpp +181 -0
  2606. esphome/components/remote_base/rc6_protocol.h +46 -0
  2607. esphome/components/remote_base/rc_switch_protocol.cpp +271 -0
  2608. esphome/components/remote_base/rc_switch_protocol.h +221 -0
  2609. esphome/components/remote_base/remote_base.cpp +171 -0
  2610. esphome/components/remote_base/remote_base.h +308 -0
  2611. esphome/components/remote_base/roomba_protocol.cpp +56 -0
  2612. esphome/components/remote_base/roomba_protocol.h +35 -0
  2613. esphome/components/remote_base/samsung36_protocol.cpp +103 -0
  2614. esphome/components/remote_base/samsung36_protocol.h +41 -0
  2615. esphome/components/remote_base/samsung_protocol.cpp +65 -0
  2616. esphome/components/remote_base/samsung_protocol.h +39 -0
  2617. esphome/components/remote_base/sony_protocol.cpp +69 -0
  2618. esphome/components/remote_base/sony_protocol.h +41 -0
  2619. esphome/components/remote_base/symphony_protocol.cpp +120 -0
  2620. esphome/components/remote_base/symphony_protocol.h +44 -0
  2621. esphome/components/remote_base/toshiba_ac_protocol.cpp +115 -0
  2622. esphome/components/remote_base/toshiba_ac_protocol.h +39 -0
  2623. esphome/components/remote_base/toto_protocol.cpp +100 -0
  2624. esphome/components/remote_base/toto_protocol.h +45 -0
  2625. esphome/components/remote_receiver/__init__.py +220 -0
  2626. esphome/components/remote_receiver/binary_sensor.py +10 -0
  2627. esphome/components/remote_receiver/remote_receiver.cpp +142 -0
  2628. esphome/components/remote_receiver/remote_receiver.h +106 -0
  2629. esphome/components/remote_receiver/remote_receiver_esp32.cpp +252 -0
  2630. esphome/components/remote_transmitter/__init__.py +162 -0
  2631. esphome/components/remote_transmitter/automation.h +18 -0
  2632. esphome/components/remote_transmitter/remote_transmitter.cpp +114 -0
  2633. esphome/components/remote_transmitter/remote_transmitter.h +104 -0
  2634. esphome/components/remote_transmitter/remote_transmitter_esp32.cpp +364 -0
  2635. esphome/components/resampler/__init__.py +0 -0
  2636. esphome/components/resampler/speaker/__init__.py +102 -0
  2637. esphome/components/resampler/speaker/resampler_speaker.cpp +320 -0
  2638. esphome/components/resampler/speaker/resampler_speaker.h +109 -0
  2639. esphome/components/resistance/__init__.py +0 -0
  2640. esphome/components/resistance/resistance_sensor.cpp +47 -0
  2641. esphome/components/resistance/resistance_sensor.h +37 -0
  2642. esphome/components/resistance/sensor.py +52 -0
  2643. esphome/components/restart/__init__.py +1 -0
  2644. esphome/components/restart/button/__init__.py +25 -0
  2645. esphome/components/restart/button/restart_button.cpp +20 -0
  2646. esphome/components/restart/button/restart_button.h +18 -0
  2647. esphome/components/restart/switch/__init__.py +19 -0
  2648. esphome/components/restart/switch/restart_switch.cpp +25 -0
  2649. esphome/components/restart/switch/restart_switch.h +18 -0
  2650. esphome/components/rf_bridge/__init__.py +238 -0
  2651. esphome/components/rf_bridge/rf_bridge.cpp +236 -0
  2652. esphome/components/rf_bridge/rf_bridge.h +196 -0
  2653. esphome/components/rgb/__init__.py +0 -0
  2654. esphome/components/rgb/light.py +28 -0
  2655. esphome/components/rgb/rgb_light_output.h +36 -0
  2656. esphome/components/rgbct/__init__.py +0 -0
  2657. esphome/components/rgbct/light.py +59 -0
  2658. esphome/components/rgbct/rgbct_light_output.h +59 -0
  2659. esphome/components/rgbw/__init__.py +0 -0
  2660. esphome/components/rgbw/light.py +40 -0
  2661. esphome/components/rgbw/rgbw_light_output.h +44 -0
  2662. esphome/components/rgbww/__init__.py +0 -0
  2663. esphome/components/rgbww/light.py +69 -0
  2664. esphome/components/rgbww/rgbww_light_output.h +55 -0
  2665. esphome/components/rotary_encoder/__init__.py +0 -0
  2666. esphome/components/rotary_encoder/rotary_encoder.cpp +247 -0
  2667. esphome/components/rotary_encoder/rotary_encoder.h +138 -0
  2668. esphome/components/rotary_encoder/sensor.py +148 -0
  2669. esphome/components/rp2040/__init__.py +255 -0
  2670. esphome/components/rp2040/boards.py +28 -0
  2671. esphome/components/rp2040/build_pio.py.script +47 -0
  2672. esphome/components/rp2040/const.py +7 -0
  2673. esphome/components/rp2040/core.cpp +40 -0
  2674. esphome/components/rp2040/core.h +14 -0
  2675. esphome/components/rp2040/gpio.cpp +120 -0
  2676. esphome/components/rp2040/gpio.h +39 -0
  2677. esphome/components/rp2040/gpio.py +102 -0
  2678. esphome/components/rp2040/helpers.cpp +59 -0
  2679. esphome/components/rp2040/post_build.py.script +23 -0
  2680. esphome/components/rp2040/preferences.cpp +160 -0
  2681. esphome/components/rp2040/preferences.h +14 -0
  2682. esphome/components/rp2040_pio/__init__.py +39 -0
  2683. esphome/components/rp2040_pio_led_strip/__init__.py +1 -0
  2684. esphome/components/rp2040_pio_led_strip/led_strip.cpp +216 -0
  2685. esphome/components/rp2040_pio_led_strip/led_strip.h +133 -0
  2686. esphome/components/rp2040_pio_led_strip/light.py +280 -0
  2687. esphome/components/rp2040_pwm/__init__.py +0 -0
  2688. esphome/components/rp2040_pwm/output.py +51 -0
  2689. esphome/components/rp2040_pwm/rp2040_pwm.cpp +64 -0
  2690. esphome/components/rp2040_pwm/rp2040_pwm.h +59 -0
  2691. esphome/components/rpi_dpi_rgb/__init__.py +1 -0
  2692. esphome/components/rpi_dpi_rgb/display.py +198 -0
  2693. esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.cpp +159 -0
  2694. esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.h +97 -0
  2695. esphome/components/rtl87xx/__init__.py +61 -0
  2696. esphome/components/rtl87xx/boards.py +1404 -0
  2697. esphome/components/rtttl/__init__.py +156 -0
  2698. esphome/components/rtttl/rtttl.cpp +412 -0
  2699. esphome/components/rtttl/rtttl.h +149 -0
  2700. esphome/components/runtime_stats/__init__.py +34 -0
  2701. esphome/components/runtime_stats/runtime_stats.cpp +89 -0
  2702. esphome/components/runtime_stats/runtime_stats.h +126 -0
  2703. esphome/components/ruuvi_ble/__init__.py +22 -0
  2704. esphome/components/ruuvi_ble/ruuvi_ble.cpp +144 -0
  2705. esphome/components/ruuvi_ble/ruuvi_ble.h +37 -0
  2706. esphome/components/ruuvitag/__init__.py +0 -0
  2707. esphome/components/ruuvitag/ruuvitag.cpp +29 -0
  2708. esphome/components/ruuvitag/ruuvitag.h +83 -0
  2709. esphome/components/ruuvitag/sensor.py +163 -0
  2710. esphome/components/rx8130/__init__.py +0 -0
  2711. esphome/components/rx8130/rx8130.cpp +128 -0
  2712. esphome/components/rx8130/rx8130.h +35 -0
  2713. esphome/components/rx8130/time.py +56 -0
  2714. esphome/components/safe_mode/__init__.py +74 -0
  2715. esphome/components/safe_mode/automation.h +17 -0
  2716. esphome/components/safe_mode/button/__init__.py +34 -0
  2717. esphome/components/safe_mode/button/safe_mode_button.cpp +27 -0
  2718. esphome/components/safe_mode/button/safe_mode_button.h +21 -0
  2719. esphome/components/safe_mode/safe_mode.cpp +136 -0
  2720. esphome/components/safe_mode/safe_mode.h +53 -0
  2721. esphome/components/safe_mode/switch/__init__.py +29 -0
  2722. esphome/components/safe_mode/switch/safe_mode_switch.cpp +32 -0
  2723. esphome/components/safe_mode/switch/safe_mode_switch.h +21 -0
  2724. esphome/components/scd30/__init__.py +0 -0
  2725. esphome/components/scd30/automation.h +23 -0
  2726. esphome/components/scd30/scd30.cpp +234 -0
  2727. esphome/components/scd30/scd30.h +52 -0
  2728. esphome/components/scd30/sensor.py +139 -0
  2729. esphome/components/scd4x/__init__.py +0 -0
  2730. esphome/components/scd4x/automation.h +28 -0
  2731. esphome/components/scd4x/scd4x.cpp +327 -0
  2732. esphome/components/scd4x/scd4x.h +63 -0
  2733. esphome/components/scd4x/sensor.py +166 -0
  2734. esphome/components/script/__init__.py +239 -0
  2735. esphome/components/script/script.cpp +20 -0
  2736. esphome/components/script/script.h +342 -0
  2737. esphome/components/sdl/__init__.py +1 -0
  2738. esphome/components/sdl/binary_sensor.py +285 -0
  2739. esphome/components/sdl/display.py +114 -0
  2740. esphome/components/sdl/sdl_esphome.cpp +130 -0
  2741. esphome/components/sdl/sdl_esphome.h +72 -0
  2742. esphome/components/sdl/touchscreen/__init__.py +22 -0
  2743. esphome/components/sdl/touchscreen/sdl_touchscreen.h +26 -0
  2744. esphome/components/sdm_meter/__init__.py +0 -0
  2745. esphome/components/sdm_meter/sdm_meter.cpp +114 -0
  2746. esphome/components/sdm_meter/sdm_meter.h +83 -0
  2747. esphome/components/sdm_meter/sdm_meter_registers.h +114 -0
  2748. esphome/components/sdm_meter/sensor.py +176 -0
  2749. esphome/components/sdp3x/__init__.py +0 -0
  2750. esphome/components/sdp3x/sdp3x.cpp +120 -0
  2751. esphome/components/sdp3x/sdp3x.h +30 -0
  2752. esphome/components/sdp3x/sensor.py +52 -0
  2753. esphome/components/sds011/__init__.py +0 -0
  2754. esphome/components/sds011/sds011.cpp +190 -0
  2755. esphome/components/sds011/sds011.h +52 -0
  2756. esphome/components/sds011/sensor.py +81 -0
  2757. esphome/components/seeed_mr24hpc1/__init__.py +51 -0
  2758. esphome/components/seeed_mr24hpc1/binary_sensor.py +20 -0
  2759. esphome/components/seeed_mr24hpc1/button/__init__.py +43 -0
  2760. esphome/components/seeed_mr24hpc1/button/custom_mode_end_button.cpp +9 -0
  2761. esphome/components/seeed_mr24hpc1/button/custom_mode_end_button.h +18 -0
  2762. esphome/components/seeed_mr24hpc1/button/restart_button.cpp +9 -0
  2763. esphome/components/seeed_mr24hpc1/button/restart_button.h +18 -0
  2764. esphome/components/seeed_mr24hpc1/number/__init__.py +130 -0
  2765. esphome/components/seeed_mr24hpc1/number/custom_mode_number.cpp +12 -0
  2766. esphome/components/seeed_mr24hpc1/number/custom_mode_number.h +18 -0
  2767. esphome/components/seeed_mr24hpc1/number/custom_unman_time_number.cpp +9 -0
  2768. esphome/components/seeed_mr24hpc1/number/custom_unman_time_number.h +18 -0
  2769. esphome/components/seeed_mr24hpc1/number/existence_threshold_number.cpp +9 -0
  2770. esphome/components/seeed_mr24hpc1/number/existence_threshold_number.h +18 -0
  2771. esphome/components/seeed_mr24hpc1/number/motion_threshold_number.cpp +9 -0
  2772. esphome/components/seeed_mr24hpc1/number/motion_threshold_number.h +18 -0
  2773. esphome/components/seeed_mr24hpc1/number/motion_trigger_time_number.cpp +9 -0
  2774. esphome/components/seeed_mr24hpc1/number/motion_trigger_time_number.h +18 -0
  2775. esphome/components/seeed_mr24hpc1/number/motiontorest_time_number.cpp +9 -0
  2776. esphome/components/seeed_mr24hpc1/number/motiontorest_time_number.h +18 -0
  2777. esphome/components/seeed_mr24hpc1/number/sensitivity_number.cpp +9 -0
  2778. esphome/components/seeed_mr24hpc1/number/sensitivity_number.h +18 -0
  2779. esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.cpp +889 -0
  2780. esphome/components/seeed_mr24hpc1/seeed_mr24hpc1.h +217 -0
  2781. esphome/components/seeed_mr24hpc1/seeed_mr24hpc1_constants.h +173 -0
  2782. esphome/components/seeed_mr24hpc1/select/__init__.py +102 -0
  2783. esphome/components/seeed_mr24hpc1/select/existence_boundary_select.cpp +12 -0
  2784. esphome/components/seeed_mr24hpc1/select/existence_boundary_select.h +18 -0
  2785. esphome/components/seeed_mr24hpc1/select/motion_boundary_select.cpp +12 -0
  2786. esphome/components/seeed_mr24hpc1/select/motion_boundary_select.h +18 -0
  2787. esphome/components/seeed_mr24hpc1/select/scene_mode_select.cpp +12 -0
  2788. esphome/components/seeed_mr24hpc1/select/scene_mode_select.h +18 -0
  2789. esphome/components/seeed_mr24hpc1/select/unman_time_select.cpp +12 -0
  2790. esphome/components/seeed_mr24hpc1/select/unman_time_select.h +18 -0
  2791. esphome/components/seeed_mr24hpc1/sensor.py +83 -0
  2792. esphome/components/seeed_mr24hpc1/switch/__init__.py +30 -0
  2793. esphome/components/seeed_mr24hpc1/switch/underlyFuc_switch.cpp +12 -0
  2794. esphome/components/seeed_mr24hpc1/switch/underlyFuc_switch.h +18 -0
  2795. esphome/components/seeed_mr24hpc1/text_sensor.py +75 -0
  2796. esphome/components/seeed_mr60bha2/__init__.py +41 -0
  2797. esphome/components/seeed_mr60bha2/binary_sensor.py +23 -0
  2798. esphome/components/seeed_mr60bha2/seeed_mr60bha2.cpp +198 -0
  2799. esphome/components/seeed_mr60bha2/seeed_mr60bha2.h +50 -0
  2800. esphome/components/seeed_mr60bha2/sensor.py +65 -0
  2801. esphome/components/seeed_mr60fda2/__init__.py +41 -0
  2802. esphome/components/seeed_mr60fda2/binary_sensor.py +33 -0
  2803. esphome/components/seeed_mr60fda2/button/__init__.py +45 -0
  2804. esphome/components/seeed_mr60fda2/button/get_radar_parameters_button.cpp +9 -0
  2805. esphome/components/seeed_mr60fda2/button/get_radar_parameters_button.h +18 -0
  2806. esphome/components/seeed_mr60fda2/button/reset_radar_button.cpp +9 -0
  2807. esphome/components/seeed_mr60fda2/button/reset_radar_button.h +18 -0
  2808. esphome/components/seeed_mr60fda2/seeed_mr60fda2.cpp +366 -0
  2809. esphome/components/seeed_mr60fda2/seeed_mr60fda2.h +101 -0
  2810. esphome/components/seeed_mr60fda2/select/__init__.py +58 -0
  2811. esphome/components/seeed_mr60fda2/select/height_threshold_select.cpp +12 -0
  2812. esphome/components/seeed_mr60fda2/select/height_threshold_select.h +18 -0
  2813. esphome/components/seeed_mr60fda2/select/install_height_select.cpp +12 -0
  2814. esphome/components/seeed_mr60fda2/select/install_height_select.h +18 -0
  2815. esphome/components/seeed_mr60fda2/select/sensitivity_select.cpp +12 -0
  2816. esphome/components/seeed_mr60fda2/select/sensitivity_select.h +18 -0
  2817. esphome/components/selec_meter/__init__.py +0 -0
  2818. esphome/components/selec_meter/selec_meter.cpp +111 -0
  2819. esphome/components/selec_meter/selec_meter.h +47 -0
  2820. esphome/components/selec_meter/selec_meter_registers.h +32 -0
  2821. esphome/components/selec_meter/sensor.py +165 -0
  2822. esphome/components/select/__init__.py +241 -0
  2823. esphome/components/select/automation.h +65 -0
  2824. esphome/components/select/select.cpp +86 -0
  2825. esphome/components/select/select.h +117 -0
  2826. esphome/components/select/select_call.cpp +123 -0
  2827. esphome/components/select/select_call.h +49 -0
  2828. esphome/components/select/select_traits.cpp +16 -0
  2829. esphome/components/select/select_traits.h +18 -0
  2830. esphome/components/sen0321/__init__.py +1 -0
  2831. esphome/components/sen0321/sen0321.cpp +35 -0
  2832. esphome/components/sen0321/sen0321.h +35 -0
  2833. esphome/components/sen0321/sensor.py +34 -0
  2834. esphome/components/sen21231/__init__.py +0 -0
  2835. esphome/components/sen21231/sen21231.cpp +32 -0
  2836. esphome/components/sen21231/sen21231.h +77 -0
  2837. esphome/components/sen21231/sensor.py +24 -0
  2838. esphome/components/sen5x/__init__.py +0 -0
  2839. esphome/components/sen5x/automation.h +21 -0
  2840. esphome/components/sen5x/sen5x.cpp +447 -0
  2841. esphome/components/sen5x/sen5x.h +139 -0
  2842. esphome/components/sen5x/sensor.py +273 -0
  2843. esphome/components/senseair/__init__.py +0 -0
  2844. esphome/components/senseair/senseair.cpp +154 -0
  2845. esphome/components/senseair/senseair.h +92 -0
  2846. esphome/components/senseair/sensor.py +93 -0
  2847. esphome/components/sensirion_common/__init__.py +8 -0
  2848. esphome/components/sensirion_common/i2c_sensirion.cpp +101 -0
  2849. esphome/components/sensirion_common/i2c_sensirion.h +142 -0
  2850. esphome/components/sensor/__init__.py +1199 -0
  2851. esphome/components/sensor/automation.cpp +10 -0
  2852. esphome/components/sensor/automation.h +111 -0
  2853. esphome/components/sensor/filter.cpp +578 -0
  2854. esphome/components/sensor/filter.h +636 -0
  2855. esphome/components/sensor/sensor.cpp +144 -0
  2856. esphome/components/sensor/sensor.h +147 -0
  2857. esphome/components/servo/__init__.py +85 -0
  2858. esphome/components/servo/servo.cpp +110 -0
  2859. esphome/components/servo/servo.h +77 -0
  2860. esphome/components/sfa30/__init__.py +1 -0
  2861. esphome/components/sfa30/sensor.py +77 -0
  2862. esphome/components/sfa30/sfa30.cpp +95 -0
  2863. esphome/components/sfa30/sfa30.h +33 -0
  2864. esphome/components/sgp30/__init__.py +0 -0
  2865. esphome/components/sgp30/sensor.py +116 -0
  2866. esphome/components/sgp30/sgp30.cpp +304 -0
  2867. esphome/components/sgp30/sgp30.h +71 -0
  2868. esphome/components/sgp40/__init__.py +0 -0
  2869. esphome/components/sgp40/sensor.py +8 -0
  2870. esphome/components/sgp4x/__init__.py +0 -0
  2871. esphome/components/sgp4x/sensor.py +145 -0
  2872. esphome/components/sgp4x/sgp4x.cpp +296 -0
  2873. esphome/components/sgp4x/sgp4x.h +143 -0
  2874. esphome/components/sha256/__init__.py +22 -0
  2875. esphome/components/sha256/sha256.cpp +116 -0
  2876. esphome/components/sha256/sha256.h +60 -0
  2877. esphome/components/shelly_dimmer/__init__.py +1 -0
  2878. esphome/components/shelly_dimmer/dev_table.h +159 -0
  2879. esphome/components/shelly_dimmer/light.py +221 -0
  2880. esphome/components/shelly_dimmer/shelly_dimmer.cpp +529 -0
  2881. esphome/components/shelly_dimmer/shelly_dimmer.h +123 -0
  2882. esphome/components/shelly_dimmer/stm32flash.cpp +1065 -0
  2883. esphome/components/shelly_dimmer/stm32flash.h +131 -0
  2884. esphome/components/sht3xd/__init__.py +0 -0
  2885. esphome/components/sht3xd/sensor.py +64 -0
  2886. esphome/components/sht3xd/sht3xd.cpp +105 -0
  2887. esphome/components/sht3xd/sht3xd.h +39 -0
  2888. esphome/components/sht4x/__init__.py +0 -0
  2889. esphome/components/sht4x/sensor.py +103 -0
  2890. esphome/components/sht4x/sht4x.cpp +126 -0
  2891. esphome/components/sht4x/sht4x.h +48 -0
  2892. esphome/components/shtcx/__init__.py +0 -0
  2893. esphome/components/shtcx/sensor.py +59 -0
  2894. esphome/components/shtcx/shtcx.cpp +121 -0
  2895. esphome/components/shtcx/shtcx.h +34 -0
  2896. esphome/components/shutdown/__init__.py +1 -0
  2897. esphome/components/shutdown/button/__init__.py +17 -0
  2898. esphome/components/shutdown/button/shutdown_button.cpp +33 -0
  2899. esphome/components/shutdown/button/shutdown_button.h +18 -0
  2900. esphome/components/shutdown/switch/__init__.py +19 -0
  2901. esphome/components/shutdown/switch/shutdown_switch.cpp +38 -0
  2902. esphome/components/shutdown/switch/shutdown_switch.h +18 -0
  2903. esphome/components/sigma_delta_output/__init__.py +1 -0
  2904. esphome/components/sigma_delta_output/output.py +61 -0
  2905. esphome/components/sigma_delta_output/sigma_delta_output.cpp +57 -0
  2906. esphome/components/sigma_delta_output/sigma_delta_output.h +47 -0
  2907. esphome/components/sim800l/__init__.py +203 -0
  2908. esphome/components/sim800l/binary_sensor.py +26 -0
  2909. esphome/components/sim800l/sensor.py +34 -0
  2910. esphome/components/sim800l/sim800l.cpp +493 -0
  2911. esphome/components/sim800l/sim800l.h +223 -0
  2912. esphome/components/slow_pwm/__init__.py +0 -0
  2913. esphome/components/slow_pwm/output.py +71 -0
  2914. esphome/components/slow_pwm/slow_pwm_output.cpp +80 -0
  2915. esphome/components/slow_pwm/slow_pwm_output.h +61 -0
  2916. esphome/components/sm10bit_base/__init__.py +40 -0
  2917. esphome/components/sm10bit_base/sm10bit_base.cpp +131 -0
  2918. esphome/components/sm10bit_base/sm10bit_base.h +63 -0
  2919. esphome/components/sm16716/__init__.py +38 -0
  2920. esphome/components/sm16716/output.py +28 -0
  2921. esphome/components/sm16716/sm16716.cpp +51 -0
  2922. esphome/components/sm16716/sm16716.h +72 -0
  2923. esphome/components/sm2135/__init__.py +67 -0
  2924. esphome/components/sm2135/output.py +29 -0
  2925. esphome/components/sm2135/sm2135.cpp +151 -0
  2926. esphome/components/sm2135/sm2135.h +90 -0
  2927. esphome/components/sm2235/__init__.py +22 -0
  2928. esphome/components/sm2235/output.py +29 -0
  2929. esphome/components/sm2235/sm2235.cpp +28 -0
  2930. esphome/components/sm2235/sm2235.h +19 -0
  2931. esphome/components/sm2335/__init__.py +22 -0
  2932. esphome/components/sm2335/output.py +29 -0
  2933. esphome/components/sm2335/sm2335.cpp +28 -0
  2934. esphome/components/sm2335/sm2335.h +19 -0
  2935. esphome/components/sm300d2/__init__.py +0 -0
  2936. esphome/components/sm300d2/sensor.py +117 -0
  2937. esphome/components/sm300d2/sm300d2.cpp +108 -0
  2938. esphome/components/sm300d2/sm300d2.h +36 -0
  2939. esphome/components/sml/__init__.py +68 -0
  2940. esphome/components/sml/automation.h +19 -0
  2941. esphome/components/sml/constants.h +27 -0
  2942. esphome/components/sml/sensor/__init__.py +30 -0
  2943. esphome/components/sml/sensor/sml_sensor.cpp +41 -0
  2944. esphome/components/sml/sensor/sml_sensor.h +16 -0
  2945. esphome/components/sml/sml.cpp +148 -0
  2946. esphome/components/sml/sml.h +48 -0
  2947. esphome/components/sml/sml_parser.cpp +153 -0
  2948. esphome/components/sml/sml_parser.h +84 -0
  2949. esphome/components/sml/text_sensor/__init__.py +41 -0
  2950. esphome/components/sml/text_sensor/sml_text_sensor.cpp +54 -0
  2951. esphome/components/sml/text_sensor/sml_text_sensor.h +21 -0
  2952. esphome/components/smt100/__init__.py +1 -0
  2953. esphome/components/smt100/sensor.py +97 -0
  2954. esphome/components/smt100/smt100.cpp +84 -0
  2955. esphome/components/smt100/smt100.h +43 -0
  2956. esphome/components/sn74hc165/__init__.py +95 -0
  2957. esphome/components/sn74hc165/sn74hc165.cpp +70 -0
  2958. esphome/components/sn74hc165/sn74hc165.h +64 -0
  2959. esphome/components/sn74hc595/__init__.py +121 -0
  2960. esphome/components/sn74hc595/sn74hc595.cpp +99 -0
  2961. esphome/components/sn74hc595/sn74hc595.h +97 -0
  2962. esphome/components/sntp/__init__.py +0 -0
  2963. esphome/components/sntp/sntp_component.cpp +106 -0
  2964. esphome/components/sntp/sntp_component.h +46 -0
  2965. esphome/components/sntp/time.py +126 -0
  2966. esphome/components/socket/__init__.py +113 -0
  2967. esphome/components/socket/bsd_sockets_impl.cpp +188 -0
  2968. esphome/components/socket/headers.h +185 -0
  2969. esphome/components/socket/lwip_raw_tcp_impl.cpp +717 -0
  2970. esphome/components/socket/lwip_sockets_impl.cpp +163 -0
  2971. esphome/components/socket/socket.cpp +118 -0
  2972. esphome/components/socket/socket.h +96 -0
  2973. esphome/components/sonoff_d1/__init__.py +1 -0
  2974. esphome/components/sonoff_d1/light.py +39 -0
  2975. esphome/components/sonoff_d1/sonoff_d1.cpp +312 -0
  2976. esphome/components/sonoff_d1/sonoff_d1.h +85 -0
  2977. esphome/components/sound_level/__init__.py +0 -0
  2978. esphome/components/sound_level/sensor.py +97 -0
  2979. esphome/components/sound_level/sound_level.cpp +196 -0
  2980. esphome/components/sound_level/sound_level.h +73 -0
  2981. esphome/components/speaker/__init__.py +147 -0
  2982. esphome/components/speaker/automation.h +88 -0
  2983. esphome/components/speaker/media_player/__init__.py +452 -0
  2984. esphome/components/speaker/media_player/audio_pipeline.cpp +577 -0
  2985. esphome/components/speaker/media_player/audio_pipeline.h +160 -0
  2986. esphome/components/speaker/media_player/automation.h +26 -0
  2987. esphome/components/speaker/media_player/speaker_media_player.cpp +555 -0
  2988. esphome/components/speaker/media_player/speaker_media_player.h +151 -0
  2989. esphome/components/speaker/speaker.h +127 -0
  2990. esphome/components/speed/__init__.py +3 -0
  2991. esphome/components/speed/fan/__init__.py +52 -0
  2992. esphome/components/speed/fan/speed_fan.cpp +48 -0
  2993. esphome/components/speed/fan/speed_fan.h +35 -0
  2994. esphome/components/spi/__init__.py +459 -0
  2995. esphome/components/spi/spi.cpp +123 -0
  2996. esphome/components/spi/spi.h +513 -0
  2997. esphome/components/spi/spi_arduino.cpp +106 -0
  2998. esphome/components/spi/spi_esp_idf.cpp +271 -0
  2999. esphome/components/spi_device/__init__.py +36 -0
  3000. esphome/components/spi_device/spi_device.cpp +27 -0
  3001. esphome/components/spi_device/spi_device.h +22 -0
  3002. esphome/components/spi_led_strip/__init__.py +2 -0
  3003. esphome/components/spi_led_strip/light.py +23 -0
  3004. esphome/components/spi_led_strip/spi_led_strip.cpp +67 -0
  3005. esphome/components/spi_led_strip/spi_led_strip.h +40 -0
  3006. esphome/components/split_buffer/__init__.py +5 -0
  3007. esphome/components/split_buffer/split_buffer.cpp +144 -0
  3008. esphome/components/split_buffer/split_buffer.h +46 -0
  3009. esphome/components/sprinkler/__init__.py +835 -0
  3010. esphome/components/sprinkler/automation.h +185 -0
  3011. esphome/components/sprinkler/sprinkler.cpp +1741 -0
  3012. esphome/components/sprinkler/sprinkler.h +611 -0
  3013. esphome/components/sps30/__init__.py +0 -0
  3014. esphome/components/sps30/automation.h +26 -0
  3015. esphome/components/sps30/sensor.py +194 -0
  3016. esphome/components/sps30/sps30.cpp +293 -0
  3017. esphome/components/sps30/sps30.h +71 -0
  3018. esphome/components/ssd1306_base/__init__.py +103 -0
  3019. esphome/components/ssd1306_base/ssd1306_base.cpp +382 -0
  3020. esphome/components/ssd1306_base/ssd1306_base.h +88 -0
  3021. esphome/components/ssd1306_i2c/__init__.py +0 -0
  3022. esphome/components/ssd1306_i2c/display.py +29 -0
  3023. esphome/components/ssd1306_i2c/ssd1306_i2c.cpp +80 -0
  3024. esphome/components/ssd1306_i2c/ssd1306_i2c.h +23 -0
  3025. esphome/components/ssd1306_spi/__init__.py +0 -0
  3026. esphome/components/ssd1306_spi/display.py +38 -0
  3027. esphome/components/ssd1306_spi/ssd1306_spi.cpp +67 -0
  3028. esphome/components/ssd1306_spi/ssd1306_spi.h +29 -0
  3029. esphome/components/ssd1322_base/__init__.py +50 -0
  3030. esphome/components/ssd1322_base/ssd1322_base.cpp +204 -0
  3031. esphome/components/ssd1322_base/ssd1322_base.h +55 -0
  3032. esphome/components/ssd1322_spi/__init__.py +0 -0
  3033. esphome/components/ssd1322_spi/display.py +38 -0
  3034. esphome/components/ssd1322_spi/ssd1322_spi.cpp +70 -0
  3035. esphome/components/ssd1322_spi/ssd1322_spi.h +30 -0
  3036. esphome/components/ssd1325_base/__init__.py +54 -0
  3037. esphome/components/ssd1325_base/ssd1325_base.cpp +245 -0
  3038. esphome/components/ssd1325_base/ssd1325_base.h +60 -0
  3039. esphome/components/ssd1325_spi/__init__.py +0 -0
  3040. esphome/components/ssd1325_spi/display.py +38 -0
  3041. esphome/components/ssd1325_spi/ssd1325_spi.cpp +58 -0
  3042. esphome/components/ssd1325_spi/ssd1325_spi.h +29 -0
  3043. esphome/components/ssd1327_base/__init__.py +41 -0
  3044. esphome/components/ssd1327_base/ssd1327_base.cpp +180 -0
  3045. esphome/components/ssd1327_base/ssd1327_base.h +54 -0
  3046. esphome/components/ssd1327_i2c/__init__.py +0 -0
  3047. esphome/components/ssd1327_i2c/display.py +29 -0
  3048. esphome/components/ssd1327_i2c/ssd1327_i2c.cpp +43 -0
  3049. esphome/components/ssd1327_i2c/ssd1327_i2c.h +23 -0
  3050. esphome/components/ssd1327_spi/__init__.py +0 -0
  3051. esphome/components/ssd1327_spi/display.py +38 -0
  3052. esphome/components/ssd1327_spi/ssd1327_spi.cpp +57 -0
  3053. esphome/components/ssd1327_spi/ssd1327_spi.h +29 -0
  3054. esphome/components/ssd1331_base/__init__.py +32 -0
  3055. esphome/components/ssd1331_base/ssd1331_base.cpp +154 -0
  3056. esphome/components/ssd1331_base/ssd1331_base.h +47 -0
  3057. esphome/components/ssd1331_spi/__init__.py +0 -0
  3058. esphome/components/ssd1331_spi/display.py +38 -0
  3059. esphome/components/ssd1331_spi/ssd1331_spi.cpp +56 -0
  3060. esphome/components/ssd1331_spi/ssd1331_spi.h +29 -0
  3061. esphome/components/ssd1351_base/__init__.py +42 -0
  3062. esphome/components/ssd1351_base/ssd1351_base.cpp +196 -0
  3063. esphome/components/ssd1351_base/ssd1351_base.h +56 -0
  3064. esphome/components/ssd1351_spi/__init__.py +0 -0
  3065. esphome/components/ssd1351_spi/display.py +38 -0
  3066. esphome/components/ssd1351_spi/ssd1351_spi.cpp +70 -0
  3067. esphome/components/ssd1351_spi/ssd1351_spi.h +30 -0
  3068. esphome/components/st7567_base/__init__.py +55 -0
  3069. esphome/components/st7567_base/st7567_base.cpp +152 -0
  3070. esphome/components/st7567_base/st7567_base.h +100 -0
  3071. esphome/components/st7567_i2c/__init__.py +1 -0
  3072. esphome/components/st7567_i2c/display.py +29 -0
  3073. esphome/components/st7567_i2c/st7567_i2c.cpp +62 -0
  3074. esphome/components/st7567_i2c/st7567_i2c.h +23 -0
  3075. esphome/components/st7567_spi/__init__.py +1 -0
  3076. esphome/components/st7567_spi/display.py +38 -0
  3077. esphome/components/st7567_spi/st7567_spi.cpp +65 -0
  3078. esphome/components/st7567_spi/st7567_spi.h +29 -0
  3079. esphome/components/st7701s/__init__.py +1 -0
  3080. esphome/components/st7701s/display.py +251 -0
  3081. esphome/components/st7701s/init_sequences.py +363 -0
  3082. esphome/components/st7701s/st7701s.cpp +193 -0
  3083. esphome/components/st7701s/st7701s.h +118 -0
  3084. esphome/components/st7735/__init__.py +3 -0
  3085. esphome/components/st7735/display.py +105 -0
  3086. esphome/components/st7735/st7735.cpp +489 -0
  3087. esphome/components/st7735/st7735.h +90 -0
  3088. esphome/components/st7789v/__init__.py +3 -0
  3089. esphome/components/st7789v/display.py +209 -0
  3090. esphome/components/st7789v/st7789v.cpp +312 -0
  3091. esphome/components/st7789v/st7789v.h +172 -0
  3092. esphome/components/st7920/__init__.py +0 -0
  3093. esphome/components/st7920/display.py +41 -0
  3094. esphome/components/st7920/st7920.cpp +146 -0
  3095. esphome/components/st7920/st7920.h +51 -0
  3096. esphome/components/statsd/__init__.py +65 -0
  3097. esphome/components/statsd/statsd.cpp +162 -0
  3098. esphome/components/statsd/statsd.h +87 -0
  3099. esphome/components/status/__init__.py +0 -0
  3100. esphome/components/status/binary_sensor.py +22 -0
  3101. esphome/components/status/status_binary_sensor.cpp +37 -0
  3102. esphome/components/status/status_binary_sensor.h +20 -0
  3103. esphome/components/status_led/__init__.py +25 -0
  3104. esphome/components/status_led/light/__init__.py +36 -0
  3105. esphome/components/status_led/light/status_led_light.cpp +75 -0
  3106. esphome/components/status_led/light/status_led_light.h +44 -0
  3107. esphome/components/status_led/status_led.cpp +34 -0
  3108. esphome/components/status_led/status_led.h +26 -0
  3109. esphome/components/stepper/__init__.py +183 -0
  3110. esphome/components/stepper/stepper.cpp +51 -0
  3111. esphome/components/stepper/stepper.h +112 -0
  3112. esphome/components/sts3x/__init__.py +0 -0
  3113. esphome/components/sts3x/sensor.py +35 -0
  3114. esphome/components/sts3x/sts3x.cpp +70 -0
  3115. esphome/components/sts3x/sts3x.h +22 -0
  3116. esphome/components/stts22h/__init__.py +1 -0
  3117. esphome/components/stts22h/sensor.py +33 -0
  3118. esphome/components/stts22h/stts22h.cpp +101 -0
  3119. esphome/components/stts22h/stts22h.h +21 -0
  3120. esphome/components/substitutions/__init__.py +239 -0
  3121. esphome/components/substitutions/jinja.py +255 -0
  3122. esphome/components/sun/__init__.py +180 -0
  3123. esphome/components/sun/sensor/__init__.py +40 -0
  3124. esphome/components/sun/sensor/sun_sensor.cpp +12 -0
  3125. esphome/components/sun/sensor/sun_sensor.h +41 -0
  3126. esphome/components/sun/sun.cpp +321 -0
  3127. esphome/components/sun/sun.h +133 -0
  3128. esphome/components/sun/text_sensor/__init__.py +59 -0
  3129. esphome/components/sun/text_sensor/sun_text_sensor.cpp +12 -0
  3130. esphome/components/sun/text_sensor/sun_text_sensor.h +44 -0
  3131. esphome/components/sun_gtil2/__init__.py +26 -0
  3132. esphome/components/sun_gtil2/sensor.py +88 -0
  3133. esphome/components/sun_gtil2/sun_gtil2.cpp +135 -0
  3134. esphome/components/sun_gtil2/sun_gtil2.h +58 -0
  3135. esphome/components/sun_gtil2/text_sensor.py +32 -0
  3136. esphome/components/switch/__init__.py +230 -0
  3137. esphome/components/switch/automation.cpp +10 -0
  3138. esphome/components/switch/automation.h +108 -0
  3139. esphome/components/switch/binary_sensor/__init__.py +31 -0
  3140. esphome/components/switch/binary_sensor/switch_binary_sensor.cpp +17 -0
  3141. esphome/components/switch/binary_sensor/switch_binary_sensor.h +21 -0
  3142. esphome/components/switch/switch.cpp +115 -0
  3143. esphome/components/switch/switch.h +150 -0
  3144. esphome/components/sx126x/__init__.py +336 -0
  3145. esphome/components/sx126x/automation.h +68 -0
  3146. esphome/components/sx126x/packet_transport/__init__.py +26 -0
  3147. esphome/components/sx126x/packet_transport/sx126x_transport.cpp +26 -0
  3148. esphome/components/sx126x/packet_transport/sx126x_transport.h +25 -0
  3149. esphome/components/sx126x/sx126x.cpp +538 -0
  3150. esphome/components/sx126x/sx126x.h +148 -0
  3151. esphome/components/sx126x/sx126x_reg.h +165 -0
  3152. esphome/components/sx127x/__init__.py +329 -0
  3153. esphome/components/sx127x/automation.h +68 -0
  3154. esphome/components/sx127x/packet_transport/__init__.py +26 -0
  3155. esphome/components/sx127x/packet_transport/sx127x_transport.cpp +26 -0
  3156. esphome/components/sx127x/packet_transport/sx127x_transport.h +25 -0
  3157. esphome/components/sx127x/sx127x.cpp +496 -0
  3158. esphome/components/sx127x/sx127x.h +128 -0
  3159. esphome/components/sx127x/sx127x_reg.h +295 -0
  3160. esphome/components/sx1509/__init__.py +154 -0
  3161. esphome/components/sx1509/binary_sensor/__init__.py +26 -0
  3162. esphome/components/sx1509/binary_sensor/sx1509_binary_keypad_sensor.h +19 -0
  3163. esphome/components/sx1509/output/__init__.py +29 -0
  3164. esphome/components/sx1509/output/sx1509_float_output.cpp +31 -0
  3165. esphome/components/sx1509/output/sx1509_float_output.h +27 -0
  3166. esphome/components/sx1509/sx1509.cpp +317 -0
  3167. esphome/components/sx1509/sx1509.h +101 -0
  3168. esphome/components/sx1509/sx1509_gpio_pin.cpp +22 -0
  3169. esphome/components/sx1509/sx1509_gpio_pin.h +33 -0
  3170. esphome/components/sx1509/sx1509_registers.h +110 -0
  3171. esphome/components/syslog/__init__.py +41 -0
  3172. esphome/components/syslog/esphome_syslog.cpp +50 -0
  3173. esphome/components/syslog/esphome_syslog.h +29 -0
  3174. esphome/components/t6615/__init__.py +0 -0
  3175. esphome/components/t6615/sensor.py +46 -0
  3176. esphome/components/t6615/t6615.cpp +97 -0
  3177. esphome/components/t6615/t6615.h +44 -0
  3178. esphome/components/tc74/__init__.py +1 -0
  3179. esphome/components/tc74/sensor.py +32 -0
  3180. esphome/components/tc74/tc74.cpp +67 -0
  3181. esphome/components/tc74/tc74.h +28 -0
  3182. esphome/components/tca9548a/__init__.py +43 -0
  3183. esphome/components/tca9548a/tca9548a.cpp +48 -0
  3184. esphome/components/tca9548a/tca9548a.h +39 -0
  3185. esphome/components/tca9555/__init__.py +72 -0
  3186. esphome/components/tca9555/tca9555.cpp +144 -0
  3187. esphome/components/tca9555/tca9555.h +66 -0
  3188. esphome/components/tcl112/__init__.py +0 -0
  3189. esphome/components/tcl112/climate.py +14 -0
  3190. esphome/components/tcl112/tcl112.cpp +244 -0
  3191. esphome/components/tcl112/tcl112.h +28 -0
  3192. esphome/components/tcs34725/__init__.py +0 -0
  3193. esphome/components/tcs34725/sensor.py +132 -0
  3194. esphome/components/tcs34725/tcs34725.cpp +353 -0
  3195. esphome/components/tcs34725/tcs34725.h +90 -0
  3196. esphome/components/tee501/__init__.py +0 -0
  3197. esphome/components/tee501/sensor.py +36 -0
  3198. esphome/components/tee501/tee501.cpp +66 -0
  3199. esphome/components/tee501/tee501.h +23 -0
  3200. esphome/components/teleinfo/__init__.py +40 -0
  3201. esphome/components/teleinfo/sensor/__init__.py +22 -0
  3202. esphome/components/teleinfo/sensor/teleinfo_sensor.cpp +14 -0
  3203. esphome/components/teleinfo/sensor/teleinfo_sensor.h +16 -0
  3204. esphome/components/teleinfo/teleinfo.cpp +209 -0
  3205. esphome/components/teleinfo/teleinfo.h +54 -0
  3206. esphome/components/teleinfo/text_sensor/__init__.py +21 -0
  3207. esphome/components/teleinfo/text_sensor/teleinfo_text_sensor.cpp +11 -0
  3208. esphome/components/teleinfo/text_sensor/teleinfo_text_sensor.h +13 -0
  3209. esphome/components/tem3200/__init__.py +0 -0
  3210. esphome/components/tem3200/sensor.py +54 -0
  3211. esphome/components/tem3200/tem3200.cpp +148 -0
  3212. esphome/components/tem3200/tem3200.h +30 -0
  3213. esphome/components/template/__init__.py +3 -0
  3214. esphome/components/template/alarm_control_panel/__init__.py +163 -0
  3215. esphome/components/template/alarm_control_panel/template_alarm_control_panel.cpp +288 -0
  3216. esphome/components/template/alarm_control_panel/template_alarm_control_panel.h +171 -0
  3217. esphome/components/template/binary_sensor/__init__.py +68 -0
  3218. esphome/components/template/binary_sensor/template_binary_sensor.cpp +25 -0
  3219. esphome/components/template/binary_sensor/template_binary_sensor.h +23 -0
  3220. esphome/components/template/button/__init__.py +11 -0
  3221. esphome/components/template/button/template_button.h +13 -0
  3222. esphome/components/template/cover/__init__.py +146 -0
  3223. esphome/components/template/cover/template_cover.cpp +135 -0
  3224. esphome/components/template/cover/template_cover.h +65 -0
  3225. esphome/components/template/datetime/__init__.py +150 -0
  3226. esphome/components/template/datetime/template_date.cpp +108 -0
  3227. esphome/components/template/datetime/template_date.h +45 -0
  3228. esphome/components/template/datetime/template_datetime.cpp +147 -0
  3229. esphome/components/template/datetime/template_datetime.h +45 -0
  3230. esphome/components/template/datetime/template_time.cpp +108 -0
  3231. esphome/components/template/datetime/template_time.h +45 -0
  3232. esphome/components/template/event/__init__.py +21 -0
  3233. esphome/components/template/event/template_event.h +10 -0
  3234. esphome/components/template/fan/__init__.py +41 -0
  3235. esphome/components/template/fan/template_fan.cpp +36 -0
  3236. esphome/components/template/fan/template_fan.h +29 -0
  3237. esphome/components/template/lock/__init__.py +99 -0
  3238. esphome/components/template/lock/automation.h +16 -0
  3239. esphome/components/template/lock/template_lock.cpp +58 -0
  3240. esphome/components/template/lock/template_lock.h +38 -0
  3241. esphome/components/template/number/__init__.py +94 -0
  3242. esphome/components/template/number/template_number.cpp +53 -0
  3243. esphome/components/template/number/template_number.h +36 -0
  3244. esphome/components/template/output/__init__.py +48 -0
  3245. esphome/components/template/output/template_output.h +29 -0
  3246. esphome/components/template/select/__init__.py +92 -0
  3247. esphome/components/template/select/template_select.cpp +65 -0
  3248. esphome/components/template/select/template_select.h +36 -0
  3249. esphome/components/template/sensor/__init__.py +53 -0
  3250. esphome/components/template/sensor/template_sensor.cpp +26 -0
  3251. esphome/components/template/sensor/template_sensor.h +23 -0
  3252. esphome/components/template/switch/__init__.py +93 -0
  3253. esphome/components/template/switch/template_switch.cpp +59 -0
  3254. esphome/components/template/switch/template_switch.h +39 -0
  3255. esphome/components/template/text/__init__.py +94 -0
  3256. esphome/components/template/text/template_text.cpp +53 -0
  3257. esphome/components/template/text/template_text.h +86 -0
  3258. esphome/components/template/text_sensor/__init__.py +52 -0
  3259. esphome/components/template/text_sensor/template_text_sensor.cpp +22 -0
  3260. esphome/components/template/text_sensor/template_text_sensor.h +24 -0
  3261. esphome/components/template/valve/__init__.py +130 -0
  3262. esphome/components/template/valve/automation.h +22 -0
  3263. esphome/components/template/valve/template_valve.cpp +129 -0
  3264. esphome/components/template/valve/template_valve.h +59 -0
  3265. esphome/components/text/__init__.py +173 -0
  3266. esphome/components/text/automation.h +33 -0
  3267. esphome/components/text/text.cpp +31 -0
  3268. esphome/components/text/text.h +51 -0
  3269. esphome/components/text/text_call.cpp +56 -0
  3270. esphome/components/text/text_call.h +25 -0
  3271. esphome/components/text/text_traits.h +41 -0
  3272. esphome/components/text_sensor/__init__.py +260 -0
  3273. esphome/components/text_sensor/automation.h +50 -0
  3274. esphome/components/text_sensor/filter.cpp +104 -0
  3275. esphome/components/text_sensor/filter.h +161 -0
  3276. esphome/components/text_sensor/text_sensor.cpp +105 -0
  3277. esphome/components/text_sensor/text_sensor.h +76 -0
  3278. esphome/components/thermopro_ble/__init__.py +0 -0
  3279. esphome/components/thermopro_ble/sensor.py +97 -0
  3280. esphome/components/thermopro_ble/thermopro_ble.cpp +204 -0
  3281. esphome/components/thermopro_ble/thermopro_ble.h +49 -0
  3282. esphome/components/thermostat/__init__.py +0 -0
  3283. esphome/components/thermostat/climate.py +1044 -0
  3284. esphome/components/thermostat/thermostat_climate.cpp +1657 -0
  3285. esphome/components/thermostat/thermostat_climate.h +558 -0
  3286. esphome/components/time/__init__.py +362 -0
  3287. esphome/components/time/automation.cpp +96 -0
  3288. esphome/components/time/automation.h +52 -0
  3289. esphome/components/time/real_time_clock.cpp +82 -0
  3290. esphome/components/time/real_time_clock.h +79 -0
  3291. esphome/components/time_based/__init__.py +0 -0
  3292. esphome/components/time_based/cover.py +58 -0
  3293. esphome/components/time_based/time_based_cover.cpp +186 -0
  3294. esphome/components/time_based/time_based_cover.h +55 -0
  3295. esphome/components/tinyusb/__init__.py +61 -0
  3296. esphome/components/tinyusb/tinyusb_component.cpp +44 -0
  3297. esphome/components/tinyusb/tinyusb_component.h +72 -0
  3298. esphome/components/tlc59208f/__init__.py +26 -0
  3299. esphome/components/tlc59208f/output.py +27 -0
  3300. esphome/components/tlc59208f/tlc59208f_output.cpp +157 -0
  3301. esphome/components/tlc59208f/tlc59208f_output.h +69 -0
  3302. esphome/components/tlc5947/__init__.py +49 -0
  3303. esphome/components/tlc5947/output/__init__.py +28 -0
  3304. esphome/components/tlc5947/output/tlc5947_output.cpp +12 -0
  3305. esphome/components/tlc5947/output/tlc5947_output.h +22 -0
  3306. esphome/components/tlc5947/tlc5947.cpp +71 -0
  3307. esphome/components/tlc5947/tlc5947.h +46 -0
  3308. esphome/components/tlc5971/__init__.py +34 -0
  3309. esphome/components/tlc5971/output/__init__.py +28 -0
  3310. esphome/components/tlc5971/output/tlc5971_output.cpp +12 -0
  3311. esphome/components/tlc5971/output/tlc5971_output.h +22 -0
  3312. esphome/components/tlc5971/tlc5971.cpp +102 -0
  3313. esphome/components/tlc5971/tlc5971.h +43 -0
  3314. esphome/components/tm1621/__init__.py +1 -0
  3315. esphome/components/tm1621/display.py +46 -0
  3316. esphome/components/tm1621/tm1621.cpp +281 -0
  3317. esphome/components/tm1621/tm1621.h +75 -0
  3318. esphome/components/tm1637/__init__.py +0 -0
  3319. esphome/components/tm1637/binary_sensor.py +25 -0
  3320. esphome/components/tm1637/display.py +52 -0
  3321. esphome/components/tm1637/tm1637.cpp +382 -0
  3322. esphome/components/tm1637/tm1637.h +103 -0
  3323. esphome/components/tm1638/__init__.py +0 -0
  3324. esphome/components/tm1638/binary_sensor/__init__.py +22 -0
  3325. esphome/components/tm1638/binary_sensor/tm1638_key.cpp +13 -0
  3326. esphome/components/tm1638/binary_sensor/tm1638_key.h +19 -0
  3327. esphome/components/tm1638/display.py +54 -0
  3328. esphome/components/tm1638/output/__init__.py +26 -0
  3329. esphome/components/tm1638/output/tm1638_output_led.cpp +17 -0
  3330. esphome/components/tm1638/output/tm1638_output_led.h +25 -0
  3331. esphome/components/tm1638/sevenseg.h +107 -0
  3332. esphome/components/tm1638/switch/__init__.py +28 -0
  3333. esphome/components/tm1638/switch/tm1638_switch_led.cpp +20 -0
  3334. esphome/components/tm1638/switch/tm1638_switch_led.h +23 -0
  3335. esphome/components/tm1638/tm1638.cpp +286 -0
  3336. esphome/components/tm1638/tm1638.h +79 -0
  3337. esphome/components/tm1651/__init__.py +136 -0
  3338. esphome/components/tm1651/tm1651.cpp +260 -0
  3339. esphome/components/tm1651/tm1651.h +101 -0
  3340. esphome/components/tmp102/__init__.py +9 -0
  3341. esphome/components/tmp102/sensor.py +44 -0
  3342. esphome/components/tmp102/tmp102.cpp +52 -0
  3343. esphome/components/tmp102/tmp102.h +19 -0
  3344. esphome/components/tmp1075/__init__.py +1 -0
  3345. esphome/components/tmp1075/sensor.py +92 -0
  3346. esphome/components/tmp1075/tmp1075.cpp +128 -0
  3347. esphome/components/tmp1075/tmp1075.h +89 -0
  3348. esphome/components/tmp117/__init__.py +0 -0
  3349. esphome/components/tmp117/sensor.py +80 -0
  3350. esphome/components/tmp117/tmp117.cpp +74 -0
  3351. esphome/components/tmp117/tmp117.h +27 -0
  3352. esphome/components/tof10120/__init__.py +0 -0
  3353. esphome/components/tof10120/sensor.py +34 -0
  3354. esphome/components/tof10120/tof10120_sensor.cpp +60 -0
  3355. esphome/components/tof10120/tof10120_sensor.h +18 -0
  3356. esphome/components/tormatic/__init__.py +1 -0
  3357. esphome/components/tormatic/cover.py +42 -0
  3358. esphome/components/tormatic/tormatic_cover.cpp +357 -0
  3359. esphome/components/tormatic/tormatic_cover.h +59 -0
  3360. esphome/components/tormatic/tormatic_protocol.h +211 -0
  3361. esphome/components/toshiba/__init__.py +0 -0
  3362. esphome/components/toshiba/climate.py +29 -0
  3363. esphome/components/toshiba/toshiba.cpp +1368 -0
  3364. esphome/components/toshiba/toshiba.h +86 -0
  3365. esphome/components/total_daily_energy/__init__.py +0 -0
  3366. esphome/components/total_daily_energy/sensor.py +92 -0
  3367. esphome/components/total_daily_energy/total_daily_energy.cpp +75 -0
  3368. esphome/components/total_daily_energy/total_daily_energy.h +45 -0
  3369. esphome/components/touchscreen/__init__.py +158 -0
  3370. esphome/components/touchscreen/binary_sensor/__init__.py +86 -0
  3371. esphome/components/touchscreen/binary_sensor/touchscreen_binary_sensor.cpp +34 -0
  3372. esphome/components/touchscreen/binary_sensor/touchscreen_binary_sensor.h +48 -0
  3373. esphome/components/touchscreen/touchscreen.cpp +166 -0
  3374. esphome/components/touchscreen/touchscreen.h +119 -0
  3375. esphome/components/tsl2561/__init__.py +0 -0
  3376. esphome/components/tsl2561/sensor.py +69 -0
  3377. esphome/components/tsl2561/tsl2561.cpp +165 -0
  3378. esphome/components/tsl2561/tsl2561.h +87 -0
  3379. esphome/components/tsl2591/__init__.py +1 -0
  3380. esphome/components/tsl2591/sensor.py +172 -0
  3381. esphome/components/tsl2591/tsl2591.cpp +479 -0
  3382. esphome/components/tsl2591/tsl2591.h +276 -0
  3383. esphome/components/tt21100/__init__.py +5 -0
  3384. esphome/components/tt21100/binary_sensor/__init__.py +31 -0
  3385. esphome/components/tt21100/binary_sensor/tt21100_button.cpp +27 -0
  3386. esphome/components/tt21100/binary_sensor/tt21100_button.h +28 -0
  3387. esphome/components/tt21100/touchscreen/__init__.py +40 -0
  3388. esphome/components/tt21100/touchscreen/tt21100.cpp +143 -0
  3389. esphome/components/tt21100/touchscreen/tt21100.h +43 -0
  3390. esphome/components/ttp229_bsf/__init__.py +30 -0
  3391. esphome/components/ttp229_bsf/binary_sensor.py +24 -0
  3392. esphome/components/ttp229_bsf/ttp229_bsf.cpp +22 -0
  3393. esphome/components/ttp229_bsf/ttp229_bsf.h +55 -0
  3394. esphome/components/ttp229_lsf/__init__.py +31 -0
  3395. esphome/components/ttp229_lsf/binary_sensor.py +24 -0
  3396. esphome/components/ttp229_lsf/ttp229_lsf.cpp +44 -0
  3397. esphome/components/ttp229_lsf/ttp229_lsf.h +37 -0
  3398. esphome/components/tuya/__init__.py +131 -0
  3399. esphome/components/tuya/automation.cpp +67 -0
  3400. esphome/components/tuya/automation.h +55 -0
  3401. esphome/components/tuya/binary_sensor/__init__.py +34 -0
  3402. esphome/components/tuya/binary_sensor/tuya_binary_sensor.cpp +22 -0
  3403. esphome/components/tuya/binary_sensor/tuya_binary_sensor.h +24 -0
  3404. esphome/components/tuya/climate/__init__.py +273 -0
  3405. esphome/components/tuya/climate/tuya_climate.cpp +495 -0
  3406. esphome/components/tuya/climate/tuya_climate.h +129 -0
  3407. esphome/components/tuya/cover/__init__.py +75 -0
  3408. esphome/components/tuya/cover/tuya_cover.cpp +140 -0
  3409. esphome/components/tuya/cover/tuya_cover.h +50 -0
  3410. esphome/components/tuya/fan/__init__.py +47 -0
  3411. esphome/components/tuya/fan/tuya_fan.cpp +107 -0
  3412. esphome/components/tuya/fan/tuya_fan.h +36 -0
  3413. esphome/components/tuya/light/__init__.py +123 -0
  3414. esphome/components/tuya/light/tuya_light.cpp +226 -0
  3415. esphome/components/tuya/light/tuya_light.h +71 -0
  3416. esphome/components/tuya/number/__init__.py +98 -0
  3417. esphome/components/tuya/number/tuya_number.cpp +95 -0
  3418. esphome/components/tuya/number/tuya_number.h +38 -0
  3419. esphome/components/tuya/select/__init__.py +61 -0
  3420. esphome/components/tuya/select/tuya_select.cpp +51 -0
  3421. esphome/components/tuya/select/tuya_select.h +36 -0
  3422. esphome/components/tuya/sensor/__init__.py +33 -0
  3423. esphome/components/tuya/sensor/tuya_sensor.cpp +34 -0
  3424. esphome/components/tuya/sensor/tuya_sensor.h +24 -0
  3425. esphome/components/tuya/switch/__init__.py +32 -0
  3426. esphome/components/tuya/switch/tuya_switch.cpp +28 -0
  3427. esphome/components/tuya/switch/tuya_switch.h +26 -0
  3428. esphome/components/tuya/text_sensor/__init__.py +33 -0
  3429. esphome/components/tuya/text_sensor/tuya_text_sensor.cpp +41 -0
  3430. esphome/components/tuya/text_sensor/tuya_text_sensor.h +24 -0
  3431. esphome/components/tuya/tuya.cpp +739 -0
  3432. esphome/components/tuya/tuya.h +166 -0
  3433. esphome/components/tx20/__init__.py +0 -0
  3434. esphome/components/tx20/sensor.py +54 -0
  3435. esphome/components/tx20/tx20.cpp +196 -0
  3436. esphome/components/tx20/tx20.h +52 -0
  3437. esphome/components/uart/__init__.py +546 -0
  3438. esphome/components/uart/automation.h +43 -0
  3439. esphome/components/uart/button/__init__.py +36 -0
  3440. esphome/components/uart/button/uart_button.cpp +15 -0
  3441. esphome/components/uart/button/uart_button.h +23 -0
  3442. esphome/components/uart/packet_transport/__init__.py +20 -0
  3443. esphome/components/uart/packet_transport/uart_transport.cpp +87 -0
  3444. esphome/components/uart/packet_transport/uart_transport.h +39 -0
  3445. esphome/components/uart/switch/__init__.py +59 -0
  3446. esphome/components/uart/switch/uart_switch.cpp +60 -0
  3447. esphome/components/uart/switch/uart_switch.h +35 -0
  3448. esphome/components/uart/uart.cpp +45 -0
  3449. esphome/components/uart/uart.h +76 -0
  3450. esphome/components/uart/uart_component.cpp +30 -0
  3451. esphome/components/uart/uart_component.h +201 -0
  3452. esphome/components/uart/uart_component_esp8266.cpp +334 -0
  3453. esphome/components/uart/uart_component_esp8266.h +91 -0
  3454. esphome/components/uart/uart_component_esp_idf.cpp +409 -0
  3455. esphome/components/uart/uart_component_esp_idf.h +66 -0
  3456. esphome/components/uart/uart_component_host.cpp +299 -0
  3457. esphome/components/uart/uart_component_host.h +35 -0
  3458. esphome/components/uart/uart_component_libretiny.cpp +190 -0
  3459. esphome/components/uart/uart_component_libretiny.h +40 -0
  3460. esphome/components/uart/uart_component_rp2040.cpp +196 -0
  3461. esphome/components/uart/uart_component_rp2040.h +43 -0
  3462. esphome/components/uart/uart_debugger.cpp +200 -0
  3463. esphome/components/uart/uart_debugger.h +99 -0
  3464. esphome/components/udp/__init__.py +165 -0
  3465. esphome/components/udp/automation.h +45 -0
  3466. esphome/components/udp/binary_sensor.py +5 -0
  3467. esphome/components/udp/packet_transport/__init__.py +29 -0
  3468. esphome/components/udp/packet_transport/udp_transport.cpp +36 -0
  3469. esphome/components/udp/packet_transport/udp_transport.h +28 -0
  3470. esphome/components/udp/sensor.py +5 -0
  3471. esphome/components/udp/udp_component.cpp +164 -0
  3472. esphome/components/udp/udp_component.h +59 -0
  3473. esphome/components/ufire_ec/__init__.py +1 -0
  3474. esphome/components/ufire_ec/sensor.py +125 -0
  3475. esphome/components/ufire_ec/ufire_ec.cpp +118 -0
  3476. esphome/components/ufire_ec/ufire_ec.h +87 -0
  3477. esphome/components/ufire_ise/__init__.py +1 -0
  3478. esphome/components/ufire_ise/sensor.py +126 -0
  3479. esphome/components/ufire_ise/ufire_ise.cpp +151 -0
  3480. esphome/components/ufire_ise/ufire_ise.h +95 -0
  3481. esphome/components/uln2003/__init__.py +0 -0
  3482. esphome/components/uln2003/stepper.py +56 -0
  3483. esphome/components/uln2003/uln2003.cpp +92 -0
  3484. esphome/components/uln2003/uln2003.h +44 -0
  3485. esphome/components/ultrasonic/__init__.py +1 -0
  3486. esphome/components/ultrasonic/sensor.py +53 -0
  3487. esphome/components/ultrasonic/ultrasonic_sensor.cpp +64 -0
  3488. esphome/components/ultrasonic/ultrasonic_sensor.h +46 -0
  3489. esphome/components/update/__init__.py +160 -0
  3490. esphome/components/update/automation.h +23 -0
  3491. esphome/components/update/update_entity.cpp +42 -0
  3492. esphome/components/update/update_entity.h +58 -0
  3493. esphome/components/uponor_smatrix/__init__.py +81 -0
  3494. esphome/components/uponor_smatrix/climate/__init__.py +28 -0
  3495. esphome/components/uponor_smatrix/climate/uponor_smatrix_climate.cpp +101 -0
  3496. esphome/components/uponor_smatrix/climate/uponor_smatrix_climate.h +28 -0
  3497. esphome/components/uponor_smatrix/sensor/__init__.py +80 -0
  3498. esphome/components/uponor_smatrix/sensor/uponor_smatrix_sensor.cpp +44 -0
  3499. esphome/components/uponor_smatrix/sensor/uponor_smatrix_sensor.h +24 -0
  3500. esphome/components/uponor_smatrix/uponor_smatrix.cpp +217 -0
  3501. esphome/components/uponor_smatrix/uponor_smatrix.h +127 -0
  3502. esphome/components/uptime/__init__.py +0 -0
  3503. esphome/components/uptime/sensor/__init__.py +61 -0
  3504. esphome/components/uptime/sensor/uptime_seconds_sensor.cpp +37 -0
  3505. esphome/components/uptime/sensor/uptime_seconds_sensor.h +21 -0
  3506. esphome/components/uptime/sensor/uptime_timestamp_sensor.cpp +39 -0
  3507. esphome/components/uptime/sensor/uptime_timestamp_sensor.h +30 -0
  3508. esphome/components/uptime/text_sensor/__init__.py +59 -0
  3509. esphome/components/uptime/text_sensor/uptime_text_sensor.cpp +68 -0
  3510. esphome/components/uptime/text_sensor/uptime_text_sensor.h +44 -0
  3511. esphome/components/usb_cdc_acm/__init__.py +76 -0
  3512. esphome/components/usb_cdc_acm/usb_cdc_acm.cpp +495 -0
  3513. esphome/components/usb_cdc_acm/usb_cdc_acm.h +135 -0
  3514. esphome/components/usb_host/__init__.py +83 -0
  3515. esphome/components/usb_host/usb_host.h +191 -0
  3516. esphome/components/usb_host/usb_host_client.cpp +534 -0
  3517. esphome/components/usb_host/usb_host_component.cpp +34 -0
  3518. esphome/components/usb_uart/__init__.py +138 -0
  3519. esphome/components/usb_uart/ch34x.cpp +81 -0
  3520. esphome/components/usb_uart/cp210x.cpp +126 -0
  3521. esphome/components/usb_uart/usb_uart.cpp +395 -0
  3522. esphome/components/usb_uart/usb_uart.h +176 -0
  3523. esphome/components/valve/__init__.py +233 -0
  3524. esphome/components/valve/automation.h +111 -0
  3525. esphome/components/valve/valve.cpp +185 -0
  3526. esphome/components/valve/valve.h +153 -0
  3527. esphome/components/valve/valve_traits.h +27 -0
  3528. esphome/components/vbus/__init__.py +33 -0
  3529. esphome/components/vbus/binary_sensor/__init__.py +349 -0
  3530. esphome/components/vbus/binary_sensor/vbus_binary_sensor.cpp +165 -0
  3531. esphome/components/vbus/binary_sensor/vbus_binary_sensor.h +136 -0
  3532. esphome/components/vbus/sensor/__init__.py +691 -0
  3533. esphome/components/vbus/sensor/vbus_sensor.cpp +250 -0
  3534. esphome/components/vbus/sensor/vbus_sensor.h +182 -0
  3535. esphome/components/vbus/vbus.cpp +125 -0
  3536. esphome/components/vbus/vbus.h +51 -0
  3537. esphome/components/veml3235/__init__.py +0 -0
  3538. esphome/components/veml3235/sensor.py +84 -0
  3539. esphome/components/veml3235/veml3235.cpp +229 -0
  3540. esphome/components/veml3235/veml3235.h +108 -0
  3541. esphome/components/veml7700/__init__.py +1 -0
  3542. esphome/components/veml7700/sensor.py +190 -0
  3543. esphome/components/veml7700/veml7700.cpp +438 -0
  3544. esphome/components/veml7700/veml7700.h +200 -0
  3545. esphome/components/version/__init__.py +1 -0
  3546. esphome/components/version/text_sensor.py +29 -0
  3547. esphome/components/version/version_text_sensor.cpp +24 -0
  3548. esphome/components/version/version_text_sensor.h +21 -0
  3549. esphome/components/vl53l0x/LICENSE.txt +80 -0
  3550. esphome/components/vl53l0x/__init__.py +0 -0
  3551. esphome/components/vl53l0x/sensor.py +87 -0
  3552. esphome/components/vl53l0x/vl53l0x_sensor.cpp +534 -0
  3553. esphome/components/vl53l0x/vl53l0x_sensor.h +75 -0
  3554. esphome/components/voice_assistant/__init__.py +435 -0
  3555. esphome/components/voice_assistant/voice_assistant.cpp +999 -0
  3556. esphome/components/voice_assistant/voice_assistant.h +363 -0
  3557. esphome/components/voltage_sampler/__init__.py +4 -0
  3558. esphome/components/voltage_sampler/voltage_sampler.h +16 -0
  3559. esphome/components/wake_on_lan/__init__.py +1 -0
  3560. esphome/components/wake_on_lan/button.py +37 -0
  3561. esphome/components/wake_on_lan/wake_on_lan.cpp +89 -0
  3562. esphome/components/wake_on_lan/wake_on_lan.h +36 -0
  3563. esphome/components/watchdog/__init__.py +1 -0
  3564. esphome/components/watchdog/watchdog.cpp +71 -0
  3565. esphome/components/watchdog/watchdog.h +24 -0
  3566. esphome/components/waveshare_epaper/__init__.py +1 -0
  3567. esphome/components/waveshare_epaper/display.py +261 -0
  3568. esphome/components/waveshare_epaper/waveshare_213v3.cpp +192 -0
  3569. esphome/components/waveshare_epaper/waveshare_epaper.cpp +4754 -0
  3570. esphome/components/waveshare_epaper/waveshare_epaper.h +1103 -0
  3571. esphome/components/web_server/__init__.py +348 -0
  3572. esphome/components/web_server/list_entities.cpp +155 -0
  3573. esphome/components/web_server/list_entities.h +101 -0
  3574. esphome/components/web_server/ota/__init__.py +89 -0
  3575. esphome/components/web_server/ota/ota_web_server.cpp +246 -0
  3576. esphome/components/web_server/ota/ota_web_server.h +26 -0
  3577. esphome/components/web_server/server_index_v2.h +651 -0
  3578. esphome/components/web_server/server_index_v3.h +4055 -0
  3579. esphome/components/web_server/web_server.cpp +2088 -0
  3580. esphome/components/web_server/web_server.h +604 -0
  3581. esphome/components/web_server/web_server_v1.cpp +219 -0
  3582. esphome/components/web_server_base/__init__.py +49 -0
  3583. esphome/components/web_server_base/web_server_base.cpp +35 -0
  3584. esphome/components/web_server_base/web_server_base.h +142 -0
  3585. esphome/components/web_server_idf/__init__.py +14 -0
  3586. esphome/components/web_server_idf/multipart.cpp +254 -0
  3587. esphome/components/web_server_idf/multipart.h +86 -0
  3588. esphome/components/web_server_idf/utils.cpp +125 -0
  3589. esphome/components/web_server_idf/utils.h +27 -0
  3590. esphome/components/web_server_idf/web_server_idf.cpp +895 -0
  3591. esphome/components/web_server_idf/web_server_idf.h +353 -0
  3592. esphome/components/weikai/__init__.py +110 -0
  3593. esphome/components/weikai/weikai.cpp +565 -0
  3594. esphome/components/weikai/weikai.h +445 -0
  3595. esphome/components/weikai/wk_reg_def.h +304 -0
  3596. esphome/components/weikai_i2c/__init__.py +1 -0
  3597. esphome/components/weikai_i2c/weikai_i2c.cpp +181 -0
  3598. esphome/components/weikai_i2c/weikai_i2c.h +61 -0
  3599. esphome/components/weikai_spi/__init__.py +1 -0
  3600. esphome/components/weikai_spi/weikai_spi.cpp +194 -0
  3601. esphome/components/weikai_spi/weikai_spi.h +54 -0
  3602. esphome/components/whirlpool/__init__.py +0 -0
  3603. esphome/components/whirlpool/climate.py +27 -0
  3604. esphome/components/whirlpool/whirlpool.cpp +296 -0
  3605. esphome/components/whirlpool/whirlpool.h +65 -0
  3606. esphome/components/whynter/__init__.py +1 -0
  3607. esphome/components/whynter/climate.py +21 -0
  3608. esphome/components/whynter/whynter.cpp +181 -0
  3609. esphome/components/whynter/whynter.h +53 -0
  3610. esphome/components/wiegand/__init__.py +77 -0
  3611. esphome/components/wiegand/wiegand.cpp +127 -0
  3612. esphome/components/wiegand/wiegand.h +54 -0
  3613. esphome/components/wifi/__init__.py +711 -0
  3614. esphome/components/wifi/automation.h +116 -0
  3615. esphome/components/wifi/wifi_component.cpp +1830 -0
  3616. esphome/components/wifi/wifi_component.h +666 -0
  3617. esphome/components/wifi/wifi_component_esp8266.cpp +920 -0
  3618. esphome/components/wifi/wifi_component_esp_idf.cpp +1124 -0
  3619. esphome/components/wifi/wifi_component_libretiny.cpp +551 -0
  3620. esphome/components/wifi/wifi_component_pico_w.cpp +301 -0
  3621. esphome/components/wifi/wpa2_eap.py +152 -0
  3622. esphome/components/wifi_info/__init__.py +0 -0
  3623. esphome/components/wifi_info/text_sensor.py +109 -0
  3624. esphome/components/wifi_info/wifi_info_text_sensor.cpp +172 -0
  3625. esphome/components/wifi_info/wifi_info_text_sensor.h +89 -0
  3626. esphome/components/wifi_signal/__init__.py +0 -0
  3627. esphome/components/wifi_signal/sensor.py +30 -0
  3628. esphome/components/wifi_signal/wifi_signal_sensor.cpp +12 -0
  3629. esphome/components/wifi_signal/wifi_signal_sensor.h +31 -0
  3630. esphome/components/wireguard/__init__.py +175 -0
  3631. esphome/components/wireguard/binary_sensor.py +35 -0
  3632. esphome/components/wireguard/sensor.py +26 -0
  3633. esphome/components/wireguard/text_sensor.py +23 -0
  3634. esphome/components/wireguard/wireguard.cpp +300 -0
  3635. esphome/components/wireguard/wireguard.h +174 -0
  3636. esphome/components/wk2132_i2c/__init__.py +30 -0
  3637. esphome/components/wk2132_i2c/wk2132_i2c.cpp +4 -0
  3638. esphome/components/wk2132_spi/__init__.py +30 -0
  3639. esphome/components/wk2168_i2c/__init__.py +59 -0
  3640. esphome/components/wk2168_spi/__init__.py +57 -0
  3641. esphome/components/wk2204_i2c/__init__.py +30 -0
  3642. esphome/components/wk2204_spi/__init__.py +30 -0
  3643. esphome/components/wk2212_i2c/__init__.py +59 -0
  3644. esphome/components/wk2212_spi/__init__.py +57 -0
  3645. esphome/components/wl_134/__init__.py +0 -0
  3646. esphome/components/wl_134/text_sensor.py +28 -0
  3647. esphome/components/wl_134/wl_134.cpp +113 -0
  3648. esphome/components/wl_134/wl_134.h +63 -0
  3649. esphome/components/wled/__init__.py +30 -0
  3650. esphome/components/wled/wled_light_effect.cpp +287 -0
  3651. esphome/components/wled/wled_light_effect.h +47 -0
  3652. esphome/components/wts01/__init__.py +0 -0
  3653. esphome/components/wts01/sensor.py +41 -0
  3654. esphome/components/wts01/wts01.cpp +91 -0
  3655. esphome/components/wts01/wts01.h +27 -0
  3656. esphome/components/x9c/__init__.py +0 -0
  3657. esphome/components/x9c/output.py +55 -0
  3658. esphome/components/x9c/x9c.cpp +77 -0
  3659. esphome/components/x9c/x9c.h +34 -0
  3660. esphome/components/xgzp68xx/__init__.py +1 -0
  3661. esphome/components/xgzp68xx/sensor.py +81 -0
  3662. esphome/components/xgzp68xx/xgzp68xx.cpp +122 -0
  3663. esphome/components/xgzp68xx/xgzp68xx.h +47 -0
  3664. esphome/components/xiaomi_ble/__init__.py +22 -0
  3665. esphome/components/xiaomi_ble/xiaomi_ble.cpp +410 -0
  3666. esphome/components/xiaomi_ble/xiaomi_ble.h +84 -0
  3667. esphome/components/xiaomi_cgd1/__init__.py +0 -0
  3668. esphome/components/xiaomi_cgd1/sensor.py +76 -0
  3669. esphome/components/xiaomi_cgd1/xiaomi_cgd1.cpp +75 -0
  3670. esphome/components/xiaomi_cgd1/xiaomi_cgd1.h +35 -0
  3671. esphome/components/xiaomi_cgdk2/__init__.py +0 -0
  3672. esphome/components/xiaomi_cgdk2/sensor.py +76 -0
  3673. esphome/components/xiaomi_cgdk2/xiaomi_cgdk2.cpp +75 -0
  3674. esphome/components/xiaomi_cgdk2/xiaomi_cgdk2.h +35 -0
  3675. esphome/components/xiaomi_cgg1/__init__.py +0 -0
  3676. esphome/components/xiaomi_cgg1/sensor.py +77 -0
  3677. esphome/components/xiaomi_cgg1/xiaomi_cgg1.cpp +75 -0
  3678. esphome/components/xiaomi_cgg1/xiaomi_cgg1.h +36 -0
  3679. esphome/components/xiaomi_cgpr1/__init__.py +0 -0
  3680. esphome/components/xiaomi_cgpr1/binary_sensor.py +77 -0
  3681. esphome/components/xiaomi_cgpr1/xiaomi_cgpr1.cpp +75 -0
  3682. esphome/components/xiaomi_cgpr1/xiaomi_cgpr1.h +39 -0
  3683. esphome/components/xiaomi_gcls002/__init__.py +0 -0
  3684. esphome/components/xiaomi_gcls002/sensor.py +84 -0
  3685. esphome/components/xiaomi_gcls002/xiaomi_gcls002.cpp +62 -0
  3686. esphome/components/xiaomi_gcls002/xiaomi_gcls002.h +36 -0
  3687. esphome/components/xiaomi_hhccjcy01/__init__.py +0 -0
  3688. esphome/components/xiaomi_hhccjcy01/sensor.py +97 -0
  3689. esphome/components/xiaomi_hhccjcy01/xiaomi_hhccjcy01.cpp +65 -0
  3690. esphome/components/xiaomi_hhccjcy01/xiaomi_hhccjcy01.h +38 -0
  3691. esphome/components/xiaomi_hhccjcy10/__init__.py +1 -0
  3692. esphome/components/xiaomi_hhccjcy10/sensor.py +96 -0
  3693. esphome/components/xiaomi_hhccjcy10/xiaomi_hhccjcy10.cpp +68 -0
  3694. esphome/components/xiaomi_hhccjcy10/xiaomi_hhccjcy10.h +37 -0
  3695. esphome/components/xiaomi_hhccpot002/__init__.py +0 -0
  3696. esphome/components/xiaomi_hhccpot002/sensor.py +60 -0
  3697. esphome/components/xiaomi_hhccpot002/xiaomi_hhccpot002.cpp +56 -0
  3698. esphome/components/xiaomi_hhccpot002/xiaomi_hhccpot002.h +32 -0
  3699. esphome/components/xiaomi_jqjcy01ym/__init__.py +0 -0
  3700. esphome/components/xiaomi_jqjcy01ym/sensor.py +85 -0
  3701. esphome/components/xiaomi_jqjcy01ym/xiaomi_jqjcy01ym.cpp +62 -0
  3702. esphome/components/xiaomi_jqjcy01ym/xiaomi_jqjcy01ym.h +36 -0
  3703. esphome/components/xiaomi_lywsd02/__init__.py +0 -0
  3704. esphome/components/xiaomi_lywsd02/sensor.py +73 -0
  3705. esphome/components/xiaomi_lywsd02/xiaomi_lywsd02.cpp +59 -0
  3706. esphome/components/xiaomi_lywsd02/xiaomi_lywsd02.h +34 -0
  3707. esphome/components/xiaomi_lywsd02mmc/__init__.py +0 -0
  3708. esphome/components/xiaomi_lywsd02mmc/sensor.py +77 -0
  3709. esphome/components/xiaomi_lywsd02mmc/xiaomi_lywsd02mmc.cpp +75 -0
  3710. esphome/components/xiaomi_lywsd02mmc/xiaomi_lywsd02mmc.h +36 -0
  3711. esphome/components/xiaomi_lywsd03mmc/__init__.py +0 -0
  3712. esphome/components/xiaomi_lywsd03mmc/sensor.py +78 -0
  3713. esphome/components/xiaomi_lywsd03mmc/xiaomi_lywsd03mmc.cpp +79 -0
  3714. esphome/components/xiaomi_lywsd03mmc/xiaomi_lywsd03mmc.h +35 -0
  3715. esphome/components/xiaomi_lywsdcgq/__init__.py +0 -0
  3716. esphome/components/xiaomi_lywsdcgq/sensor.py +73 -0
  3717. esphome/components/xiaomi_lywsdcgq/xiaomi_lywsdcgq.cpp +59 -0
  3718. esphome/components/xiaomi_lywsdcgq/xiaomi_lywsdcgq.h +34 -0
  3719. esphome/components/xiaomi_mhoc303/__init__.py +1 -0
  3720. esphome/components/xiaomi_mhoc303/sensor.py +73 -0
  3721. esphome/components/xiaomi_mhoc303/xiaomi_mhoc303.cpp +59 -0
  3722. esphome/components/xiaomi_mhoc303/xiaomi_mhoc303.h +34 -0
  3723. esphome/components/xiaomi_mhoc401/__init__.py +0 -0
  3724. esphome/components/xiaomi_mhoc401/sensor.py +77 -0
  3725. esphome/components/xiaomi_mhoc401/xiaomi_mhoc401.cpp +79 -0
  3726. esphome/components/xiaomi_mhoc401/xiaomi_mhoc401.h +35 -0
  3727. esphome/components/xiaomi_miscale/__init__.py +0 -0
  3728. esphome/components/xiaomi_miscale/sensor.py +62 -0
  3729. esphome/components/xiaomi_miscale/xiaomi_miscale.cpp +169 -0
  3730. esphome/components/xiaomi_miscale/xiaomi_miscale.h +46 -0
  3731. esphome/components/xiaomi_miscale2/__init__.py +0 -0
  3732. esphome/components/xiaomi_miscale2/sensor.py +5 -0
  3733. esphome/components/xiaomi_mjyd02yla/__init__.py +0 -0
  3734. esphome/components/xiaomi_mjyd02yla/binary_sensor.py +89 -0
  3735. esphome/components/xiaomi_mjyd02yla/xiaomi_mjyd02yla.cpp +78 -0
  3736. esphome/components/xiaomi_mjyd02yla/xiaomi_mjyd02yla.h +41 -0
  3737. esphome/components/xiaomi_mue4094rt/__init__.py +0 -0
  3738. esphome/components/xiaomi_mue4094rt/binary_sensor.py +40 -0
  3739. esphome/components/xiaomi_mue4094rt/xiaomi_mue4094rt.cpp +55 -0
  3740. esphome/components/xiaomi_mue4094rt/xiaomi_mue4094rt.h +32 -0
  3741. esphome/components/xiaomi_rtcgq02lm/__init__.py +35 -0
  3742. esphome/components/xiaomi_rtcgq02lm/binary_sensor.py +63 -0
  3743. esphome/components/xiaomi_rtcgq02lm/sensor.py +37 -0
  3744. esphome/components/xiaomi_rtcgq02lm/xiaomi_rtcgq02lm.cpp +91 -0
  3745. esphome/components/xiaomi_rtcgq02lm/xiaomi_rtcgq02lm.h +60 -0
  3746. esphome/components/xiaomi_wx08zm/__init__.py +0 -0
  3747. esphome/components/xiaomi_wx08zm/binary_sensor.py +63 -0
  3748. esphome/components/xiaomi_wx08zm/xiaomi_wx08zm.cpp +60 -0
  3749. esphome/components/xiaomi_wx08zm/xiaomi_wx08zm.h +35 -0
  3750. esphome/components/xiaomi_xmwsdj04mmc/__init__.py +0 -0
  3751. esphome/components/xiaomi_xmwsdj04mmc/sensor.py +77 -0
  3752. esphome/components/xiaomi_xmwsdj04mmc/xiaomi_xmwsdj04mmc.cpp +77 -0
  3753. esphome/components/xiaomi_xmwsdj04mmc/xiaomi_xmwsdj04mmc.h +36 -0
  3754. esphome/components/xl9535/__init__.py +79 -0
  3755. esphome/components/xl9535/xl9535.cpp +120 -0
  3756. esphome/components/xl9535/xl9535.h +56 -0
  3757. esphome/components/xpt2046/__init__.py +5 -0
  3758. esphome/components/xpt2046/touchscreen/__init__.py +43 -0
  3759. esphome/components/xpt2046/touchscreen/xpt2046.cpp +113 -0
  3760. esphome/components/xpt2046/touchscreen/xpt2046.h +41 -0
  3761. esphome/components/xxtea/__init__.py +3 -0
  3762. esphome/components/xxtea/xxtea.cpp +46 -0
  3763. esphome/components/xxtea/xxtea.h +26 -0
  3764. esphome/components/yashima/__init__.py +0 -0
  3765. esphome/components/yashima/climate.py +39 -0
  3766. esphome/components/yashima/yashima.cpp +199 -0
  3767. esphome/components/yashima/yashima.h +40 -0
  3768. esphome/components/zephyr/__init__.py +263 -0
  3769. esphome/components/zephyr/const.py +16 -0
  3770. esphome/components/zephyr/core.cpp +98 -0
  3771. esphome/components/zephyr/gpio.cpp +123 -0
  3772. esphome/components/zephyr/gpio.h +38 -0
  3773. esphome/components/zephyr/pre_build.py.script +4 -0
  3774. esphome/components/zephyr/preferences.cpp +156 -0
  3775. esphome/components/zephyr/preferences.h +13 -0
  3776. esphome/components/zephyr_ble_server/__init__.py +34 -0
  3777. esphome/components/zephyr_ble_server/ble_server.cpp +100 -0
  3778. esphome/components/zephyr_ble_server/ble_server.h +19 -0
  3779. esphome/components/zhlt01/__init__.py +0 -0
  3780. esphome/components/zhlt01/climate.py +14 -0
  3781. esphome/components/zhlt01/zhlt01.cpp +238 -0
  3782. esphome/components/zhlt01/zhlt01.h +167 -0
  3783. esphome/components/zio_ultrasonic/__init__.py +0 -0
  3784. esphome/components/zio_ultrasonic/sensor.py +31 -0
  3785. esphome/components/zio_ultrasonic/zio_ultrasonic.cpp +31 -0
  3786. esphome/components/zio_ultrasonic/zio_ultrasonic.h +20 -0
  3787. esphome/components/zwave_proxy/__init__.py +46 -0
  3788. esphome/components/zwave_proxy/zwave_proxy.cpp +346 -0
  3789. esphome/components/zwave_proxy/zwave_proxy.h +91 -0
  3790. esphome/components/zyaura/__init__.py +0 -0
  3791. esphome/components/zyaura/sensor.py +71 -0
  3792. esphome/components/zyaura/zyaura.cpp +125 -0
  3793. esphome/components/zyaura/zyaura.h +85 -0
  3794. esphome/config.py +1356 -0
  3795. esphome/config_helpers.py +155 -0
  3796. esphome/config_validation.py +2220 -0
  3797. esphome/const.py +1378 -0
  3798. esphome/core/__init__.py +974 -0
  3799. esphome/core/application.cpp +714 -0
  3800. esphome/core/application.h +646 -0
  3801. esphome/core/area.h +19 -0
  3802. esphome/core/automation.h +367 -0
  3803. esphome/core/base_automation.h +554 -0
  3804. esphome/core/color.cpp +23 -0
  3805. esphome/core/color.h +188 -0
  3806. esphome/core/component.cpp +506 -0
  3807. esphome/core/component.h +530 -0
  3808. esphome/core/component_iterator.cpp +197 -0
  3809. esphome/core/component_iterator.h +192 -0
  3810. esphome/core/config.py +639 -0
  3811. esphome/core/controller.h +134 -0
  3812. esphome/core/controller_registry.cpp +114 -0
  3813. esphome/core/controller_registry.h +245 -0
  3814. esphome/core/datatypes.h +61 -0
  3815. esphome/core/defines.h +337 -0
  3816. esphome/core/device.h +20 -0
  3817. esphome/core/doxygen.h +13 -0
  3818. esphome/core/entity_base.cpp +109 -0
  3819. esphome/core/entity_base.h +253 -0
  3820. esphome/core/entity_helpers.py +272 -0
  3821. esphome/core/event_pool.h +81 -0
  3822. esphome/core/finite_set_mask.h +171 -0
  3823. esphome/core/gpio.h +106 -0
  3824. esphome/core/hal.h +53 -0
  3825. esphome/core/hash_base.h +56 -0
  3826. esphome/core/helpers.cpp +711 -0
  3827. esphome/core/helpers.h +1253 -0
  3828. esphome/core/lock_free_queue.h +146 -0
  3829. esphome/core/log.cpp +62 -0
  3830. esphome/core/log.h +204 -0
  3831. esphome/core/log_const_en.h +4 -0
  3832. esphome/core/macros.h +12 -0
  3833. esphome/core/optional.h +220 -0
  3834. esphome/core/preferences.h +70 -0
  3835. esphome/core/progmem.h +16 -0
  3836. esphome/core/ring_buffer.cpp +131 -0
  3837. esphome/core/ring_buffer.h +99 -0
  3838. esphome/core/scheduler.cpp +822 -0
  3839. esphome/core/scheduler.h +508 -0
  3840. esphome/core/string_ref.h +147 -0
  3841. esphome/core/template_lambda.h +51 -0
  3842. esphome/core/time.cpp +224 -0
  3843. esphome/core/time.h +126 -0
  3844. esphome/core/util.cpp +37 -0
  3845. esphome/core/util.h +15 -0
  3846. esphome/core/version.h +12 -0
  3847. esphome/coroutine.py +348 -0
  3848. esphome/cpp_generator.py +1041 -0
  3849. esphome/cpp_helpers.py +126 -0
  3850. esphome/cpp_types.py +46 -0
  3851. esphome/dashboard/__init__.py +0 -0
  3852. esphome/dashboard/const.py +29 -0
  3853. esphome/dashboard/core.py +190 -0
  3854. esphome/dashboard/dashboard.py +152 -0
  3855. esphome/dashboard/dns.py +58 -0
  3856. esphome/dashboard/entries.py +458 -0
  3857. esphome/dashboard/models.py +76 -0
  3858. esphome/dashboard/settings.py +98 -0
  3859. esphome/dashboard/status/__init__.py +0 -0
  3860. esphome/dashboard/status/mdns.py +170 -0
  3861. esphome/dashboard/status/mqtt.py +78 -0
  3862. esphome/dashboard/status/ping.py +151 -0
  3863. esphome/dashboard/util/__init__.py +0 -0
  3864. esphome/dashboard/util/itertools.py +22 -0
  3865. esphome/dashboard/util/password.py +11 -0
  3866. esphome/dashboard/util/subprocess.py +31 -0
  3867. esphome/dashboard/util/text.py +9 -0
  3868. esphome/dashboard/web_server.py +1620 -0
  3869. esphome/enum.py +20 -0
  3870. esphome/espota2.py +445 -0
  3871. esphome/external_files.py +106 -0
  3872. esphome/final_validate.py +58 -0
  3873. esphome/git.py +283 -0
  3874. esphome/helpers.py +559 -0
  3875. esphome/loader.py +233 -0
  3876. esphome/log.py +93 -0
  3877. esphome/mqtt.py +305 -0
  3878. esphome/pins.py +340 -0
  3879. esphome/platformio_api.py +422 -0
  3880. esphome/resolver.py +67 -0
  3881. esphome/schema_extractors.py +92 -0
  3882. esphome/storage_json.py +303 -0
  3883. esphome/types.py +58 -0
  3884. esphome/util.py +380 -0
  3885. esphome/voluptuous_schema.py +234 -0
  3886. esphome/vscode.py +146 -0
  3887. esphome/wizard.py +559 -0
  3888. esphome/writer.py +412 -0
  3889. esphome/yaml_util.py +635 -0
  3890. esphome/zeroconf.py +202 -0
  3891. esphome-2025.12.0b2.dist-info/METADATA +86 -0
  3892. esphome-2025.12.0b2.dist-info/RECORD +3896 -0
  3893. esphome-2025.12.0b2.dist-info/WHEEL +5 -0
  3894. esphome-2025.12.0b2.dist-info/entry_points.txt +2 -0
  3895. esphome-2025.12.0b2.dist-info/licenses/LICENSE +709 -0
  3896. esphome-2025.12.0b2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,4754 @@
1
+ #include "waveshare_epaper.h"
2
+ #include <bitset>
3
+ #include <cinttypes>
4
+ #include "esphome/core/application.h"
5
+ #include "esphome/core/helpers.h"
6
+ #include "esphome/core/log.h"
7
+
8
+ namespace esphome {
9
+ namespace waveshare_epaper {
10
+
11
+ static const char *const TAG = "waveshare_epaper";
12
+
13
+ static const uint8_t LUT_SIZE_WAVESHARE = 30;
14
+
15
+ static const uint8_t FULL_UPDATE_LUT[LUT_SIZE_WAVESHARE] = {0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22, 0x66, 0x69,
16
+ 0x69, 0x59, 0x58, 0x99, 0x99, 0x88, 0x00, 0x00, 0x00, 0x00,
17
+ 0xF8, 0xB4, 0x13, 0x51, 0x35, 0x51, 0x51, 0x19, 0x01, 0x00};
18
+
19
+ static const uint8_t PARTIAL_UPDATE_LUT[LUT_SIZE_WAVESHARE] = {
20
+ 0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
22
+
23
+ static const uint8_t LUT_SIZE_TTGO = 70;
24
+
25
+ static const uint8_t FULL_UPDATE_LUT_TTGO[LUT_SIZE_TTGO] = {
26
+ 0x80, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00, // LUT0: BB: VS 0 ~7
27
+ 0x10, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, // LUT1: BW: VS 0 ~7
28
+ 0x80, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00, // LUT2: WB: VS 0 ~7
29
+ 0x10, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, // LUT3: WW: VS 0 ~7
30
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // LUT4: VCOM: VS 0 ~7
31
+ 0x03, 0x03, 0x00, 0x00, 0x02, // TP0 A~D RP0
32
+ 0x09, 0x09, 0x00, 0x00, 0x02, // TP1 A~D RP1
33
+ 0x03, 0x03, 0x00, 0x00, 0x02, // TP2 A~D RP2
34
+ 0x00, 0x00, 0x00, 0x00, 0x00, // TP3 A~D RP3
35
+ 0x00, 0x00, 0x00, 0x00, 0x00, // TP4 A~D RP4
36
+ 0x00, 0x00, 0x00, 0x00, 0x00, // TP5 A~D RP5
37
+ 0x00, 0x00, 0x00, 0x00, 0x00, // TP6 A~D RP6
38
+ };
39
+
40
+ static const uint8_t PARTIAL_UPDATE_LUT_TTGO[LUT_SIZE_TTGO] = {
41
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // LUT0: BB: VS 0 ~7
42
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // LUT1: BW: VS 0 ~7
43
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // LUT2: WB: VS 0 ~7
44
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // LUT3: WW: VS 0 ~7
45
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // LUT4: VCOM: VS 0 ~7
46
+ 0x0A, 0x00, 0x00, 0x00, 0x00, // TP0 A~D RP0
47
+ 0x00, 0x00, 0x00, 0x00, 0x00, // TP1 A~D RP1
48
+ 0x00, 0x00, 0x00, 0x00, 0x00, // TP2 A~D RP2
49
+ 0x00, 0x00, 0x00, 0x00, 0x00, // TP3 A~D RP3
50
+ 0x00, 0x00, 0x00, 0x00, 0x00, // TP4 A~D RP4
51
+ 0x00, 0x00, 0x00, 0x00, 0x00, // TP5 A~D RP5
52
+ 0x00, 0x00, 0x00, 0x00, 0x00, // TP6 A~D RP6
53
+ };
54
+
55
+ static const uint8_t LUT_SIZE_TTGO_B73 = 100;
56
+
57
+ static const uint8_t FULL_UPDATE_LUT_TTGO_B73[LUT_SIZE_TTGO_B73] = {
58
+ 0xA0, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x90, 0xA0, 0x00, 0x00, 0x00, 0x00,
59
+ 0x00, 0x00, 0x00, 0xA0, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x90, 0xA0, 0x00,
60
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
61
+
62
+ 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x03, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
63
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
64
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
65
+ };
66
+
67
+ static const uint8_t PARTIAL_UPDATE_LUT_TTGO_B73[LUT_SIZE_TTGO_B73] = {
68
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
69
+ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
70
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
71
+
72
+ 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
73
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
74
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
75
+ };
76
+
77
+ static const uint8_t LUT_SIZE_TTGO_B1 = 29;
78
+
79
+ static const uint8_t FULL_UPDATE_LUT_TTGO_B1[LUT_SIZE_TTGO_B1] = {
80
+ 0x22, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
81
+ 0x00, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x01, 0x00, 0x00, 0x00, 0x00};
82
+
83
+ static const uint8_t PARTIAL_UPDATE_LUT_TTGO_B1[LUT_SIZE_TTGO_B1] = {
84
+ 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
85
+ 0x00, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
86
+
87
+ // clang-format off
88
+ // Disable formatting to preserve the same look as in Waveshare examples
89
+ static const uint8_t PARTIAL_UPD_2IN9_LUT_SIZE = 159;
90
+ static const uint8_t PARTIAL_UPD_2IN9_LUT[PARTIAL_UPD_2IN9_LUT_SIZE] =
91
+ {
92
+ 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
93
+ 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
94
+ 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
95
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
96
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
97
+ 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
98
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
99
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
100
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
101
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
102
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
103
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
104
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
105
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
106
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
107
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
108
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
109
+ 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00,
110
+ 0x22, 0x17, 0x41, 0xB0, 0x32, 0x36,
111
+ };
112
+ // clang-format on
113
+
114
+ void WaveshareEPaperBase::setup() {
115
+ this->init_internal_(this->get_buffer_length_());
116
+ this->setup_pins_();
117
+ this->spi_setup();
118
+ this->reset_();
119
+ this->initialize();
120
+ }
121
+ void WaveshareEPaperBase::setup_pins_() {
122
+ this->dc_pin_->setup(); // OUTPUT
123
+ this->dc_pin_->digital_write(false);
124
+ if (this->reset_pin_ != nullptr) {
125
+ this->reset_pin_->setup(); // OUTPUT
126
+ this->reset_pin_->digital_write(true);
127
+ }
128
+ if (this->busy_pin_ != nullptr) {
129
+ this->busy_pin_->setup(); // INPUT
130
+ }
131
+ }
132
+ float WaveshareEPaperBase::get_setup_priority() const { return setup_priority::PROCESSOR; }
133
+ void WaveshareEPaperBase::command(uint8_t value) {
134
+ this->start_command_();
135
+ this->write_byte(value);
136
+ this->end_command_();
137
+ }
138
+ void WaveshareEPaperBase::data(uint8_t value) {
139
+ this->start_data_();
140
+ this->write_byte(value);
141
+ this->end_data_();
142
+ }
143
+
144
+ // write a command followed by one or more bytes of data.
145
+ // The command is the first byte, length is the total including cmd.
146
+ void WaveshareEPaperBase::cmd_data(const uint8_t *c_data, size_t length) {
147
+ this->dc_pin_->digital_write(false);
148
+ this->enable();
149
+ this->write_byte(c_data[0]);
150
+ this->dc_pin_->digital_write(true);
151
+ this->write_array(c_data + 1, length - 1);
152
+ this->disable();
153
+ }
154
+
155
+ bool WaveshareEPaperBase::wait_until_idle_() {
156
+ if (this->busy_pin_ == nullptr || !this->busy_pin_->digital_read()) {
157
+ return true;
158
+ }
159
+
160
+ const uint32_t start = millis();
161
+ while (this->busy_pin_->digital_read()) {
162
+ if (millis() - start > this->idle_timeout_()) {
163
+ ESP_LOGE(TAG, "Timeout while displaying image!");
164
+ return false;
165
+ }
166
+ delay(1);
167
+ }
168
+ return true;
169
+ }
170
+ void WaveshareEPaperBase::update() {
171
+ this->do_update_();
172
+ this->display();
173
+ }
174
+ void WaveshareEPaper::fill(Color color) {
175
+ // flip logic
176
+ const uint8_t fill = color.is_on() ? 0x00 : 0xFF;
177
+ for (uint32_t i = 0; i < this->get_buffer_length_(); i++)
178
+ this->buffer_[i] = fill;
179
+ }
180
+ void WaveshareEPaper7C::setup() {
181
+ this->init_internal_7c_(this->get_buffer_length_());
182
+ this->setup_pins_();
183
+ this->spi_setup();
184
+ this->reset_();
185
+ this->initialize();
186
+ }
187
+ void WaveshareEPaper7C::init_internal_7c_(uint32_t buffer_length) {
188
+ RAMAllocator<uint8_t> allocator;
189
+ uint32_t small_buffer_length = buffer_length / NUM_BUFFERS;
190
+
191
+ for (int i = 0; i < NUM_BUFFERS; i++) {
192
+ this->buffers_[i] = allocator.allocate(small_buffer_length);
193
+ if (this->buffers_[i] == nullptr) {
194
+ ESP_LOGE(TAG, "Could not allocate buffer %d for display!", i);
195
+ for (auto &buffer : this->buffers_) {
196
+ allocator.deallocate(buffer, small_buffer_length);
197
+ buffer = nullptr;
198
+ }
199
+ return;
200
+ }
201
+ }
202
+ this->clear();
203
+ }
204
+ uint8_t WaveshareEPaper7C::color_to_hex(Color color) {
205
+ uint8_t hex_code;
206
+ if (color.red > 127) {
207
+ if (color.green > 170) {
208
+ if (color.blue > 127) {
209
+ hex_code = 0x1; // White
210
+ } else {
211
+ hex_code = 0x5; // Yellow
212
+ }
213
+ } else if (color.green > 85) {
214
+ hex_code = 0x6; // Orange
215
+ } else {
216
+ hex_code = 0x4; // Red (or Magenta)
217
+ }
218
+ } else {
219
+ if (color.green > 127) {
220
+ if (color.blue > 127) {
221
+ hex_code = 0x3; // Cyan -> Blue
222
+ } else {
223
+ hex_code = 0x2; // Green
224
+ }
225
+ } else {
226
+ if (color.blue > 127) {
227
+ hex_code = 0x3; // Blue
228
+ } else {
229
+ hex_code = 0x0; // Black
230
+ }
231
+ }
232
+ }
233
+
234
+ return hex_code;
235
+ }
236
+ void WaveshareEPaper7C::fill(Color color) {
237
+ uint8_t pixel_color;
238
+ if (color.is_on()) {
239
+ pixel_color = this->color_to_hex(color);
240
+ } else {
241
+ pixel_color = 0x1;
242
+ }
243
+
244
+ if (this->buffers_[0] == nullptr) {
245
+ ESP_LOGE(TAG, "Buffer unavailable!");
246
+ } else {
247
+ uint32_t small_buffer_length = this->get_buffer_length_() / NUM_BUFFERS;
248
+ for (auto &buffer : this->buffers_) {
249
+ for (uint32_t buffer_pos = 0; buffer_pos < small_buffer_length; buffer_pos += 3) {
250
+ // We store 8 bitset<3> in 3 bytes
251
+ // | byte 1 | byte 2 | byte 3 |
252
+ // |aaabbbaa|abbbaaab|bbaaabbb|
253
+ buffer[buffer_pos + 0] = pixel_color << 5 | pixel_color << 2 | pixel_color >> 1;
254
+ buffer[buffer_pos + 1] = pixel_color << 7 | pixel_color << 4 | pixel_color << 1 | pixel_color >> 2;
255
+ buffer[buffer_pos + 2] = pixel_color << 6 | pixel_color << 3 | pixel_color << 0;
256
+ }
257
+ App.feed_wdt();
258
+ }
259
+ }
260
+ }
261
+ void WaveshareEPaper7C::send_buffers_() {
262
+ if (this->buffers_[0] == nullptr) {
263
+ ESP_LOGE(TAG, "Buffer unavailable!");
264
+ return;
265
+ }
266
+
267
+ uint32_t small_buffer_length = this->get_buffer_length_() / NUM_BUFFERS;
268
+ uint8_t byte_to_send;
269
+ for (auto &buffer : this->buffers_) {
270
+ for (uint32_t buffer_pos = 0; buffer_pos < small_buffer_length; buffer_pos += 3) {
271
+ std::bitset<24> triplet =
272
+ buffer[buffer_pos + 0] << 16 | buffer[buffer_pos + 1] << 8 | buffer[buffer_pos + 2] << 0;
273
+ // 8 bitset<3> are stored in 3 bytes
274
+ // |aaabbbaa|abbbaaab|bbaaabbb|
275
+ // | byte 1 | byte 2 | byte 3 |
276
+ byte_to_send = ((triplet >> 17).to_ulong() & 0b01110000) | ((triplet >> 18).to_ulong() & 0b00000111);
277
+ this->data(byte_to_send);
278
+
279
+ byte_to_send = ((triplet >> 11).to_ulong() & 0b01110000) | ((triplet >> 12).to_ulong() & 0b00000111);
280
+ this->data(byte_to_send);
281
+
282
+ byte_to_send = ((triplet >> 5).to_ulong() & 0b01110000) | ((triplet >> 6).to_ulong() & 0b00000111);
283
+ this->data(byte_to_send);
284
+
285
+ byte_to_send = ((triplet << 1).to_ulong() & 0b01110000) | ((triplet << 0).to_ulong() & 0b00000111);
286
+ this->data(byte_to_send);
287
+ }
288
+ App.feed_wdt();
289
+ }
290
+ }
291
+ void WaveshareEPaper7C::reset_() {
292
+ if (this->reset_pin_ != nullptr) {
293
+ this->reset_pin_->digital_write(true);
294
+ delay(20);
295
+ this->reset_pin_->digital_write(false);
296
+ delay(1);
297
+ this->reset_pin_->digital_write(true);
298
+ delay(20);
299
+ }
300
+ }
301
+
302
+ void HOT WaveshareEPaper::draw_absolute_pixel_internal(int x, int y, Color color) {
303
+ if (x >= this->get_width_internal() || y >= this->get_height_internal() || x < 0 || y < 0)
304
+ return;
305
+
306
+ const uint32_t pos = (x + y * this->get_width_controller()) / 8u;
307
+ const uint8_t subpos = x & 0x07;
308
+ // flip logic
309
+ if (!color.is_on()) {
310
+ this->buffer_[pos] |= 0x80 >> subpos;
311
+ } else {
312
+ this->buffer_[pos] &= ~(0x80 >> subpos);
313
+ }
314
+ }
315
+
316
+ uint32_t WaveshareEPaper::get_buffer_length_() {
317
+ return this->get_width_controller() * this->get_height_internal() / 8u;
318
+ } // just a black buffer
319
+ uint32_t WaveshareEPaperBWR::get_buffer_length_() {
320
+ return this->get_width_controller() * this->get_height_internal() / 4u;
321
+ } // black and red buffer
322
+ uint32_t WaveshareEPaper7C::get_buffer_length_() {
323
+ return this->get_width_controller() * this->get_height_internal() / 8u * 3u;
324
+ } // 7 colors buffer, 1 pixel = 3 bits, we will store 8 pixels in 24 bits = 3 bytes
325
+
326
+ void WaveshareEPaperBWR::fill(Color color) {
327
+ this->filled_rectangle(0, 0, this->get_width(), this->get_height(), color);
328
+ }
329
+ void HOT WaveshareEPaperBWR::draw_absolute_pixel_internal(int x, int y, Color color) {
330
+ if (x >= this->get_width_internal() || y >= this->get_height_internal() || x < 0 || y < 0)
331
+ return;
332
+
333
+ const uint32_t buf_half_len = this->get_buffer_length_() / 2u;
334
+
335
+ const uint32_t pos = (x + y * this->get_width_internal()) / 8u;
336
+ const uint8_t subpos = x & 0x07;
337
+ // flip logic
338
+ if (color.is_on()) {
339
+ this->buffer_[pos] |= 0x80 >> subpos;
340
+ } else {
341
+ this->buffer_[pos] &= ~(0x80 >> subpos);
342
+ }
343
+
344
+ // draw red pixels only, if the color contains red only
345
+ if (((color.red > 0) && (color.green == 0) && (color.blue == 0))) {
346
+ this->buffer_[pos + buf_half_len] |= 0x80 >> subpos;
347
+ } else {
348
+ this->buffer_[pos + buf_half_len] &= ~(0x80 >> subpos);
349
+ }
350
+ }
351
+ void HOT WaveshareEPaper7C::draw_absolute_pixel_internal(int x, int y, Color color) {
352
+ if (x >= this->get_width_internal() || y >= this->get_height_internal() || x < 0 || y < 0)
353
+ return;
354
+
355
+ uint8_t pixel_bits = this->color_to_hex(color);
356
+ uint32_t small_buffer_length = this->get_buffer_length_() / NUM_BUFFERS;
357
+ uint32_t pixel_position = x + y * this->get_width_controller();
358
+ uint32_t first_bit_position = pixel_position * 3;
359
+ uint32_t byte_position = first_bit_position / 8u;
360
+ uint32_t byte_subposition = first_bit_position % 8u;
361
+ uint32_t buffer_position = byte_position / small_buffer_length;
362
+ uint32_t buffer_subposition = byte_position % small_buffer_length;
363
+
364
+ if (byte_subposition <= 5) {
365
+ this->buffers_[buffer_position][buffer_subposition] =
366
+ (this->buffers_[buffer_position][buffer_subposition] & (0xFF ^ (0b111 << (5 - byte_subposition)))) |
367
+ (pixel_bits << (5 - byte_subposition));
368
+ } else {
369
+ this->buffers_[buffer_position][buffer_subposition + 0] =
370
+ (this->buffers_[buffer_position][buffer_subposition + 0] & (0xFF ^ (0b111 >> (byte_subposition - 5)))) |
371
+ (pixel_bits >> (byte_subposition - 5));
372
+
373
+ this->buffers_[buffer_position][buffer_subposition + 1] = (this->buffers_[buffer_position][buffer_subposition + 1] &
374
+ (0xFF ^ (0xFF & (0b111 << (13 - byte_subposition))))) |
375
+ (pixel_bits << (13 - byte_subposition));
376
+ }
377
+ }
378
+ void WaveshareEPaperBase::start_command_() {
379
+ this->dc_pin_->digital_write(false);
380
+ this->enable();
381
+ }
382
+ void WaveshareEPaperBase::end_command_() { this->disable(); }
383
+ void WaveshareEPaperBase::start_data_() {
384
+ this->dc_pin_->digital_write(true);
385
+ this->enable();
386
+ }
387
+ void WaveshareEPaperBase::end_data_() { this->disable(); }
388
+ void WaveshareEPaperBase::on_safe_shutdown() { this->deep_sleep(); }
389
+
390
+ // ========================================================
391
+ // Type A
392
+ // ========================================================
393
+
394
+ void WaveshareEPaperTypeA::initialize() {
395
+ // Achieve display intialization
396
+ this->init_display_();
397
+ // If a reset pin is configured, eligible displays can be set to deep sleep
398
+ // between updates, as recommended by the hardware provider
399
+ if (this->reset_pin_ != nullptr) {
400
+ switch (this->model_) {
401
+ // More models can be added here to enable deep sleep if eligible
402
+ case WAVESHARE_EPAPER_1_54_IN:
403
+ case WAVESHARE_EPAPER_1_54_IN_V2:
404
+ this->deep_sleep_between_updates_ = true;
405
+ ESP_LOGI(TAG, "Set the display to deep sleep");
406
+ this->deep_sleep();
407
+ break;
408
+ default:
409
+ break;
410
+ }
411
+ }
412
+ }
413
+ void WaveshareEPaperTypeA::init_display_() {
414
+ if (this->model_ == TTGO_EPAPER_2_13_IN_B74 || this->model_ == WAVESHARE_EPAPER_2_13_IN_V2) {
415
+ if (this->reset_pin_ != nullptr) {
416
+ this->reset_pin_->digital_write(false);
417
+ delay(10);
418
+ this->reset_pin_->digital_write(true);
419
+ delay(10);
420
+ this->wait_until_idle_();
421
+ }
422
+
423
+ this->command(0x12); // SWRESET
424
+ this->wait_until_idle_();
425
+ }
426
+
427
+ // COMMAND DRIVER OUTPUT CONTROL
428
+ this->command(0x01);
429
+ this->data(this->get_height_internal() - 1);
430
+ this->data((this->get_height_internal() - 1) >> 8);
431
+ this->data(0x00); // ? GD = 0, SM = 0, TB = 0
432
+
433
+ // COMMAND BOOSTER SOFT START CONTROL
434
+ this->command(0x0C);
435
+ this->data(0xD7);
436
+ this->data(0xD6);
437
+ this->data(0x9D);
438
+
439
+ // COMMAND WRITE VCOM REGISTER
440
+ this->command(0x2C);
441
+ this->data(0xA8);
442
+
443
+ // COMMAND SET DUMMY LINE PERIOD
444
+ this->command(0x3A);
445
+ this->data(0x1A);
446
+
447
+ // COMMAND SET GATE TIME
448
+ this->command(0x3B);
449
+ this->data(0x08); // 2µs per row
450
+
451
+ // COMMAND DATA ENTRY MODE SETTING
452
+ this->command(0x11);
453
+ switch (this->model_) {
454
+ case TTGO_EPAPER_2_13_IN_B1:
455
+ this->data(0x01); // x increase, y decrease : as in demo code
456
+ break;
457
+ case TTGO_EPAPER_2_13_IN_B74:
458
+ case WAVESHARE_EPAPER_2_9_IN_V2:
459
+ this->data(0x03); // from top left to bottom right
460
+ // RAM content option for Display Update
461
+ this->command(0x21);
462
+ this->data(0x00);
463
+ this->data(0x80);
464
+ break;
465
+ default:
466
+ this->data(0x03); // from top left to bottom right
467
+ }
468
+ }
469
+ void WaveshareEPaperTypeA::dump_config() {
470
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
471
+ switch (this->model_) {
472
+ case WAVESHARE_EPAPER_1_54_IN:
473
+ ESP_LOGCONFIG(TAG, " Model: 1.54in");
474
+ break;
475
+ case WAVESHARE_EPAPER_1_54_IN_V2:
476
+ ESP_LOGCONFIG(TAG, " Model: 1.54inV2");
477
+ break;
478
+ case WAVESHARE_EPAPER_2_13_IN:
479
+ ESP_LOGCONFIG(TAG, " Model: 2.13in");
480
+ break;
481
+ case WAVESHARE_EPAPER_2_13_IN_V2:
482
+ ESP_LOGCONFIG(TAG, " Model: 2.13inV2");
483
+ break;
484
+ case TTGO_EPAPER_2_13_IN:
485
+ ESP_LOGCONFIG(TAG, " Model: 2.13in (TTGO)");
486
+ break;
487
+ case TTGO_EPAPER_2_13_IN_B73:
488
+ ESP_LOGCONFIG(TAG, " Model: 2.13in (TTGO B73)");
489
+ break;
490
+ case TTGO_EPAPER_2_13_IN_B74:
491
+ ESP_LOGCONFIG(TAG, " Model: 2.13in (TTGO B74)");
492
+ break;
493
+ case TTGO_EPAPER_2_13_IN_B1:
494
+ ESP_LOGCONFIG(TAG, " Model: 2.13in (TTGO B1)");
495
+ break;
496
+ case WAVESHARE_EPAPER_2_9_IN:
497
+ ESP_LOGCONFIG(TAG, " Model: 2.9in");
498
+ break;
499
+ case WAVESHARE_EPAPER_2_9_IN_V2:
500
+ ESP_LOGCONFIG(TAG, " Model: 2.9inV2");
501
+ break;
502
+ }
503
+ ESP_LOGCONFIG(TAG, " Full Update Every: %" PRIu32, this->full_update_every_);
504
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
505
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
506
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
507
+ LOG_UPDATE_INTERVAL(this);
508
+ }
509
+ void HOT WaveshareEPaperTypeA::display() {
510
+ bool full_update = this->at_update_ == 0;
511
+ bool prev_full_update = this->at_update_ == 1;
512
+
513
+ if (this->deep_sleep_between_updates_) {
514
+ ESP_LOGI(TAG, "Wake up the display");
515
+ this->reset_();
516
+ this->wait_until_idle_();
517
+ this->init_display_();
518
+ }
519
+
520
+ if (!this->wait_until_idle_()) {
521
+ this->status_set_warning();
522
+ return;
523
+ }
524
+
525
+ if (this->full_update_every_ >= 1) {
526
+ if (full_update != prev_full_update) {
527
+ switch (this->model_) {
528
+ case TTGO_EPAPER_2_13_IN:
529
+ case WAVESHARE_EPAPER_2_13_IN_V2:
530
+ // Waveshare 2.13" V2 uses the same LUTs as TTGO
531
+ this->write_lut_(full_update ? FULL_UPDATE_LUT_TTGO : PARTIAL_UPDATE_LUT_TTGO, LUT_SIZE_TTGO);
532
+ break;
533
+ case TTGO_EPAPER_2_13_IN_B73:
534
+ this->write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B73 : PARTIAL_UPDATE_LUT_TTGO_B73, LUT_SIZE_TTGO_B73);
535
+ break;
536
+ case TTGO_EPAPER_2_13_IN_B74:
537
+ // there is no LUT
538
+ break;
539
+ case TTGO_EPAPER_2_13_IN_B1:
540
+ this->write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B1 : PARTIAL_UPDATE_LUT_TTGO_B1, LUT_SIZE_TTGO_B1);
541
+ break;
542
+ default:
543
+ this->write_lut_(full_update ? FULL_UPDATE_LUT : PARTIAL_UPDATE_LUT, LUT_SIZE_WAVESHARE);
544
+ }
545
+ }
546
+ this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
547
+ }
548
+
549
+ if (this->model_ == WAVESHARE_EPAPER_2_13_IN_V2) {
550
+ // Set VCOM for full or partial update
551
+ this->command(0x2C);
552
+ this->data(full_update ? 0x55 : 0x26);
553
+
554
+ if (!full_update) {
555
+ // Enable "ping-pong"
556
+ this->command(0x37);
557
+ this->data(0x00);
558
+ this->data(0x00);
559
+ this->data(0x00);
560
+ this->data(0x00);
561
+ this->data(0x40);
562
+ this->data(0x00);
563
+ this->data(0x00);
564
+ this->command(0x22);
565
+ this->data(0xc0);
566
+ this->command(0x20);
567
+ }
568
+ }
569
+
570
+ // Border waveform
571
+ switch (this->model_) {
572
+ case TTGO_EPAPER_2_13_IN_B74:
573
+ this->command(0x3C);
574
+ this->data(full_update ? 0x05 : 0x80);
575
+ break;
576
+ case WAVESHARE_EPAPER_2_13_IN_V2:
577
+ this->command(0x3C);
578
+ this->data(full_update ? 0x03 : 0x01);
579
+ break;
580
+ default:
581
+ break;
582
+ }
583
+
584
+ // Set x & y regions we want to write to (full)
585
+ switch (this->model_) {
586
+ case TTGO_EPAPER_2_13_IN_B1:
587
+ // COMMAND SET RAM X ADDRESS START END POSITION
588
+ this->command(0x44);
589
+ this->data(0x00);
590
+ this->data((this->get_width_controller() - 1) >> 3);
591
+ // COMMAND SET RAM Y ADDRESS START END POSITION
592
+ this->command(0x45);
593
+ this->data(this->get_height_internal() - 1);
594
+ this->data((this->get_height_internal() - 1) >> 8);
595
+ this->data(0x00);
596
+ this->data(0x00);
597
+
598
+ // COMMAND SET RAM X ADDRESS COUNTER
599
+ this->command(0x4E);
600
+ this->data(0x00);
601
+ // COMMAND SET RAM Y ADDRESS COUNTER
602
+ this->command(0x4F);
603
+ this->data(this->get_height_internal() - 1);
604
+ this->data((this->get_height_internal() - 1) >> 8);
605
+
606
+ break;
607
+ default:
608
+ // COMMAND SET RAM X ADDRESS START END POSITION
609
+ this->command(0x44);
610
+ this->data(0x00);
611
+ this->data((this->get_width_internal() - 1) >> 3);
612
+ // COMMAND SET RAM Y ADDRESS START END POSITION
613
+ this->command(0x45);
614
+ this->data(0x00);
615
+ this->data(0x00);
616
+ this->data(this->get_height_internal() - 1);
617
+ this->data((this->get_height_internal() - 1) >> 8);
618
+
619
+ // COMMAND SET RAM X ADDRESS COUNTER
620
+ this->command(0x4E);
621
+ this->data(0x00);
622
+ // COMMAND SET RAM Y ADDRESS COUNTER
623
+ this->command(0x4F);
624
+ this->data(0x00);
625
+ this->data(0x00);
626
+ }
627
+
628
+ if (!this->wait_until_idle_()) {
629
+ this->status_set_warning();
630
+ return;
631
+ }
632
+
633
+ // COMMAND WRITE RAM
634
+ this->command(0x24);
635
+ this->start_data_();
636
+ switch (this->model_) {
637
+ case TTGO_EPAPER_2_13_IN_B1: { // block needed because of variable initializations
638
+ int16_t wb = ((this->get_width_controller()) >> 3);
639
+ for (int i = 0; i < this->get_height_internal(); i++) {
640
+ for (int j = 0; j < wb; j++) {
641
+ int idx = j + (this->get_height_internal() - 1 - i) * wb;
642
+ this->write_byte(this->buffer_[idx]);
643
+ }
644
+ }
645
+ break;
646
+ }
647
+ default:
648
+ this->write_array(this->buffer_, this->get_buffer_length_());
649
+ }
650
+ this->end_data_();
651
+
652
+ if (this->model_ == WAVESHARE_EPAPER_2_13_IN_V2 && full_update) {
653
+ // Write base image again on full refresh
654
+ this->command(0x26);
655
+ this->start_data_();
656
+ this->write_array(this->buffer_, this->get_buffer_length_());
657
+ this->end_data_();
658
+ }
659
+
660
+ // COMMAND DISPLAY UPDATE CONTROL 2
661
+ this->command(0x22);
662
+ switch (this->model_) {
663
+ case WAVESHARE_EPAPER_2_9_IN_V2:
664
+ case WAVESHARE_EPAPER_1_54_IN_V2:
665
+ case TTGO_EPAPER_2_13_IN_B74:
666
+ this->data(full_update ? 0xF7 : 0xFF);
667
+ break;
668
+ case TTGO_EPAPER_2_13_IN_B73:
669
+ this->data(0xC7);
670
+ break;
671
+ case WAVESHARE_EPAPER_2_13_IN_V2:
672
+ this->data(full_update ? 0xC7 : 0x0C);
673
+ break;
674
+ default:
675
+ this->data(0xC4);
676
+ break;
677
+ }
678
+
679
+ // COMMAND MASTER ACTIVATION
680
+ this->command(0x20);
681
+ // COMMAND TERMINATE FRAME READ WRITE
682
+ this->command(0xFF);
683
+
684
+ this->status_clear_warning();
685
+
686
+ if (this->deep_sleep_between_updates_) {
687
+ ESP_LOGI(TAG, "Set the display back to deep sleep");
688
+ this->deep_sleep();
689
+ }
690
+ }
691
+ int WaveshareEPaperTypeA::get_width_internal() {
692
+ switch (this->model_) {
693
+ case WAVESHARE_EPAPER_1_54_IN:
694
+ case WAVESHARE_EPAPER_1_54_IN_V2:
695
+ return 200;
696
+ case WAVESHARE_EPAPER_2_13_IN:
697
+ case WAVESHARE_EPAPER_2_13_IN_V2:
698
+ case TTGO_EPAPER_2_13_IN:
699
+ case TTGO_EPAPER_2_13_IN_B73:
700
+ case TTGO_EPAPER_2_13_IN_B74:
701
+ case TTGO_EPAPER_2_13_IN_B1:
702
+ return 122;
703
+ case WAVESHARE_EPAPER_2_9_IN:
704
+ case WAVESHARE_EPAPER_2_9_IN_V2:
705
+ return 128;
706
+ }
707
+ return 0;
708
+ }
709
+ // The controller of the 2.13" displays has a buffer larger than screen size
710
+ int WaveshareEPaperTypeA::get_width_controller() {
711
+ switch (this->model_) {
712
+ case WAVESHARE_EPAPER_2_13_IN:
713
+ case WAVESHARE_EPAPER_2_13_IN_V2:
714
+ case TTGO_EPAPER_2_13_IN:
715
+ case TTGO_EPAPER_2_13_IN_B73:
716
+ case TTGO_EPAPER_2_13_IN_B74:
717
+ case TTGO_EPAPER_2_13_IN_B1:
718
+ return 128;
719
+ default:
720
+ return this->get_width_internal();
721
+ }
722
+ }
723
+ int WaveshareEPaperTypeA::get_height_internal() {
724
+ switch (this->model_) {
725
+ case WAVESHARE_EPAPER_1_54_IN:
726
+ case WAVESHARE_EPAPER_1_54_IN_V2:
727
+ return 200;
728
+ case WAVESHARE_EPAPER_2_13_IN:
729
+ case WAVESHARE_EPAPER_2_13_IN_V2:
730
+ case TTGO_EPAPER_2_13_IN:
731
+ case TTGO_EPAPER_2_13_IN_B73:
732
+ case TTGO_EPAPER_2_13_IN_B74:
733
+ case TTGO_EPAPER_2_13_IN_B1:
734
+ return 250;
735
+ case WAVESHARE_EPAPER_2_9_IN:
736
+ case WAVESHARE_EPAPER_2_9_IN_V2:
737
+ return 296;
738
+ }
739
+ return 0;
740
+ }
741
+ void WaveshareEPaperTypeA::write_lut_(const uint8_t *lut, const uint8_t size) {
742
+ // COMMAND WRITE LUT REGISTER
743
+ this->command(0x32);
744
+ for (uint8_t i = 0; i < size; i++)
745
+ this->data(lut[i]);
746
+ }
747
+ WaveshareEPaperTypeA::WaveshareEPaperTypeA(WaveshareEPaperTypeAModel model) : model_(model) {}
748
+ void WaveshareEPaperTypeA::set_full_update_every(uint32_t full_update_every) {
749
+ this->full_update_every_ = full_update_every;
750
+ }
751
+
752
+ uint32_t WaveshareEPaperTypeA::idle_timeout_() {
753
+ switch (this->model_) {
754
+ case WAVESHARE_EPAPER_1_54_IN:
755
+ case WAVESHARE_EPAPER_1_54_IN_V2:
756
+ case WAVESHARE_EPAPER_2_13_IN_V2:
757
+ case TTGO_EPAPER_2_13_IN_B1:
758
+ return 2500;
759
+ default:
760
+ return WaveshareEPaperBase::idle_timeout_();
761
+ }
762
+ }
763
+
764
+ // ========================================================
765
+ // Type B
766
+ // ========================================================
767
+ // Datasheet:
768
+ // - https://www.waveshare.com/w/upload/7/7f/4.2inch-e-paper-b-specification.pdf
769
+ // - https://github.com/soonuse/epd-library-arduino/blob/master/4.2inch_e-paper/epd4in2/
770
+
771
+ static const uint8_t LUT_VCOM_DC_2_7[44] = {
772
+ 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x32, 0x32, 0x00, 0x00, 0x02, 0x00,
773
+ 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
774
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
775
+ };
776
+
777
+ static const uint8_t LUT_WHITE_TO_WHITE_2_7[42] = {
778
+ 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
779
+ 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
780
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
781
+ };
782
+
783
+ static const uint8_t LUT_BLACK_TO_WHITE_2_7[42] = {
784
+ 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
785
+ 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
786
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
787
+ };
788
+
789
+ static const uint8_t LUT_WHITE_TO_BLACK_2_7[] = {
790
+ 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
791
+ 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
792
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
793
+ };
794
+
795
+ static const uint8_t LUT_BLACK_TO_BLACK_2_7[42] = {
796
+ 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
797
+ 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
798
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
799
+ };
800
+
801
+ void WaveshareEPaper2P7In::initialize() {
802
+ // command power setting
803
+ this->command(0x01);
804
+ this->data(0x03); // VDS_EN, VDG_EN
805
+ this->data(0x00); // VCOM_HV, VGHL_LV[1], VGHL_LV[0]
806
+ this->data(0x2B); // VDH
807
+ this->data(0x2B); // VDL
808
+ this->data(0x09); // VDHR
809
+
810
+ // command booster soft start
811
+ this->command(0x06);
812
+ this->data(0x07);
813
+ this->data(0x07);
814
+ this->data(0x17);
815
+
816
+ // Power optimization - ???
817
+ this->command(0xF8);
818
+ this->data(0x60);
819
+ this->data(0xA5);
820
+ this->command(0xF8);
821
+ this->data(0x89);
822
+ this->data(0xA5);
823
+ this->command(0xF8);
824
+ this->data(0x90);
825
+ this->data(0x00);
826
+ this->command(0xF8);
827
+ this->data(0x93);
828
+ this->data(0x2A);
829
+ this->command(0xF8);
830
+ this->data(0xA0);
831
+ this->data(0xA5);
832
+ this->command(0xF8);
833
+ this->data(0xA1);
834
+ this->data(0x00);
835
+ this->command(0xF8);
836
+ this->data(0x73);
837
+ this->data(0x41);
838
+
839
+ // command partial display refresh
840
+ this->command(0x16);
841
+ this->data(0x00);
842
+
843
+ // command power on
844
+ this->command(0x04);
845
+ this->wait_until_idle_();
846
+ delay(10);
847
+
848
+ // Command panel setting
849
+ this->command(0x00);
850
+ this->data(0xAF); // KW-BF KWR-AF BWROTP 0f
851
+ // command pll control
852
+ this->command(0x30);
853
+ this->data(0x3A); // 3A 100HZ 29 150Hz 39 200HZ 31 171HZ
854
+ // COMMAND VCM DC SETTING
855
+ this->command(0x82);
856
+ this->data(0x12);
857
+
858
+ delay(2);
859
+ // COMMAND LUT FOR VCOM
860
+ this->command(0x20);
861
+ for (uint8_t i : LUT_VCOM_DC_2_7)
862
+ this->data(i);
863
+
864
+ // COMMAND LUT WHITE TO WHITE
865
+ this->command(0x21);
866
+ for (uint8_t i : LUT_WHITE_TO_WHITE_2_7)
867
+ this->data(i);
868
+ // COMMAND LUT BLACK TO WHITE
869
+ this->command(0x22);
870
+ for (uint8_t i : LUT_BLACK_TO_WHITE_2_7)
871
+ this->data(i);
872
+ // COMMAND LUT WHITE TO BLACK
873
+ this->command(0x23);
874
+ for (uint8_t i : LUT_WHITE_TO_BLACK_2_7)
875
+ this->data(i);
876
+ // COMMAND LUT BLACK TO BLACK
877
+ this->command(0x24);
878
+ for (uint8_t i : LUT_BLACK_TO_BLACK_2_7)
879
+ this->data(i);
880
+ }
881
+ void HOT WaveshareEPaper2P7In::display() {
882
+ uint32_t buf_len = this->get_buffer_length_();
883
+
884
+ // COMMAND DATA START TRANSMISSION 1
885
+ this->command(0x10);
886
+ delay(2);
887
+ for (uint32_t i = 0; i < buf_len; i++) {
888
+ this->data(this->buffer_[i]);
889
+ }
890
+ delay(2);
891
+
892
+ // COMMAND DATA START TRANSMISSION 2
893
+ this->command(0x13);
894
+ delay(2);
895
+ for (uint32_t i = 0; i < buf_len; i++) {
896
+ this->data(this->buffer_[i]);
897
+ }
898
+
899
+ // COMMAND DISPLAY REFRESH
900
+ this->command(0x12);
901
+ }
902
+ int WaveshareEPaper2P7In::get_width_internal() { return 176; }
903
+ int WaveshareEPaper2P7In::get_height_internal() { return 264; }
904
+ void WaveshareEPaper2P7In::dump_config() {
905
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
906
+ ESP_LOGCONFIG(TAG, " Model: 2.7in");
907
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
908
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
909
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
910
+ LOG_UPDATE_INTERVAL(this);
911
+ }
912
+
913
+ void WaveshareEPaper2P7InV2::initialize() {
914
+ this->reset_();
915
+ this->wait_until_idle_();
916
+
917
+ this->command(0x12); // SWRESET
918
+ this->wait_until_idle_();
919
+
920
+ // SET WINDOWS
921
+ // XRAM_START_AND_END_POSITION
922
+ this->command(0x44);
923
+ this->data(0x00);
924
+ this->data(((this->get_width_controller() - 1) >> 3) & 0xFF);
925
+ // YRAM_START_AND_END_POSITION
926
+ this->command(0x45);
927
+ this->data(0x00);
928
+ this->data(0x00);
929
+ this->data((get_height_internal() - 1) & 0xFF);
930
+ this->data(((get_height_internal() - 1) >> 8) & 0xFF);
931
+
932
+ // SET CURSOR
933
+ // XRAM_ADDRESS
934
+ this->command(0x4E);
935
+ this->data(0x00);
936
+ // YRAM_ADDRESS
937
+ this->command(0x4F);
938
+ this->data(0x00);
939
+ this->data(0x00);
940
+
941
+ this->command(0x11); // data entry mode
942
+ this->data(0x03);
943
+ }
944
+ void HOT WaveshareEPaper2P7InV2::display() {
945
+ this->command(0x24);
946
+ this->start_data_();
947
+ this->write_array(this->buffer_, this->get_buffer_length_());
948
+ this->end_data_();
949
+
950
+ // COMMAND DISPLAY REFRESH
951
+ this->command(0x22);
952
+ this->data(0xF7);
953
+ this->command(0x20);
954
+ }
955
+ int WaveshareEPaper2P7InV2::get_width_internal() { return 176; }
956
+ int WaveshareEPaper2P7InV2::get_height_internal() { return 264; }
957
+ void WaveshareEPaper2P7InV2::dump_config() {
958
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
959
+ ESP_LOGCONFIG(TAG, " Model: 2.7in V2");
960
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
961
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
962
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
963
+ LOG_UPDATE_INTERVAL(this);
964
+ }
965
+
966
+ // ========================================================
967
+ // 1.54inch_v2_e-paper_b
968
+ // ========================================================
969
+ // Datasheet:
970
+ // - https://files.waveshare.com/upload/9/9e/1.54inch-e-paper-b-v2-specification.pdf
971
+ // - https://www.waveshare.com/wiki/1.54inch_e-Paper_Module_(B)_Manual
972
+
973
+ void WaveshareEPaper1P54InBV2::initialize() {
974
+ this->reset_();
975
+
976
+ this->wait_until_idle_();
977
+
978
+ this->command(0x12);
979
+ this->wait_until_idle_();
980
+
981
+ this->command(0x01);
982
+ this->data(0xC7);
983
+ this->data(0x00);
984
+ this->data(0x01);
985
+
986
+ this->command(0x11); // data entry mode
987
+ this->data(0x01);
988
+
989
+ this->command(0x44); // set Ram-X address start/end position
990
+ this->data(0x00);
991
+ this->data(0x18); // 0x18-->(24+1)*8=200
992
+
993
+ this->command(0x45); // set Ram-Y address start/end position
994
+ this->data(0xC7); // 0xC7-->(199+1)=200
995
+ this->data(0x00);
996
+ this->data(0x00);
997
+ this->data(0x00);
998
+
999
+ this->command(0x3C); // BorderWavefrom
1000
+ this->data(0x05);
1001
+
1002
+ this->command(0x18); // Read built-in temperature sensor
1003
+ this->data(0x80);
1004
+
1005
+ this->command(0x4E); // set RAM x address count to 0;
1006
+ this->data(0x00);
1007
+ this->command(0x4F); // set RAM y address count to 0x199;
1008
+ this->data(0xC7);
1009
+ this->data(0x00);
1010
+
1011
+ this->wait_until_idle_();
1012
+ }
1013
+
1014
+ void HOT WaveshareEPaper1P54InBV2::display() {
1015
+ uint32_t buf_len_half = this->get_buffer_length_() >> 1;
1016
+ this->initialize();
1017
+
1018
+ // COMMAND DATA START TRANSMISSION 1 (BLACK)
1019
+ this->command(0x24);
1020
+ delay(2);
1021
+ for (uint32_t i = 0; i < buf_len_half; i++) {
1022
+ this->data(~this->buffer_[i]);
1023
+ }
1024
+ delay(2);
1025
+
1026
+ // COMMAND DATA START TRANSMISSION 2 (RED)
1027
+ this->command(0x26);
1028
+ delay(2);
1029
+ for (uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
1030
+ this->data(this->buffer_[i]);
1031
+ }
1032
+ this->command(0x22);
1033
+ this->data(0xf7);
1034
+ this->command(0x20);
1035
+ this->wait_until_idle_();
1036
+
1037
+ this->deep_sleep();
1038
+ }
1039
+ int WaveshareEPaper1P54InBV2::get_height_internal() { return 200; }
1040
+ int WaveshareEPaper1P54InBV2::get_width_internal() { return 200; }
1041
+ void WaveshareEPaper1P54InBV2::dump_config() {
1042
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
1043
+ ESP_LOGCONFIG(TAG, " Model: 1.54in V2 B");
1044
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
1045
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
1046
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
1047
+ LOG_UPDATE_INTERVAL(this);
1048
+ }
1049
+
1050
+ // ========================================================
1051
+ // 2.7inch_e-paper_b
1052
+ // ========================================================
1053
+ // Datasheet:
1054
+ // - https://www.waveshare.com/w/upload/d/d8/2.7inch-e-paper-b-specification.pdf
1055
+ // - https://github.com/waveshare/e-Paper/blob/master/RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_2in7b.c
1056
+
1057
+ static const uint8_t LUT_VCOM_DC_2_7B[44] = {0x00, 0x00, 0x00, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A,
1058
+ 0x00, 0x00, 0x08, 0x00, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x00, 0x0A,
1059
+ 0x0A, 0x00, 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00,
1060
+ 0x03, 0x0E, 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1061
+
1062
+ static const uint8_t LUT_WHITE_TO_WHITE_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
1063
+ 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
1064
+ 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1065
+ 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1066
+
1067
+ static const uint8_t LUT_BLACK_TO_WHITE_2_7B[42] = {0xA0, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A, 0x00, 0x00,
1068
+ 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x90, 0x0A, 0x0A, 0x00,
1069
+ 0x00, 0x08, 0xB0, 0x04, 0x10, 0x00, 0x00, 0x05, 0xB0, 0x03, 0x0E,
1070
+ 0x00, 0x00, 0x0A, 0xC0, 0x23, 0x00, 0x00, 0x00, 0x01};
1071
+
1072
+ static const uint8_t LUT_WHITE_TO_BLACK_2_7B[] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x20, 0x0A, 0x0A, 0x00, 0x00,
1073
+ 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x10, 0x0A, 0x0A, 0x00,
1074
+ 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1075
+ 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1076
+
1077
+ static const uint8_t LUT_BLACK_TO_BLACK_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
1078
+ 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
1079
+ 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1080
+ 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1081
+
1082
+ void WaveshareEPaper2P7InB::initialize() {
1083
+ this->reset_();
1084
+
1085
+ // command power on
1086
+ this->command(0x04);
1087
+ this->wait_until_idle_();
1088
+ delay(10);
1089
+
1090
+ // Command panel setting
1091
+ this->command(0x00);
1092
+ this->data(0xAF); // KW-BF KWR-AF BWROTP 0f
1093
+ // command pll control
1094
+ this->command(0x30);
1095
+ this->data(0x3A); // 3A 100HZ 29 150Hz 39 200HZ 31 171HZ
1096
+
1097
+ // command power setting
1098
+ this->command(0x01);
1099
+ this->data(0x03); // VDS_EN, VDG_EN
1100
+ this->data(0x00); // VCOM_HV, VGHL_LV[1], VGHL_LV[0]
1101
+ this->data(0x2B); // VDH
1102
+ this->data(0x2B); // VDL
1103
+ this->data(0x09); // VDHR
1104
+
1105
+ // command booster soft start
1106
+ this->command(0x06);
1107
+ this->data(0x07);
1108
+ this->data(0x07);
1109
+ this->data(0x17);
1110
+
1111
+ // Power optimization - ???
1112
+ this->command(0xF8);
1113
+ this->data(0x60);
1114
+ this->data(0xA5);
1115
+ this->command(0xF8);
1116
+ this->data(0x89);
1117
+ this->data(0xA5);
1118
+ this->command(0xF8);
1119
+ this->data(0x90);
1120
+ this->data(0x00);
1121
+ this->command(0xF8);
1122
+ this->data(0x93);
1123
+ this->data(0x2A);
1124
+ this->command(0xF8);
1125
+ this->data(0x73);
1126
+ this->data(0x41);
1127
+
1128
+ // COMMAND VCM DC SETTING
1129
+ this->command(0x82);
1130
+ this->data(0x12);
1131
+
1132
+ // VCOM_AND_DATA_INTERVAL_SETTING
1133
+ this->command(0x50);
1134
+ this->data(0x87); // define by OTP
1135
+
1136
+ delay(2);
1137
+ // COMMAND LUT FOR VCOM
1138
+ this->command(0x20);
1139
+ for (uint8_t i : LUT_VCOM_DC_2_7B)
1140
+ this->data(i);
1141
+ // COMMAND LUT WHITE TO WHITE
1142
+ this->command(0x21);
1143
+ for (uint8_t i : LUT_WHITE_TO_WHITE_2_7B)
1144
+ this->data(i);
1145
+ // COMMAND LUT BLACK TO WHITE
1146
+ this->command(0x22);
1147
+ for (uint8_t i : LUT_BLACK_TO_WHITE_2_7B)
1148
+ this->data(i);
1149
+ // COMMAND LUT WHITE TO BLACK
1150
+ this->command(0x23);
1151
+ for (uint8_t i : LUT_WHITE_TO_BLACK_2_7B) {
1152
+ this->data(i);
1153
+ }
1154
+ // COMMAND LUT BLACK TO BLACK
1155
+ this->command(0x24);
1156
+
1157
+ for (uint8_t i : LUT_BLACK_TO_BLACK_2_7B) {
1158
+ this->data(i);
1159
+ }
1160
+
1161
+ delay(2);
1162
+ }
1163
+
1164
+ void HOT WaveshareEPaper2P7InB::display() {
1165
+ uint32_t buf_len_half = this->get_buffer_length_() >> 1;
1166
+ this->initialize();
1167
+
1168
+ // TCON_RESOLUTION
1169
+ this->command(0x61);
1170
+ this->data(this->get_width_controller() >> 8);
1171
+ this->data(this->get_width_controller() & 0xff); // 176
1172
+ this->data(this->get_height_internal() >> 8);
1173
+ this->data(this->get_height_internal() & 0xff); // 264
1174
+
1175
+ // COMMAND DATA START TRANSMISSION 1 (BLACK)
1176
+ this->command(0x10);
1177
+ delay(2);
1178
+ for (uint32_t i = 0; i < buf_len_half; i++) {
1179
+ this->data(this->buffer_[i]);
1180
+ }
1181
+ this->command(0x11);
1182
+ delay(2);
1183
+
1184
+ // COMMAND DATA START TRANSMISSION 2 (RED)
1185
+ this->command(0x13);
1186
+ delay(2);
1187
+ for (uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
1188
+ this->data(this->buffer_[i]);
1189
+ }
1190
+ this->command(0x11);
1191
+
1192
+ delay(2);
1193
+
1194
+ // COMMAND DISPLAY REFRESH
1195
+ this->command(0x12);
1196
+ this->wait_until_idle_();
1197
+
1198
+ this->deep_sleep();
1199
+ }
1200
+ int WaveshareEPaper2P7InB::get_width_internal() { return 176; }
1201
+ int WaveshareEPaper2P7InB::get_height_internal() { return 264; }
1202
+ void WaveshareEPaper2P7InB::dump_config() {
1203
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
1204
+ ESP_LOGCONFIG(TAG, " Model: 2.7in B");
1205
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
1206
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
1207
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
1208
+ LOG_UPDATE_INTERVAL(this);
1209
+ }
1210
+
1211
+ // ========================================================
1212
+ // 2.7inch_e-paper_b_v2
1213
+ // ========================================================
1214
+ // Datasheet:
1215
+ // - https://www.waveshare.com/w/upload/7/7b/2.7inch-e-paper-b-v2-specification.pdf
1216
+ // - https://github.com/waveshare/e-Paper/blob/master/RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_2in7b_V2.c
1217
+
1218
+ void WaveshareEPaper2P7InBV2::initialize() {
1219
+ this->reset_();
1220
+
1221
+ this->wait_until_idle_();
1222
+ this->command(0x12);
1223
+ this->wait_until_idle_();
1224
+
1225
+ this->command(0x00);
1226
+ this->data(0x27);
1227
+ this->data(0x01);
1228
+ this->data(0x00);
1229
+
1230
+ this->command(0x11);
1231
+ this->data(0x03);
1232
+
1233
+ // self.SetWindows(0, 0, self.width-1, self.height-1)
1234
+ // SetWindows(self, Xstart, Ystart, Xend, Yend):
1235
+
1236
+ uint32_t xend = this->get_width_controller() - 1;
1237
+ uint32_t yend = this->get_height_internal() - 1;
1238
+ this->command(0x44);
1239
+ this->data(0x00);
1240
+ this->data((xend >> 3) & 0xff);
1241
+
1242
+ this->command(0x45);
1243
+ this->data(0x00);
1244
+ this->data(0x00);
1245
+ this->data(yend & 0xff);
1246
+ this->data((yend >> 8) & 0xff);
1247
+
1248
+ // SetCursor(self, Xstart, Ystart):
1249
+ this->command(0x4E);
1250
+ this->data(0x00);
1251
+ this->command(0x4F);
1252
+ this->data(0x00);
1253
+ this->data(0x00);
1254
+ }
1255
+
1256
+ void HOT WaveshareEPaper2P7InBV2::display() {
1257
+ uint32_t buf_len = this->get_buffer_length_();
1258
+ // COMMAND DATA START TRANSMISSION 1 (BLACK)
1259
+ this->command(0x24);
1260
+ delay(2);
1261
+ for (uint32_t i = 0; i < buf_len; i++) {
1262
+ this->data(this->buffer_[i]);
1263
+ }
1264
+ delay(2);
1265
+
1266
+ // COMMAND DATA START TRANSMISSION 2 (RED)
1267
+ this->command(0x26);
1268
+ delay(2);
1269
+ for (uint32_t i = 0; i < buf_len; i++) {
1270
+ this->data(this->buffer_[i]);
1271
+ }
1272
+
1273
+ delay(2);
1274
+
1275
+ this->command(0x20);
1276
+
1277
+ this->wait_until_idle_();
1278
+ }
1279
+ int WaveshareEPaper2P7InBV2::get_width_internal() { return 176; }
1280
+ int WaveshareEPaper2P7InBV2::get_height_internal() { return 264; }
1281
+ void WaveshareEPaper2P7InBV2::dump_config() {
1282
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
1283
+ ESP_LOGCONFIG(TAG, " Model: 2.7in B V2");
1284
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
1285
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
1286
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
1287
+ LOG_UPDATE_INTERVAL(this);
1288
+ }
1289
+
1290
+ // ========================================================
1291
+ // 2.90in Type B (LUT from OTP)
1292
+ // Datasheet:
1293
+ // - https://www.waveshare.com/w/upload/b/bb/2.9inch-e-paper-b-specification.pdf
1294
+ // - https://github.com/soonuse/epd-library-arduino/blob/master/2.9inch_e-paper_b/epd2in9b/epd2in9b.cpp
1295
+ // ========================================================
1296
+
1297
+ void WaveshareEPaper2P9InB::initialize() {
1298
+ // from https://www.waveshare.com/w/upload/b/bb/2.9inch-e-paper-b-specification.pdf, page 37
1299
+ // EPD hardware init start
1300
+ this->reset_();
1301
+
1302
+ // COMMAND BOOSTER SOFT START
1303
+ this->command(0x06);
1304
+ this->data(0x17);
1305
+ this->data(0x17);
1306
+ this->data(0x17);
1307
+
1308
+ // COMMAND POWER ON
1309
+ this->command(0x04);
1310
+ this->wait_until_idle_();
1311
+
1312
+ // COMMAND PANEL SETTING
1313
+ this->command(0x00);
1314
+ // 128x296 resolution: 10
1315
+ // LUT from OTP: 0
1316
+ // B/W mode (doesn't work): 1
1317
+ // scan-up: 1
1318
+ // shift-right: 1
1319
+ // booster ON: 1
1320
+ // no soft reset: 1
1321
+ this->data(0x9F);
1322
+
1323
+ // COMMAND RESOLUTION SETTING
1324
+ // set to 128x296 by COMMAND PANEL SETTING
1325
+
1326
+ // COMMAND VCOM AND DATA INTERVAL SETTING
1327
+ // use defaults for white border and ESPHome image polarity
1328
+
1329
+ // EPD hardware init end
1330
+ }
1331
+ void HOT WaveshareEPaper2P9InB::display() {
1332
+ // COMMAND DATA START TRANSMISSION 1 (B/W data)
1333
+ this->command(0x10);
1334
+ delay(2);
1335
+ this->start_data_();
1336
+ this->write_array(this->buffer_, this->get_buffer_length_());
1337
+ this->end_data_();
1338
+ delay(2);
1339
+
1340
+ // COMMAND DATA START TRANSMISSION 2 (RED data)
1341
+ this->command(0x13);
1342
+ delay(2);
1343
+ this->start_data_();
1344
+ for (size_t i = 0; i < this->get_buffer_length_(); i++)
1345
+ this->write_byte(0x00);
1346
+ this->end_data_();
1347
+ delay(2);
1348
+
1349
+ // COMMAND DISPLAY REFRESH
1350
+ this->command(0x12);
1351
+ delay(2);
1352
+ this->wait_until_idle_();
1353
+
1354
+ // COMMAND POWER OFF
1355
+ // NOTE: power off < deep sleep
1356
+ this->command(0x02);
1357
+ }
1358
+ int WaveshareEPaper2P9InB::get_width_internal() { return 128; }
1359
+ int WaveshareEPaper2P9InB::get_height_internal() { return 296; }
1360
+ void WaveshareEPaper2P9InB::dump_config() {
1361
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
1362
+ ESP_LOGCONFIG(TAG, " Model: 2.9in (B)");
1363
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
1364
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
1365
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
1366
+ LOG_UPDATE_INTERVAL(this);
1367
+ }
1368
+
1369
+ // ========================================================
1370
+ // Waveshare 2.9-inch E-Paper (Type D)
1371
+ // Waveshare WIKI: https://www.waveshare.com/wiki/Pico-ePaper-2.9-D
1372
+ // Datasheet: https://www.waveshare.com/w/upload/b/b5/2.9inch_e-Paper_(D)_Specification.pdf
1373
+ // ========================================================
1374
+
1375
+ void WaveshareEPaper2P9InD::initialize() {
1376
+ // EPD hardware init start
1377
+ this->reset_();
1378
+
1379
+ // Booster Soft Start
1380
+ this->command(0x06); // Command: BTST
1381
+ this->data(0x17); // Soft start configuration Phase A
1382
+ this->data(0x17); // Soft start configuration Phase B
1383
+ this->data(0x17); // Soft start configuration Phase C
1384
+
1385
+ // Power Setting
1386
+ this->command(0x01); // Command: PWR
1387
+ this->data(0x03); // Intern DC/DC for VDH/VDL and VGH/VGL
1388
+ this->data(0x00); // Default configuration VCOM_HV and VGHL_LV
1389
+ this->data(0x2b); // VDH = 10.8 V
1390
+ this->data(0x2b); // VDL = -10.8 V
1391
+
1392
+ // Power ON
1393
+ this->command(0x04); // Command: PON
1394
+ this->wait_until_idle_();
1395
+
1396
+ // Panel settings
1397
+ this->command(0x00); // Command: PSR
1398
+ this->data(0x1F); // LUT from OTP, black and white mode, default scan
1399
+
1400
+ // PLL Control
1401
+ this->command(0x30); // Command: PLL
1402
+ this->data(0x3A); // Default PLL frequency
1403
+
1404
+ // Resolution settings
1405
+ this->command(0x61); // Command: TRES
1406
+ this->data(0x80); // Width: 128
1407
+ this->data(0x01); // Height MSB: 296
1408
+ this->data(0x28); // Height LSB: 296
1409
+
1410
+ // VCOM and data interval settings
1411
+ this->command(0x50); // Command: CDI
1412
+ this->data(0x77);
1413
+
1414
+ // VCOM_DC settings
1415
+ this->command(0x82); // Command: VDCS
1416
+ this->data(0x12); // Dafault VCOM_DC
1417
+ }
1418
+
1419
+ void WaveshareEPaper2P9InD::display() {
1420
+ // Start transmitting old data (clearing buffer)
1421
+ this->command(0x10); // Command: DTM1 (OLD frame data)
1422
+ this->start_data_();
1423
+ this->write_array(this->buffer_, this->get_buffer_length_());
1424
+ this->end_data_();
1425
+
1426
+ // Start transmitting new data (updated content)
1427
+ this->command(0x13); // Command: DTM2 (NEW frame data)
1428
+ this->start_data_();
1429
+ this->write_array(this->buffer_, this->get_buffer_length_());
1430
+ this->end_data_();
1431
+
1432
+ // Refresh Display
1433
+ this->command(0x12); // Command: DRF
1434
+ this->wait_until_idle_();
1435
+
1436
+ // Enter Power Off
1437
+ this->command(0x02); // Command: POF
1438
+ this->wait_until_idle_();
1439
+
1440
+ // Enter Deep Sleep
1441
+ this->command(0x07); // Command: DSLP
1442
+ this->data(0xA5);
1443
+ }
1444
+
1445
+ int WaveshareEPaper2P9InD::get_width_internal() { return 128; }
1446
+ int WaveshareEPaper2P9InD::get_height_internal() { return 296; }
1447
+ void WaveshareEPaper2P9InD::dump_config() {
1448
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
1449
+ ESP_LOGCONFIG(TAG, " Model: 2.9in (D)");
1450
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
1451
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
1452
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
1453
+ LOG_UPDATE_INTERVAL(this);
1454
+ }
1455
+
1456
+ // DKE 2.9
1457
+ // https://www.badge.team/docs/badges/sha2017/hardware/#e-ink-display-the-dke-group-depg0290b1
1458
+ // https://www.badge.team/docs/badges/sha2017/hardware/DEPG0290B01V3.0.pdf
1459
+ static const uint8_t LUT_SIZE_DKE = 70;
1460
+ static const uint8_t UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1461
+ 0xA0, 0x90, 0x50, 0x0, 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0xA0, 0x90, 0x50, 0x0,
1462
+ 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0x00, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0xF,
1463
+ 0xF, 0x0, 0x0, 0x0, 0xF, 0xF, 0x0, 0x0, 0x02, 0xF, 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1464
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1465
+ };
1466
+ static const uint8_t PART_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1467
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x10, 0x00, 0x00,
1468
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
1469
+ 0x05, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1470
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1471
+ static const uint8_t FULL_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1472
+ 0x90, 0x50, 0xa0, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x90, 0x50, 0xa0, 0x50,
1473
+ 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17,
1474
+ 0x04, 0x00, 0x00, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00,
1475
+ 0x00, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1476
+
1477
+ void WaveshareEPaper2P9InDKE::initialize() {
1478
+ // Hardware reset
1479
+ delay(10);
1480
+ this->reset_pin_->digital_write(false);
1481
+ delayMicroseconds(200);
1482
+ this->reset_pin_->digital_write(true);
1483
+ delayMicroseconds(200);
1484
+ // Wait for busy low
1485
+ this->wait_until_idle_();
1486
+ // Software reset
1487
+ this->command(0x12);
1488
+ // Wait for busy low
1489
+ this->wait_until_idle_();
1490
+ // Set Analog Block Control
1491
+ this->command(0x74);
1492
+ this->data(0x54);
1493
+ // Set Digital Block Control
1494
+ this->command(0x7E);
1495
+ this->data(0x3B);
1496
+ // Set display size and driver output control
1497
+ this->command(0x01);
1498
+ // this->data(0x27);
1499
+ // this->data(0x01);
1500
+ // this->data(0x00);
1501
+ this->data(this->get_height_internal() - 1);
1502
+ this->data((this->get_height_internal() - 1) >> 8);
1503
+ this->data(0x00); // ? GD = 0, SM = 0, TB = 0
1504
+ // Ram data entry mode
1505
+ this->command(0x11);
1506
+ this->data(0x03);
1507
+ // Set Ram X address
1508
+ this->command(0x44);
1509
+ this->data(0x00);
1510
+ this->data(0x0F);
1511
+ // Set Ram Y address
1512
+ this->command(0x45);
1513
+ this->data(0x00);
1514
+ this->data(0x00);
1515
+ this->data(0x27);
1516
+ this->data(0x01);
1517
+ // Set border
1518
+ this->command(0x3C);
1519
+ // this->data(0x80);
1520
+ this->data(0x01);
1521
+ // Set VCOM value
1522
+ this->command(0x2C);
1523
+ this->data(0x26);
1524
+ // Gate voltage setting
1525
+ this->command(0x03);
1526
+ this->data(0x17);
1527
+ // Source voltage setting
1528
+ this->command(0x04);
1529
+ this->data(0x41);
1530
+ this->data(0x00);
1531
+ this->data(0x32);
1532
+ // Frame setting 50hz
1533
+ this->command(0x3A);
1534
+ this->data(0x30);
1535
+ this->command(0x3B);
1536
+ this->data(0x0A);
1537
+ // Load LUT
1538
+ this->command(0x32);
1539
+ for (uint8_t v : FULL_UPDATE_LUT_DKE)
1540
+ this->data(v);
1541
+ }
1542
+
1543
+ void HOT WaveshareEPaper2P9InDKE::display() {
1544
+ ESP_LOGI(TAG, "Performing e-paper update.");
1545
+ // Set Ram X address counter
1546
+ this->command(0x4e);
1547
+ this->data(0);
1548
+ // Set Ram Y address counter
1549
+ this->command(0x4f);
1550
+ this->data(0);
1551
+ this->data(0);
1552
+ // Load image (128/8*296)
1553
+ this->command(0x24);
1554
+ this->start_data_();
1555
+ this->write_array(this->buffer_, this->get_buffer_length_());
1556
+ this->end_data_();
1557
+ // Image update
1558
+ this->command(0x22);
1559
+ this->data(0xC7);
1560
+ this->command(0x20);
1561
+ // Wait for busy low
1562
+ this->wait_until_idle_();
1563
+ // Enter deep sleep mode
1564
+ this->command(0x10);
1565
+ this->data(0x01);
1566
+ }
1567
+ int WaveshareEPaper2P9InDKE::get_width_internal() { return 128; }
1568
+ int WaveshareEPaper2P9InDKE::get_height_internal() { return 296; }
1569
+ void WaveshareEPaper2P9InDKE::dump_config() {
1570
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
1571
+ ESP_LOGCONFIG(TAG, " Model: 2.9in DKE");
1572
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
1573
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
1574
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
1575
+ LOG_UPDATE_INTERVAL(this);
1576
+ }
1577
+ void WaveshareEPaper2P9InDKE::set_full_update_every(uint32_t full_update_every) {
1578
+ this->full_update_every_ = full_update_every;
1579
+ }
1580
+
1581
+ // ========================================================
1582
+ // 2.90in Type B (LUT from OTP)
1583
+ // Datasheet:
1584
+ // - https://files.waveshare.com/upload/a/af/2.9inch-e-paper-b-v3-specification.pdf
1585
+ // ========================================================
1586
+
1587
+ void WaveshareEPaper2P9InBV3::initialize() {
1588
+ // from https://github.com/waveshareteam/e-Paper/blob/master/Arduino/epd2in9b_V3/epd2in9b_V3.cpp
1589
+ this->reset_();
1590
+
1591
+ // COMMAND POWER ON
1592
+ this->command(0x04);
1593
+ this->wait_until_idle_();
1594
+
1595
+ // COMMAND PANEL SETTING
1596
+ this->command(0x00);
1597
+ this->data(0x0F);
1598
+ this->data(0x89);
1599
+
1600
+ // COMMAND RESOLUTION SETTING
1601
+ this->command(0x61);
1602
+ this->data(0x80);
1603
+ this->data(0x01);
1604
+ this->data(0x28);
1605
+
1606
+ // COMMAND VCOM AND DATA INTERVAL SETTING
1607
+ this->command(0x50);
1608
+ this->data(0x77);
1609
+ }
1610
+ void HOT WaveshareEPaper2P9InBV3::display() {
1611
+ // COMMAND DATA START TRANSMISSION 1 (B/W data)
1612
+ this->command(0x10);
1613
+ delay(2);
1614
+ this->start_data_();
1615
+ this->write_array(this->buffer_, this->get_buffer_length_());
1616
+ this->end_data_();
1617
+ this->command(0x92);
1618
+ delay(2);
1619
+
1620
+ // COMMAND DATA START TRANSMISSION 2 (RED data)
1621
+ this->command(0x13);
1622
+ delay(2);
1623
+ this->start_data_();
1624
+ for (size_t i = 0; i < this->get_buffer_length_(); i++)
1625
+ this->write_byte(0xFF);
1626
+ this->end_data_();
1627
+ this->command(0x92);
1628
+ delay(2);
1629
+
1630
+ // COMMAND DISPLAY REFRESH
1631
+ this->command(0x12);
1632
+ delay(2);
1633
+ this->wait_until_idle_();
1634
+
1635
+ // COMMAND POWER OFF
1636
+ // NOTE: power off < deep sleep
1637
+ this->command(0x02);
1638
+ }
1639
+ int WaveshareEPaper2P9InBV3::get_width_internal() { return 128; }
1640
+ int WaveshareEPaper2P9InBV3::get_height_internal() { return 296; }
1641
+ void WaveshareEPaper2P9InBV3::dump_config() {
1642
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
1643
+ ESP_LOGCONFIG(TAG, " Model: 2.9in (B) V3");
1644
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
1645
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
1646
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
1647
+ LOG_UPDATE_INTERVAL(this);
1648
+ }
1649
+
1650
+ // ========================================================
1651
+ // 2.90in v2 rev2
1652
+ // based on SDK and examples in ZIP file from:
1653
+ // https://www.waveshare.com/pico-epaper-2.9.htm
1654
+ // ========================================================
1655
+
1656
+ void WaveshareEPaper2P9InV2R2::initialize() {
1657
+ this->reset_();
1658
+ this->wait_until_idle_();
1659
+
1660
+ this->command(0x12); // SWRESET
1661
+ this->wait_until_idle_();
1662
+
1663
+ this->command(0x01);
1664
+ this->data(0x27);
1665
+ this->data(0x01);
1666
+ this->data(0x00);
1667
+
1668
+ this->command(0x11);
1669
+ this->data(0x03);
1670
+
1671
+ // SetWindows(0, 0, w, h)
1672
+ this->command(0x44);
1673
+ this->data(0x00);
1674
+ this->data(((this->get_width_controller() - 1) >> 3) & 0xFF);
1675
+
1676
+ this->command(0x45);
1677
+ this->data(0x00);
1678
+ this->data(0x00);
1679
+ this->data((this->get_height_internal() - 1) & 0xFF);
1680
+ this->data(((this->get_height_internal() - 1) >> 8) & 0xFF);
1681
+
1682
+ this->command(0x21);
1683
+ this->data(0x00);
1684
+ this->data(0x80);
1685
+
1686
+ // SetCursor(0, 0)
1687
+ this->command(0x4E);
1688
+ this->data(0x00);
1689
+ this->command(0x4f);
1690
+ this->data(0x00);
1691
+ this->data(0x00);
1692
+
1693
+ this->wait_until_idle_();
1694
+ }
1695
+
1696
+ WaveshareEPaper2P9InV2R2::WaveshareEPaper2P9InV2R2() { this->reset_duration_ = 10; }
1697
+
1698
+ void WaveshareEPaper2P9InV2R2::reset_() {
1699
+ if (this->reset_pin_ != nullptr) {
1700
+ this->reset_pin_->digital_write(false);
1701
+ delay(reset_duration_); // NOLINT
1702
+ this->reset_pin_->digital_write(true);
1703
+ delay(reset_duration_); // NOLINT
1704
+ }
1705
+ }
1706
+
1707
+ void WaveshareEPaper2P9InV2R2::display() {
1708
+ if (!this->wait_until_idle_()) {
1709
+ this->status_set_warning();
1710
+ ESP_LOGE(TAG, "fail idle 1");
1711
+ return;
1712
+ }
1713
+
1714
+ if (this->full_update_every_ == 1) {
1715
+ // do single full update
1716
+ this->command(0x24);
1717
+ this->start_data_();
1718
+ this->write_array(this->buffer_, this->get_buffer_length_());
1719
+ this->end_data_();
1720
+
1721
+ // TurnOnDisplay
1722
+ this->command(0x22);
1723
+ this->data(0xF7);
1724
+ this->command(0x20);
1725
+ return;
1726
+ }
1727
+
1728
+ // if (this->full_update_every_ == 1 ||
1729
+ if (this->at_update_ == 0) {
1730
+ // do base update
1731
+ this->command(0x24);
1732
+ this->start_data_();
1733
+ this->write_array(this->buffer_, this->get_buffer_length_());
1734
+ this->end_data_();
1735
+
1736
+ this->command(0x26);
1737
+ this->start_data_();
1738
+ this->write_array(this->buffer_, this->get_buffer_length_());
1739
+ this->end_data_();
1740
+
1741
+ // TurnOnDisplay
1742
+ this->command(0x22);
1743
+ this->data(0xF7);
1744
+ this->command(0x20);
1745
+ } else {
1746
+ // do partial update
1747
+ this->reset_();
1748
+
1749
+ this->write_lut_(PARTIAL_UPD_2IN9_LUT, PARTIAL_UPD_2IN9_LUT_SIZE);
1750
+
1751
+ this->command(0x37);
1752
+ this->data(0x00);
1753
+ this->data(0x00);
1754
+ this->data(0x00);
1755
+ this->data(0x00);
1756
+ this->data(0x00);
1757
+ this->data(0x40);
1758
+ this->data(0x00);
1759
+ this->data(0x00);
1760
+ this->data(0x00);
1761
+ this->data(0x00);
1762
+
1763
+ this->command(0x3C);
1764
+ this->data(0x80);
1765
+
1766
+ this->command(0x22);
1767
+ this->data(0xC0);
1768
+ this->command(0x20);
1769
+
1770
+ if (!this->wait_until_idle_()) {
1771
+ ESP_LOGE(TAG, "fail idle 2");
1772
+ }
1773
+
1774
+ // SetWindows(0, 0, w, h)
1775
+ this->command(0x44);
1776
+ this->data(0x00);
1777
+ this->data(((this->get_width_controller() - 1) >> 3) & 0xFF);
1778
+
1779
+ this->command(0x45);
1780
+ this->data(0x00);
1781
+ this->data(0x00);
1782
+ this->data((this->get_height_internal() - 1) & 0xFF);
1783
+ this->data(((this->get_height_internal() - 1) >> 8) & 0xFF);
1784
+
1785
+ // SetCursor(0, 0)
1786
+ this->command(0x4E);
1787
+ this->data(0x00);
1788
+ this->command(0x4f);
1789
+ this->data(0x00);
1790
+ this->data(0x00);
1791
+
1792
+ // write b/w
1793
+ this->command(0x24);
1794
+ this->start_data_();
1795
+ this->write_array(this->buffer_, this->get_buffer_length_());
1796
+ this->end_data_();
1797
+
1798
+ // TurnOnDisplayPartial
1799
+ this->command(0x22);
1800
+ this->data(0x0F);
1801
+ this->command(0x20);
1802
+ }
1803
+
1804
+ this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
1805
+ }
1806
+
1807
+ void WaveshareEPaper2P9InV2R2::write_lut_(const uint8_t *lut, const uint8_t size) {
1808
+ // COMMAND WRITE LUT REGISTER
1809
+ this->command(0x32);
1810
+ for (uint8_t i = 0; i < size; i++)
1811
+ this->data(lut[i]);
1812
+ }
1813
+
1814
+ void WaveshareEPaper2P9InV2R2::dump_config() {
1815
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
1816
+ ESP_LOGCONFIG(TAG, " Model: 2.9inV2R2");
1817
+ ESP_LOGCONFIG(TAG, " Full Update Every: %" PRIu32, this->full_update_every_);
1818
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
1819
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
1820
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
1821
+ LOG_UPDATE_INTERVAL(this);
1822
+ }
1823
+
1824
+ void WaveshareEPaper2P9InV2R2::deep_sleep() {
1825
+ this->command(0x10);
1826
+ this->data(0x01);
1827
+ }
1828
+
1829
+ int WaveshareEPaper2P9InV2R2::get_width_internal() { return 128; }
1830
+ int WaveshareEPaper2P9InV2R2::get_height_internal() { return 296; }
1831
+ int WaveshareEPaper2P9InV2R2::get_width_controller() { return this->get_width_internal(); }
1832
+ void WaveshareEPaper2P9InV2R2::set_full_update_every(uint32_t full_update_every) {
1833
+ this->full_update_every_ = full_update_every;
1834
+ }
1835
+ // ========================================================
1836
+ // Good Display 2.9in black/white
1837
+ // Datasheet:
1838
+ // - https://files.seeedstudio.com/wiki/Other_Display/29-epaper/GDEY029T94.pdf
1839
+ // -
1840
+ // https://github.com/Allen-Kuang/e-ink_Demo/blob/main/2.9%20inch%20E-paper%20-%20monocolor%20128x296/example/Display_EPD_W21.cpp
1841
+ // ========================================================
1842
+
1843
+ void GDEY029T94::initialize() {
1844
+ // EPD hardware init start
1845
+ this->reset_();
1846
+
1847
+ this->wait_until_idle_();
1848
+ this->command(0x12); // SWRESET
1849
+ this->wait_until_idle_();
1850
+
1851
+ this->command(0x01); // Driver output control
1852
+ this->data((this->get_height_internal() - 1) % 256);
1853
+ this->data((this->get_height_internal() - 1) / 256);
1854
+ this->data(0x00);
1855
+
1856
+ this->command(0x11); // data entry mode
1857
+ this->data(0x03);
1858
+
1859
+ this->command(0x44); // set Ram-X address start/end position
1860
+ this->data(0x00);
1861
+ this->data(this->get_width_internal() / 8 - 1);
1862
+
1863
+ this->command(0x45); // set Ram-Y address start/end position
1864
+ this->data(0x00);
1865
+ this->data(0x00);
1866
+ this->data((this->get_height_internal() - 1) % 256);
1867
+ this->data((this->get_height_internal() - 1) / 256);
1868
+
1869
+ this->command(0x3C); // BorderWavefrom
1870
+ this->data(0x05);
1871
+
1872
+ this->command(0x21); // Display update control
1873
+ this->data(0x00);
1874
+ this->data(0x80);
1875
+
1876
+ this->command(0x18); // Read built-in temperature sensor
1877
+ this->data(0x80);
1878
+
1879
+ this->command(0x4E); // set RAM x address count to 0;
1880
+ this->data(0x00);
1881
+ this->command(0x4F); // set RAM y address count to 0x199;
1882
+ this->command(0x00);
1883
+ this->command(0x00);
1884
+ this->wait_until_idle_();
1885
+ }
1886
+ void HOT GDEY029T94::display() {
1887
+ this->command(0x24); // write RAM for black(0)/white (1)
1888
+ this->start_data_();
1889
+ for (uint32_t i = 0; i < this->get_buffer_length_(); i++) {
1890
+ this->write_byte(this->buffer_[i]);
1891
+ }
1892
+ this->end_data_();
1893
+ this->command(0x22); // Display Update Control
1894
+ this->data(0xF7);
1895
+ this->command(0x20); // Activate Display Update Sequence
1896
+ this->wait_until_idle_();
1897
+ }
1898
+ int GDEY029T94::get_width_internal() { return 128; }
1899
+ int GDEY029T94::get_height_internal() { return 296; }
1900
+ void GDEY029T94::dump_config() {
1901
+ LOG_DISPLAY("", "E-Paper (Good Display)", this);
1902
+ ESP_LOGCONFIG(TAG, " Model: 2.9in GDEY029T94");
1903
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
1904
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
1905
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
1906
+ LOG_UPDATE_INTERVAL(this);
1907
+ }
1908
+
1909
+ // ========================================================
1910
+ // Good Display 2.9in black/white
1911
+ // Datasheet:
1912
+ // - https://v4.cecdn.yun300.cn/100001_1909185148/SSD1680.pdf
1913
+ // - https://github.com/adafruit/Adafruit_EPD/blob/master/src/panels/ThinkInk_290_Grayscale4_T5.h
1914
+ // - https://github.com/ZinggJM/GxEPD2/blob/master/src/epd/GxEPD2_290_T5.cpp
1915
+ // - http://www.e-paper-display.com/GDEW029T5%20V3.1%20Specification5c22.pdf?
1916
+ // ========================================================
1917
+
1918
+ // full screen update LUT
1919
+ static const uint8_t LUT_20_VCOMDC_29_5[] = {
1920
+ 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x60, 0x28, 0x28, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00,
1921
+ 0x00, 0x00, 0x01, 0x00, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1922
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1923
+ };
1924
+
1925
+ static const uint8_t LUT_21_WW_29_5[] = {
1926
+ 0x40, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x40, 0x14,
1927
+ 0x00, 0x00, 0x00, 0x01, 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1928
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1929
+ };
1930
+
1931
+ static const uint8_t LUT_22_BW_29_5[] = {
1932
+ 0x40, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x40, 0x14,
1933
+ 0x00, 0x00, 0x00, 0x01, 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1934
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1935
+ };
1936
+
1937
+ static const uint8_t LUT_23_WB_29_5[] = {
1938
+ 0x80, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x80, 0x14,
1939
+ 0x00, 0x00, 0x00, 0x01, 0x50, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1940
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1941
+ };
1942
+
1943
+ static const uint8_t LUT_24_BB_29_5[] = {
1944
+ 0x80, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x80, 0x14,
1945
+ 0x00, 0x00, 0x00, 0x01, 0x50, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1946
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1947
+ };
1948
+
1949
+ // partial screen update LUT
1950
+ static const uint8_t LUT_20_VCOMDC_PARTIAL_29_5[] = {
1951
+ 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1952
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1953
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1954
+ };
1955
+
1956
+ static const uint8_t LUT_21_WW_PARTIAL_29_5[] = {
1957
+ 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1958
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1959
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1960
+ };
1961
+
1962
+ static const uint8_t LUT_22_BW_PARTIAL_29_5[] = {
1963
+ 0x80, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1964
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1965
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1966
+ };
1967
+
1968
+ static const uint8_t LUT_23_WB_PARTIAL_29_5[] = {
1969
+ 0x40, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1970
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1971
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1972
+ };
1973
+
1974
+ static const uint8_t LUT_24_BB_PARTIAL_29_5[] = {
1975
+ 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1976
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1977
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1978
+ };
1979
+
1980
+ void GDEW029T5::power_on_() {
1981
+ if (!this->power_is_on_) {
1982
+ this->command(0x04);
1983
+ this->wait_until_idle_();
1984
+ }
1985
+ this->power_is_on_ = true;
1986
+ }
1987
+
1988
+ void GDEW029T5::power_off_() {
1989
+ this->command(0x02);
1990
+ this->wait_until_idle_();
1991
+ this->power_is_on_ = false;
1992
+ }
1993
+
1994
+ void GDEW029T5::deep_sleep() {
1995
+ this->power_off_();
1996
+ if (this->deep_sleep_between_updates_) {
1997
+ this->command(0x07); // deep sleep
1998
+ this->data(0xA5); // check code
1999
+ ESP_LOGD(TAG, "go to deep sleep");
2000
+ this->is_deep_sleep_ = true;
2001
+ }
2002
+ }
2003
+
2004
+ void GDEW029T5::init_display_() {
2005
+ // from https://github.com/ZinggJM/GxEPD2/blob/master/src/epd/GxEPD2_290_T5.cpp
2006
+
2007
+ // Hardware Initialization
2008
+ if (this->deep_sleep_between_updates_ && this->is_deep_sleep_) {
2009
+ ESP_LOGI(TAG, "wake up from deep sleep");
2010
+ this->reset_();
2011
+ this->is_deep_sleep_ = false;
2012
+ }
2013
+
2014
+ // COMMAND POWER SETTINGS
2015
+ this->command(0x01);
2016
+ this->data(0x03);
2017
+ this->data(0x00);
2018
+ this->data(0x2b);
2019
+ this->data(0x2b);
2020
+ this->data(0x03); /* for b/w */
2021
+
2022
+ // COMMAND BOOSTER SOFT START
2023
+ this->command(0x06);
2024
+ this->data(0x17);
2025
+ this->data(0x17);
2026
+ this->data(0x17);
2027
+
2028
+ this->power_on_();
2029
+
2030
+ // COMMAND PANEL SETTING
2031
+ this->command(0x00);
2032
+ // 128x296 resolution: 10
2033
+ // LUT from register: 1
2034
+ // B/W mode (doesn't work): 1
2035
+ // scan-up: 1
2036
+ // shift-right: 1
2037
+ // booster ON: 1
2038
+ // no soft reset: 1
2039
+ this->data(0b10111111);
2040
+ this->data(0x0d); // VCOM to 0V fast
2041
+ this->command(0x30); // PLL setting
2042
+ this->data(0x3a); // 3a 100HZ 29 150Hz 39 200HZ 31 171HZ
2043
+ this->command(0x61); // resolution setting
2044
+ this->data(this->get_width_internal());
2045
+ this->data(this->get_height_internal() >> 8);
2046
+ this->data(this->get_height_internal() & 0xFF);
2047
+
2048
+ ESP_LOGD(TAG, "panel setting done");
2049
+ }
2050
+
2051
+ void GDEW029T5::initialize() {
2052
+ // from https://www.waveshare.com/w/upload/b/bb/2.9inch-e-paper-b-specification.pdf, page 37
2053
+ if (this->reset_pin_ != nullptr)
2054
+ this->deep_sleep_between_updates_ = true;
2055
+
2056
+ // old buffer for partial update
2057
+ RAMAllocator<uint8_t> allocator;
2058
+ this->old_buffer_ = allocator.allocate(this->get_buffer_length_());
2059
+ if (this->old_buffer_ == nullptr) {
2060
+ ESP_LOGE(TAG, "Could not allocate old buffer for display!");
2061
+ return;
2062
+ }
2063
+ for (size_t i = 0; i < this->get_buffer_length_(); i++) {
2064
+ this->old_buffer_[i] = 0xFF;
2065
+ }
2066
+ }
2067
+
2068
+ // initialize for full(normal) update
2069
+ void GDEW029T5::init_full_() {
2070
+ this->init_display_();
2071
+ this->command(0x82); // vcom_DC setting
2072
+ this->data(0x08);
2073
+ this->command(0x50); // VCOM AND DATA INTERVAL SETTING
2074
+ this->data(0x97); // WBmode:VBDF 17|D7 VBDW 97 VBDB 57 WBRmode:VBDF F7 VBDW 77 VBDB 37 VBDR B7
2075
+ this->command(0x20);
2076
+ this->write_lut_(LUT_20_VCOMDC_29_5, sizeof(LUT_20_VCOMDC_29_5));
2077
+ this->command(0x21);
2078
+ this->write_lut_(LUT_21_WW_29_5, sizeof(LUT_21_WW_29_5));
2079
+ this->command(0x22);
2080
+ this->write_lut_(LUT_22_BW_29_5, sizeof(LUT_22_BW_29_5));
2081
+ this->command(0x23);
2082
+ this->write_lut_(LUT_23_WB_29_5, sizeof(LUT_23_WB_29_5));
2083
+ this->command(0x24);
2084
+ this->write_lut_(LUT_24_BB_29_5, sizeof(LUT_24_BB_29_5));
2085
+ ESP_LOGD(TAG, "initialized full update");
2086
+ }
2087
+
2088
+ // initialzie for partial update
2089
+ void GDEW029T5::init_partial_() {
2090
+ this->init_display_();
2091
+ this->command(0x82); // vcom_DC setting
2092
+ this->data(0x08);
2093
+ this->command(0x50); // VCOM AND DATA INTERVAL SETTING
2094
+ this->data(0x17); // WBmode:VBDF 17|D7 VBDW 97 VBDB 57 WBRmode:VBDF F7 VBDW 77 VBDB 37 VBDR B7
2095
+ this->command(0x20);
2096
+ this->write_lut_(LUT_20_VCOMDC_PARTIAL_29_5, sizeof(LUT_20_VCOMDC_PARTIAL_29_5));
2097
+ this->command(0x21);
2098
+ this->write_lut_(LUT_21_WW_PARTIAL_29_5, sizeof(LUT_21_WW_PARTIAL_29_5));
2099
+ this->command(0x22);
2100
+ this->write_lut_(LUT_22_BW_PARTIAL_29_5, sizeof(LUT_22_BW_PARTIAL_29_5));
2101
+ this->command(0x23);
2102
+ this->write_lut_(LUT_23_WB_PARTIAL_29_5, sizeof(LUT_23_WB_PARTIAL_29_5));
2103
+ this->command(0x24);
2104
+ this->write_lut_(LUT_24_BB_PARTIAL_29_5, sizeof(LUT_24_BB_PARTIAL_29_5));
2105
+ ESP_LOGD(TAG, "initialized partial update");
2106
+ }
2107
+
2108
+ void HOT GDEW029T5::display() {
2109
+ bool full_update = this->at_update_ == 0;
2110
+ if (full_update) {
2111
+ this->init_full_();
2112
+ } else {
2113
+ this->init_partial_();
2114
+ this->command(0x91); // partial in
2115
+ // set partial window
2116
+ this->command(0x90);
2117
+ // this->data(0);
2118
+ this->data(0);
2119
+ // this->data(0);
2120
+ this->data((this->get_width_internal() - 1) % 256);
2121
+ this->data(0);
2122
+ this->data(0);
2123
+ this->data(((this->get_height_internal() - 1)) / 256);
2124
+ this->data(((this->get_height_internal() - 1)) % 256);
2125
+ this->data(0x01);
2126
+ }
2127
+ // input old buffer data
2128
+ this->command(0x10);
2129
+ delay(2);
2130
+ this->start_data_();
2131
+ for (size_t i = 0; i < this->get_buffer_length_(); i++) {
2132
+ this->write_byte(this->old_buffer_[i]);
2133
+ }
2134
+ this->end_data_();
2135
+ delay(2);
2136
+
2137
+ // COMMAND DATA START TRANSMISSION 2 (B/W only)
2138
+ this->command(0x13);
2139
+ delay(2);
2140
+ this->start_data_();
2141
+ for (size_t i = 0; i < this->get_buffer_length_(); i++) {
2142
+ this->write_byte(this->buffer_[i]);
2143
+ this->old_buffer_[i] = this->buffer_[i];
2144
+ }
2145
+ this->end_data_();
2146
+ delay(2);
2147
+
2148
+ // COMMAND DISPLAY REFRESH
2149
+ this->command(0x12);
2150
+ delay(2);
2151
+ this->wait_until_idle_();
2152
+
2153
+ if (full_update) {
2154
+ ESP_LOGD(TAG, "full update done");
2155
+ } else {
2156
+ this->command(0x92); // partial out
2157
+ ESP_LOGD(TAG, "partial update done");
2158
+ }
2159
+
2160
+ this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
2161
+ // COMMAND deep sleep
2162
+ this->deep_sleep();
2163
+ }
2164
+
2165
+ void GDEW029T5::write_lut_(const uint8_t *lut, const uint8_t size) {
2166
+ // COMMAND WRITE LUT REGISTER
2167
+ this->start_data_();
2168
+ for (uint8_t i = 0; i < size; i++)
2169
+ this->write_byte(lut[i]);
2170
+ this->end_data_();
2171
+ }
2172
+
2173
+ void GDEW029T5::set_full_update_every(uint32_t full_update_every) { this->full_update_every_ = full_update_every; }
2174
+
2175
+ int GDEW029T5::get_width_internal() { return 128; }
2176
+ int GDEW029T5::get_height_internal() { return 296; }
2177
+ void GDEW029T5::dump_config() {
2178
+ LOG_DISPLAY("", "Waveshare E-Paper (Good Display)", this);
2179
+ ESP_LOGCONFIG(TAG, " Model: 2.9in Greyscale GDEW029T5");
2180
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
2181
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
2182
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
2183
+ ESP_LOGCONFIG(TAG, " Full Update Every: %" PRIu32, this->full_update_every_);
2184
+ LOG_UPDATE_INTERVAL(this);
2185
+ }
2186
+
2187
+ // ========================================================
2188
+ // Good Display 1.54in black/white/grey GDEW0154M09
2189
+ // As used in M5Stack Core Ink
2190
+ // Datasheet:
2191
+ // - https://v4.cecdn.yun300.cn/100001_1909185148/GDEW0154M09-200709.pdf
2192
+ // - https://github.com/m5stack/M5Core-Ink
2193
+ // Reference code from GoodDisplay:
2194
+ // - https://github.com/GoodDisplay/E-paper-Display-Library-of-GoodDisplay/
2195
+ // -> /Monochrome_E-paper-Display/1.54inch_JD79653_GDEW0154M09_200x200/ESP32-Arduino%20IDE/GDEW0154M09_Arduino.ino
2196
+ // M5Stack Core Ink spec:
2197
+ // - https://docs.m5stack.com/en/core/coreink
2198
+ // ========================================================
2199
+
2200
+ void GDEW0154M09::initialize() {
2201
+ this->init_internal_();
2202
+ RAMAllocator<uint8_t> allocator;
2203
+ this->lastbuff_ = allocator.allocate(this->get_buffer_length_());
2204
+ if (this->lastbuff_ != nullptr) {
2205
+ memset(this->lastbuff_, 0xff, sizeof(uint8_t) * this->get_buffer_length_());
2206
+ }
2207
+ this->clear_();
2208
+ }
2209
+
2210
+ void GDEW0154M09::reset_() {
2211
+ // RST is inverse from other einks in this project
2212
+ if (this->reset_pin_ != nullptr) {
2213
+ this->reset_pin_->digital_write(false);
2214
+ delay(10);
2215
+ this->reset_pin_->digital_write(true);
2216
+ delay(10);
2217
+ }
2218
+ }
2219
+
2220
+ void GDEW0154M09::init_internal_() {
2221
+ this->reset_();
2222
+
2223
+ // clang-format off
2224
+ // 200x200 resolution: 11
2225
+ // LUT from OTP: 0
2226
+ // B/W mode (doesn't work): 1
2227
+ // scan-up: 1
2228
+ // shift-right: 1
2229
+ // booster ON: 1
2230
+ // no soft reset: 1
2231
+ const uint8_t panel_setting_1 = 0b11011111;
2232
+
2233
+ // VCOM status off 0
2234
+ // Temp sensing default 1
2235
+ // VGL Power Off Floating 1
2236
+ // NORG expect refresh 1
2237
+ // VCOM Off on displ off 0
2238
+ const uint8_t panel_setting_2 = 0b01110;
2239
+
2240
+ const uint8_t wf_t0154_cz_b3_list[] = {
2241
+ 11, // 11 commands in list
2242
+ CMD_PSR_PANEL_SETTING, 2, panel_setting_1, panel_setting_2,
2243
+ CMD_UNDOCUMENTED_0x4D, 1, 0x55,
2244
+ CMD_UNDOCUMENTED_0xAA, 1, 0x0f,
2245
+ CMD_UNDOCUMENTED_0xE9, 1, 0x02,
2246
+ CMD_UNDOCUMENTED_0xB6, 1, 0x11,
2247
+ CMD_UNDOCUMENTED_0xF3, 1, 0x0a,
2248
+ CMD_TRES_RESOLUTION_SETTING, 3, 0xc8, 0x00, 0xc8,
2249
+ CMD_TCON_TCONSETTING, 1, 0x00,
2250
+ CMD_CDI_VCOM_DATA_INTERVAL, 1, 0xd7,
2251
+ CMD_PWS_POWER_SAVING, 1, 0x00,
2252
+ CMD_PON_POWER_ON, 0
2253
+ };
2254
+ // clang-format on
2255
+
2256
+ this->write_init_list_(wf_t0154_cz_b3_list);
2257
+ delay(100); // NOLINT
2258
+ this->wait_until_idle_();
2259
+ }
2260
+
2261
+ void GDEW0154M09::write_init_list_(const uint8_t *list) {
2262
+ uint8_t list_limit = list[0];
2263
+ uint8_t *start_ptr = ((uint8_t *) list + 1);
2264
+ for (uint8_t i = 0; i < list_limit; i++) {
2265
+ this->command(*(start_ptr + 0));
2266
+ for (uint8_t dnum = 0; dnum < *(start_ptr + 1); dnum++) {
2267
+ this->data(*(start_ptr + 2 + dnum));
2268
+ }
2269
+ start_ptr += (*(start_ptr + 1) + 2);
2270
+ }
2271
+ }
2272
+
2273
+ void GDEW0154M09::clear_() {
2274
+ uint32_t pixsize = this->get_buffer_length_();
2275
+ for (uint8_t j = 0; j < 2; j++) {
2276
+ this->command(CMD_DTM1_DATA_START_TRANS);
2277
+ for (uint32_t count = 0; count < pixsize; count++) {
2278
+ this->data(0x00);
2279
+ }
2280
+ this->command(CMD_DTM2_DATA_START_TRANS2);
2281
+ for (uint32_t count = 0; count < pixsize; count++) {
2282
+ this->data(0xff);
2283
+ }
2284
+ this->command(CMD_DISPLAY_REFRESH);
2285
+ delay(10);
2286
+ this->wait_until_idle_();
2287
+ }
2288
+ }
2289
+
2290
+ void HOT GDEW0154M09::display() {
2291
+ this->init_internal_();
2292
+ // "Mode 0 display" for now
2293
+ this->command(CMD_DTM1_DATA_START_TRANS);
2294
+ for (uint32_t i = 0; i < this->get_buffer_length_(); i++) {
2295
+ this->data(0xff);
2296
+ }
2297
+ this->command(CMD_DTM2_DATA_START_TRANS2); // write 'new' data to SRAM
2298
+ for (uint32_t i = 0; i < this->get_buffer_length_(); i++) {
2299
+ this->data(this->buffer_[i]);
2300
+ }
2301
+ this->command(CMD_DISPLAY_REFRESH);
2302
+ delay(10);
2303
+ this->wait_until_idle_();
2304
+ this->deep_sleep();
2305
+ }
2306
+
2307
+ void GDEW0154M09::deep_sleep() {
2308
+ // COMMAND DEEP SLEEP
2309
+ this->command(CMD_POF_POWER_OFF);
2310
+ this->wait_until_idle_();
2311
+ delay(1000); // NOLINT
2312
+ this->command(CMD_DSLP_DEEP_SLEEP);
2313
+ this->data(DATA_DSLP_DEEP_SLEEP);
2314
+ }
2315
+
2316
+ int GDEW0154M09::get_width_internal() { return 200; }
2317
+ int GDEW0154M09::get_height_internal() { return 200; }
2318
+ void GDEW0154M09::dump_config() {
2319
+ LOG_DISPLAY("", "M5Stack CoreInk E-Paper (Good Display)", this);
2320
+ ESP_LOGCONFIG(TAG, " Model: 1.54in Greyscale GDEW0154M09");
2321
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
2322
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
2323
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
2324
+ LOG_UPDATE_INTERVAL(this);
2325
+ }
2326
+
2327
+ // ========================================================
2328
+ // Good Display 4.2in black/white GDEY042T81 (SSD1683)
2329
+ // Product page:
2330
+ // - https://www.good-display.com/product/386.html
2331
+ // Datasheet:
2332
+ // - https://v4.cecdn.yun300.cn/100001_1909185148/GDEY042T81.pdf
2333
+ // - https://v4.cecdn.yun300.cn/100001_1909185148/SSD1683.PDF
2334
+ // Reference code from GoodDisplay:
2335
+ // - https://www.good-display.com/companyfile/1572.html (2024-08-01 15:40:41)
2336
+ // Other reference code:
2337
+ // - https://github.com/ZinggJM/GxEPD2/blob/03d8e7a533c1493f762e392ead12f1bcb7fab8f9/src/gdey/GxEPD2_420_GDEY042T81.cpp
2338
+ // ========================================================
2339
+
2340
+ void GDEY042T81::initialize() {
2341
+ this->init_display_();
2342
+ ESP_LOGD(TAG, "Initialization complete, set the display to deep sleep");
2343
+ this->deep_sleep();
2344
+ }
2345
+
2346
+ // conflicting documentation / examples regarding reset timings
2347
+ // https://v4.cecdn.yun300.cn/100001_1909185148/SSD1683.PDF -> 10ms
2348
+ // GD sample code (Display_EPD_W21.cpp, see above) -> 10 ms
2349
+ // https://v4.cecdn.yun300.cn/100001_1909185148/GDEY042T81.pdf (section 14.2) -> 0.2ms (200us)
2350
+ // https://github.com/ZinggJM/GxEPD2/blob/03d8e7a533c1493f762e392ead12f1bcb7fab8f9/src/gdey/GxEPD2_420_GDEY042T81.cpp#L351
2351
+ // -> 10ms
2352
+ // 10 ms seems to work, so we use this
2353
+ GDEY042T81::GDEY042T81() { this->reset_duration_ = 10; }
2354
+
2355
+ void GDEY042T81::reset_() {
2356
+ if (this->reset_pin_ != nullptr) {
2357
+ this->reset_pin_->digital_write(false);
2358
+ delay(reset_duration_); // NOLINT
2359
+ this->reset_pin_->digital_write(true);
2360
+ delay(reset_duration_); // NOLINT
2361
+ }
2362
+ }
2363
+
2364
+ void GDEY042T81::init_display_() {
2365
+ this->reset_();
2366
+
2367
+ this->wait_until_idle_();
2368
+ this->command(0x12); // SWRESET
2369
+ this->wait_until_idle_();
2370
+
2371
+ // Specify number of lines for the driver: 300 (MUX 300)
2372
+ // https://v4.cecdn.yun300.cn/100001_1909185148/SSD1683.PDF (section 8.1)
2373
+ // https://github.com/ZinggJM/GxEPD2/blob/03d8e7a533c1493f762e392ead12f1bcb7fab8f9/src/gdey/GxEPD2_420_GDEY042T81.cpp#L354
2374
+ this->command(0x01); // driver output control
2375
+ this->data(0x2B); // (height - 1) % 256
2376
+ this->data(0x01); // (height - 1) / 256
2377
+ this->data(0x00);
2378
+
2379
+ // https://github.com/ZinggJM/GxEPD2/blob/03d8e7a533c1493f762e392ead12f1bcb7fab8f9/src/gdey/GxEPD2_420_GDEY042T81.cpp#L360
2380
+ this->command(0x3C); // BorderWaveform
2381
+ this->data(0x01);
2382
+ this->command(0x18); // Read built-in temperature sensor
2383
+ this->data(0x80);
2384
+
2385
+ // GD sample code (Display_EPD_W21.cpp@90ff)
2386
+ this->command(0x11); // data entry mode
2387
+ this->data(0x03);
2388
+ // set windows (0,0,400,300)
2389
+ this->command(0x44); // set Ram-X address start/end position
2390
+ this->data(0);
2391
+ this->data(0x31); // (width / 8 -1)
2392
+
2393
+ this->command(0x45); // set Ram-y address start/end position
2394
+ this->data(0);
2395
+ this->data(0);
2396
+ this->data(0x2B); // (height - 1) % 256
2397
+ this->data(0x01); // (height - 1) / 256
2398
+
2399
+ // set cursor (0,0)
2400
+ this->command(0x4E); // set RAM x address count to 0;
2401
+ this->data(0);
2402
+ this->command(0x4F); // set RAM y address count to 0;
2403
+ this->data(0);
2404
+ this->data(0);
2405
+
2406
+ this->wait_until_idle_();
2407
+ }
2408
+
2409
+ // https://github.com/ZinggJM/GxEPD2/blob/03d8e7a533c1493f762e392ead12f1bcb7fab8f9/src/gdey/GxEPD2_420_GDEY042T81.cpp#L366
2410
+ void GDEY042T81::update_full_() {
2411
+ this->command(0x21); // display update control
2412
+ this->data(0x40); // bypass RED as 0
2413
+ this->data(0x00); // single chip application
2414
+
2415
+ // only ever do a fast update because slow updates are only relevant
2416
+ // for lower operating temperatures
2417
+ // see
2418
+ // https://github.com/ZinggJM/GxEPD2/blob/03d8e7a533c1493f762e392ead12f1bcb7fab8f9/src/gdey/GxEPD2_290_GDEY029T94.h#L30
2419
+ //
2420
+ // Should slow/fast updates be made configurable similar to how GxEPD2 does it? No idea if anyone would need it...
2421
+ this->command(0x1A); // Write to temperature register
2422
+ this->data(0x6E);
2423
+ this->command(0x22);
2424
+ this->data(0xd7);
2425
+
2426
+ this->command(0x20);
2427
+ this->wait_until_idle_();
2428
+ }
2429
+
2430
+ // https://github.com/ZinggJM/GxEPD2/blob/03d8e7a533c1493f762e392ead12f1bcb7fab8f9/src/gdey/GxEPD2_420_GDEY042T81.cpp#L389
2431
+ void GDEY042T81::update_part_() {
2432
+ this->command(0x21); // display update control
2433
+ this->data(0x00); // RED normal
2434
+ this->data(0x00); // single chip application
2435
+
2436
+ this->command(0x22);
2437
+ this->data(0xfc);
2438
+
2439
+ this->command(0x20);
2440
+ this->wait_until_idle_();
2441
+ }
2442
+
2443
+ void HOT GDEY042T81::display() {
2444
+ ESP_LOGD(TAG, "Wake up the display");
2445
+ this->init_display_();
2446
+
2447
+ if (!this->wait_until_idle_()) {
2448
+ this->status_set_warning();
2449
+ ESP_LOGE(TAG, "Failed to perform update, display is busy");
2450
+ return;
2451
+ }
2452
+
2453
+ // basic code structure copied from WaveshareEPaper2P9InV2R2
2454
+ if (this->full_update_every_ == 1) {
2455
+ ESP_LOGD(TAG, "Full update");
2456
+ // do single full update
2457
+ this->command(0x24);
2458
+ this->start_data_();
2459
+ this->write_array(this->buffer_, this->get_buffer_length_());
2460
+ this->end_data_();
2461
+
2462
+ // TurnOnDisplay
2463
+ this->update_full_();
2464
+ return;
2465
+ }
2466
+
2467
+ // if (this->full_update_every_ == 1 ||
2468
+ if (this->at_update_ == 0) {
2469
+ ESP_LOGD(TAG, "Update");
2470
+ // do base update
2471
+ this->command(0x24);
2472
+ this->start_data_();
2473
+ this->write_array(this->buffer_, this->get_buffer_length_());
2474
+ this->end_data_();
2475
+
2476
+ this->command(0x26);
2477
+ this->start_data_();
2478
+ this->write_array(this->buffer_, this->get_buffer_length_());
2479
+ this->end_data_();
2480
+
2481
+ // TurnOnDisplay;
2482
+ this->update_full_();
2483
+ } else {
2484
+ // do partial update (full screen)
2485
+ // no need to load a LUT for GoodDisplays as they seem to have the LUT onboard
2486
+ // GD example code (Display_EPD_W21.cpp@283ff)
2487
+ //
2488
+ // not setting the BorderWaveform here again (contrary to the GD example) because according to
2489
+ // https://github.com/ZinggJM/GxEPD2/blob/03d8e7a533c1493f762e392ead12f1bcb7fab8f9/src/gdey/GxEPD2_420_GDEY042T81.cpp#L358
2490
+ // it seems to be enough to set it during display initialization
2491
+ ESP_LOGD(TAG, "Partial update");
2492
+ this->reset_();
2493
+ if (!this->wait_until_idle_()) {
2494
+ this->status_set_warning();
2495
+ ESP_LOGE(TAG, "Failed to perform partial update, display is busy");
2496
+ return;
2497
+ }
2498
+
2499
+ this->command(0x24);
2500
+ this->start_data_();
2501
+ this->write_array(this->buffer_, this->get_buffer_length_());
2502
+ this->end_data_();
2503
+
2504
+ // TurnOnDisplay
2505
+ this->update_part_();
2506
+ }
2507
+
2508
+ this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
2509
+ this->wait_until_idle_();
2510
+ ESP_LOGD(TAG, "Set the display back to deep sleep");
2511
+ this->deep_sleep();
2512
+ }
2513
+ void GDEY042T81::set_full_update_every(uint32_t full_update_every) { this->full_update_every_ = full_update_every; }
2514
+ int GDEY042T81::get_width_internal() { return 400; }
2515
+ int GDEY042T81::get_height_internal() { return 300; }
2516
+ uint32_t GDEY042T81::idle_timeout_() { return 5000; }
2517
+ void GDEY042T81::dump_config() {
2518
+ LOG_DISPLAY("", "GoodDisplay E-Paper", this);
2519
+ ESP_LOGCONFIG(TAG, " Model: 4.2in B/W GDEY042T81");
2520
+ ESP_LOGCONFIG(TAG, " Full Update Every: %" PRIu32, this->full_update_every_);
2521
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
2522
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
2523
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
2524
+ LOG_UPDATE_INTERVAL(this);
2525
+ }
2526
+
2527
+ static const uint8_t LUT_VCOM_DC_4_2[] = {
2528
+ 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x17, 0x17, 0x00, 0x00, 0x02, 0x00, 0x0A, 0x01,
2529
+ 0x00, 0x00, 0x01, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2530
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2531
+ };
2532
+ static const uint8_t LUT_WHITE_TO_WHITE_4_2[] = {
2533
+ 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
2534
+ 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2535
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2536
+ };
2537
+ static const uint8_t LUT_BLACK_TO_WHITE_4_2[] = {
2538
+ 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
2539
+ 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2540
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2541
+ };
2542
+
2543
+ static const uint8_t LUT_BLACK_TO_BLACK_4_2[] = {
2544
+ 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
2545
+ 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2546
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2547
+ };
2548
+
2549
+ static const uint8_t LUT_WHITE_TO_BLACK_4_2[] = {
2550
+ 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
2551
+ 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2552
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2553
+ };
2554
+
2555
+ void WaveshareEPaper4P2In::initialize() {
2556
+ // https://www.waveshare.com/w/upload/7/7f/4.2inch-e-paper-b-specification.pdf - page 8
2557
+
2558
+ // COMMAND POWER SETTING
2559
+ this->command(0x01);
2560
+ this->data(0x03); // VDS_EN, VDG_EN
2561
+ this->data(0x00); // VCOM_HV, VGHL_LV[1], VGHL_LV[0]
2562
+ this->data(0x2B); // VDH
2563
+ this->data(0x2B); // VDL
2564
+ this->data(0xFF); // VDHR
2565
+
2566
+ // COMMAND BOOSTER SOFT START
2567
+ this->command(0x06);
2568
+ this->data(0x17); // PHA
2569
+ this->data(0x17); // PHB
2570
+ this->data(0x17); // PHC
2571
+
2572
+ // COMMAND POWER ON
2573
+ this->command(0x04);
2574
+ this->wait_until_idle_();
2575
+ delay(10);
2576
+ // COMMAND PANEL SETTING
2577
+ this->command(0x00);
2578
+ this->data(0xBF); // KW-BF KWR-AF BWROTP 0f
2579
+ this->data(0x0B);
2580
+ // COMMAND PLL CONTROL
2581
+ this->command(0x30);
2582
+ this->data(0x3C); // 3A 100HZ 29 150Hz 39 200HZ 31 171HZ
2583
+
2584
+ delay(2);
2585
+ // COMMAND LUT FOR VCOM
2586
+ this->command(0x20);
2587
+ for (uint8_t i : LUT_VCOM_DC_4_2)
2588
+ this->data(i);
2589
+ // COMMAND LUT WHITE TO WHITE
2590
+ this->command(0x21);
2591
+ for (uint8_t i : LUT_WHITE_TO_WHITE_4_2)
2592
+ this->data(i);
2593
+ // COMMAND LUT BLACK TO WHITE
2594
+ this->command(0x22);
2595
+ for (uint8_t i : LUT_BLACK_TO_WHITE_4_2)
2596
+ this->data(i);
2597
+ // COMMAND LUT WHITE TO BLACK
2598
+ this->command(0x23);
2599
+ for (uint8_t i : LUT_WHITE_TO_BLACK_4_2)
2600
+ this->data(i);
2601
+ // COMMAND LUT BLACK TO BLACK
2602
+ this->command(0x24);
2603
+ for (uint8_t i : LUT_BLACK_TO_BLACK_4_2)
2604
+ this->data(i);
2605
+ }
2606
+ void HOT WaveshareEPaper4P2In::display() {
2607
+ // COMMAND RESOLUTION SETTING
2608
+ this->command(0x61);
2609
+ this->data(0x01);
2610
+ this->data(0x90);
2611
+ this->data(0x01);
2612
+ this->data(0x2C);
2613
+
2614
+ // COMMAND VCM DC SETTING REGISTER
2615
+ this->command(0x82);
2616
+ this->data(0x12);
2617
+
2618
+ // COMMAND VCOM AND DATA INTERVAL SETTING
2619
+ this->command(0x50);
2620
+ this->data(0x97);
2621
+
2622
+ // COMMAND DATA START TRANSMISSION 1
2623
+ this->command(0x10);
2624
+ delay(2);
2625
+ this->start_data_();
2626
+ this->write_array(this->buffer_, this->get_buffer_length_());
2627
+ this->end_data_();
2628
+ delay(2);
2629
+ // COMMAND DATA START TRANSMISSION 2
2630
+ this->command(0x13);
2631
+ delay(2);
2632
+ this->start_data_();
2633
+ this->write_array(this->buffer_, this->get_buffer_length_());
2634
+ this->end_data_();
2635
+ // COMMAND DISPLAY REFRESH
2636
+ this->command(0x12);
2637
+ }
2638
+ int WaveshareEPaper4P2In::get_width_internal() { return 400; }
2639
+ int WaveshareEPaper4P2In::get_height_internal() { return 300; }
2640
+ void WaveshareEPaper4P2In::dump_config() {
2641
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
2642
+ ESP_LOGCONFIG(TAG, " Model: 4.2in");
2643
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
2644
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
2645
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
2646
+ LOG_UPDATE_INTERVAL(this);
2647
+ }
2648
+
2649
+ // ========================================================
2650
+ // 4.20in Type B (LUT from OTP)
2651
+ // Datasheet:
2652
+ // - https://www.waveshare.com/w/upload/2/20/4.2inch-e-paper-module-user-manual-en.pdf
2653
+ // - https://github.com/waveshare/e-Paper/blob/master/RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_4in2b_V2.c
2654
+ // ========================================================
2655
+ void WaveshareEPaper4P2InBV2::initialize() {
2656
+ // these exact timings are required for a proper reset/init
2657
+ this->reset_pin_->digital_write(false);
2658
+ delay(2);
2659
+ this->reset_pin_->digital_write(true);
2660
+ delay(200); // NOLINT
2661
+
2662
+ // COMMAND POWER ON
2663
+ this->command(0x04);
2664
+ this->wait_until_idle_();
2665
+
2666
+ // COMMAND PANEL SETTING
2667
+ this->command(0x00);
2668
+ this->data(0x0f); // LUT from OTP
2669
+ }
2670
+
2671
+ void HOT WaveshareEPaper4P2InBV2::display() {
2672
+ // COMMAND DATA START TRANSMISSION 1 (B/W data)
2673
+ this->command(0x10);
2674
+ this->start_data_();
2675
+ this->write_array(this->buffer_, this->get_buffer_length_());
2676
+ this->end_data_();
2677
+
2678
+ // COMMAND DATA START TRANSMISSION 2 (RED data)
2679
+ this->command(0x13);
2680
+ this->start_data_();
2681
+ for (size_t i = 0; i < this->get_buffer_length_(); i++)
2682
+ this->write_byte(0xFF);
2683
+ this->end_data_();
2684
+ delay(2);
2685
+
2686
+ // COMMAND DISPLAY REFRESH
2687
+ this->command(0x12);
2688
+ this->wait_until_idle_();
2689
+
2690
+ // COMMAND POWER OFF
2691
+ // NOTE: power off < deep sleep
2692
+ this->command(0x02);
2693
+ }
2694
+ int WaveshareEPaper4P2InBV2::get_width_internal() { return 400; }
2695
+ int WaveshareEPaper4P2InBV2::get_height_internal() { return 300; }
2696
+ void WaveshareEPaper4P2InBV2::dump_config() {
2697
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
2698
+ ESP_LOGCONFIG(TAG, " Model: 4.2in (B V2)");
2699
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
2700
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
2701
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
2702
+ LOG_UPDATE_INTERVAL(this);
2703
+ }
2704
+
2705
+ // ========================================================
2706
+ // 4.20in Type B With Red colour support (LUT from OTP)
2707
+ // Datasheet:
2708
+ // - https://www.waveshare.com/w/upload/2/20/4.2inch-e-paper-module-user-manual-en.pdf
2709
+ // - https://github.com/waveshare/e-Paper/blob/master/RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_4in2b_V2.c
2710
+ // The implementation is an adaptation of WaveshareEPaper4P2InBV2 class
2711
+ // ========================================================
2712
+ void WaveshareEPaper4P2InBV2BWR::initialize() {
2713
+ // these exact timings are required for a proper reset/init
2714
+ this->reset_pin_->digital_write(false);
2715
+ delay(2);
2716
+ this->reset_pin_->digital_write(true);
2717
+ delay(200); // NOLINT
2718
+
2719
+ // COMMAND POWER ON
2720
+ this->command(0x04);
2721
+ this->wait_until_idle_();
2722
+
2723
+ // COMMAND PANEL SETTING
2724
+ this->command(0x00);
2725
+ this->data(0x0f); // LUT from OTP
2726
+ }
2727
+
2728
+ void HOT WaveshareEPaper4P2InBV2BWR::display() {
2729
+ const uint32_t buf_len = this->get_buffer_length_() / 2u;
2730
+
2731
+ this->command(0x10); // Send BW data Transmission
2732
+ delay(2); // Delay to prevent Watchdog error
2733
+ for (uint32_t i = 0; i < buf_len; ++i) {
2734
+ this->data(this->buffer_[i]);
2735
+ }
2736
+
2737
+ this->command(0x13); // Send red data Transmission
2738
+ delay(2); // Delay to prevent Watchdog error
2739
+ for (uint32_t i = 0; i < buf_len; ++i) {
2740
+ // Red color need to flip bit from the buffer. Otherwise, red will conqure the screen!
2741
+ this->data(~this->buffer_[buf_len + i]);
2742
+ }
2743
+
2744
+ // COMMAND DISPLAY REFRESH
2745
+ this->command(0x12);
2746
+ this->wait_until_idle_();
2747
+
2748
+ // COMMAND POWER OFF
2749
+ // NOTE: power off < deep sleep
2750
+ this->command(0x02);
2751
+ }
2752
+ int WaveshareEPaper4P2InBV2BWR::get_width_internal() { return 400; }
2753
+ int WaveshareEPaper4P2InBV2BWR::get_height_internal() { return 300; }
2754
+ void WaveshareEPaper4P2InBV2BWR::dump_config() {
2755
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
2756
+ ESP_LOGCONFIG(TAG, " Model: 4.2in (B V2) BWR-Mode");
2757
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
2758
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
2759
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
2760
+ LOG_UPDATE_INTERVAL(this);
2761
+ }
2762
+
2763
+ void WaveshareEPaper5P8In::initialize() {
2764
+ // COMMAND POWER SETTING
2765
+ this->command(0x01);
2766
+ this->data(0x37);
2767
+ this->data(0x00);
2768
+
2769
+ // COMMAND PANEL SETTING
2770
+ this->command(0x00);
2771
+ this->data(0xCF);
2772
+ this->data(0x0B);
2773
+
2774
+ // COMMAND BOOSTER SOFT START
2775
+ this->command(0x06);
2776
+ this->data(0xC7);
2777
+ this->data(0xCC);
2778
+ this->data(0x28);
2779
+
2780
+ // COMMAND POWER ON
2781
+ this->command(0x04);
2782
+ this->wait_until_idle_();
2783
+ delay(10);
2784
+
2785
+ // COMMAND PLL CONTROL
2786
+ this->command(0x30);
2787
+ this->data(0x3C);
2788
+
2789
+ // COMMAND TEMPERATURE SENSOR CALIBRATION
2790
+ this->command(0x41);
2791
+ this->data(0x00);
2792
+
2793
+ // COMMAND VCOM AND DATA INTERVAL SETTING
2794
+ this->command(0x50);
2795
+ this->data(0x77);
2796
+
2797
+ // COMMAND TCON SETTING
2798
+ this->command(0x60);
2799
+ this->data(0x22);
2800
+
2801
+ // COMMAND RESOLUTION SETTING
2802
+ this->command(0x61);
2803
+ this->data(0x02);
2804
+ this->data(0x58);
2805
+ this->data(0x01);
2806
+ this->data(0xC0);
2807
+
2808
+ // COMMAND VCM DC SETTING REGISTER
2809
+ this->command(0x82);
2810
+ this->data(0x1E);
2811
+
2812
+ this->command(0xE5);
2813
+ this->data(0x03);
2814
+ }
2815
+ void HOT WaveshareEPaper5P8In::display() {
2816
+ // COMMAND DATA START TRANSMISSION 1
2817
+ this->command(0x10);
2818
+
2819
+ this->start_data_();
2820
+ for (size_t i = 0; i < this->get_buffer_length_(); i++) {
2821
+ uint8_t temp1 = this->buffer_[i];
2822
+ for (uint8_t j = 0; j < 8; j++) {
2823
+ uint8_t temp2;
2824
+ if (temp1 & 0x80) {
2825
+ temp2 = 0x03;
2826
+ } else {
2827
+ temp2 = 0x00;
2828
+ }
2829
+
2830
+ temp2 <<= 4;
2831
+ temp1 <<= 1;
2832
+ j++;
2833
+ if (temp1 & 0x80) {
2834
+ temp2 |= 0x03;
2835
+ } else {
2836
+ temp2 |= 0x00;
2837
+ }
2838
+ temp1 <<= 1;
2839
+ this->write_byte(temp2);
2840
+ }
2841
+
2842
+ App.feed_wdt();
2843
+ }
2844
+ this->end_data_();
2845
+
2846
+ // COMMAND DISPLAY REFRESH
2847
+ this->command(0x12);
2848
+ }
2849
+ int WaveshareEPaper5P8In::get_width_internal() { return 600; }
2850
+ int WaveshareEPaper5P8In::get_height_internal() { return 448; }
2851
+ void WaveshareEPaper5P8In::dump_config() {
2852
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
2853
+ ESP_LOGCONFIG(TAG, " Model: 5.83in");
2854
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
2855
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
2856
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
2857
+ LOG_UPDATE_INTERVAL(this);
2858
+ }
2859
+
2860
+ // ========================================================
2861
+ // 5.83in V2
2862
+ // Datasheet/Specification/Reference:
2863
+ // - https://www.waveshare.com/w/upload/3/37/5.83inch_e-Paper_V2_Specification.pdf
2864
+ // - https://github.com/waveshare/e-Paper/blob/master/Arduino/epd5in83_V2/epd5in83_V2.cpp
2865
+ // ========================================================
2866
+ void WaveshareEPaper5P8InV2::initialize() {
2867
+ // COMMAND POWER SETTING
2868
+ this->command(0x01);
2869
+ this->data(0x07);
2870
+ this->data(0x07);
2871
+ this->data(0x3f);
2872
+ this->data(0x3f);
2873
+
2874
+ // COMMAND POWER ON
2875
+ this->command(0x04);
2876
+ delay(10);
2877
+ this->wait_until_idle_();
2878
+
2879
+ // PANNEL SETTING
2880
+ this->command(0x00);
2881
+ this->data(0x1F);
2882
+
2883
+ // COMMAND RESOLUTION SETTING
2884
+ this->command(0x61);
2885
+ this->data(0x02);
2886
+ this->data(0x88);
2887
+ this->data(0x01);
2888
+ this->data(0xE0);
2889
+
2890
+ this->command(0x15);
2891
+ this->data(0x00);
2892
+
2893
+ // COMMAND TCON SETTING
2894
+ this->command(0x60);
2895
+ this->data(0x22);
2896
+
2897
+ // Do we need this?
2898
+ // COMMAND PLL CONTROL
2899
+ this->command(0x30);
2900
+ this->data(0x3C); // 3A 100HZ 29 150Hz 39 200HZ 31 171HZ
2901
+ }
2902
+ void HOT WaveshareEPaper5P8InV2::display() {
2903
+ // Reuse the code from WaveshareEPaper4P2In::display()
2904
+ // COMMAND VCM DC SETTING REGISTER
2905
+ this->command(0x82);
2906
+ this->data(0x12);
2907
+
2908
+ // COMMAND VCOM AND DATA INTERVAL SETTING
2909
+ this->command(0x50);
2910
+ this->data(0x97);
2911
+
2912
+ // COMMAND DATA START TRANSMISSION 1
2913
+ this->command(0x10);
2914
+ delay(2);
2915
+ this->start_data_();
2916
+ this->write_array(this->buffer_, this->get_buffer_length_());
2917
+ this->end_data_();
2918
+ delay(2);
2919
+
2920
+ // COMMAND DATA START TRANSMISSION 2
2921
+ this->command(0x13);
2922
+ delay(2);
2923
+ this->start_data_();
2924
+ this->write_array(this->buffer_, this->get_buffer_length_());
2925
+ this->end_data_();
2926
+
2927
+ // COMMAND DISPLAY REFRESH
2928
+ this->command(0x12);
2929
+ }
2930
+ int WaveshareEPaper5P8InV2::get_width_internal() { return 648; }
2931
+ int WaveshareEPaper5P8InV2::get_height_internal() { return 480; }
2932
+ void WaveshareEPaper5P8InV2::dump_config() {
2933
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
2934
+ ESP_LOGCONFIG(TAG, " Model: 5.83inv2");
2935
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
2936
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
2937
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
2938
+ LOG_UPDATE_INTERVAL(this);
2939
+ }
2940
+
2941
+ // ========================================================
2942
+ // Good Display 5.83in black/white GDEY0583T81
2943
+ // Product page:
2944
+ // - https://www.good-display.com/product/440.html
2945
+ // - https://www.seeedstudio.com/5-83-Monochrome-ePaper-Display-with-648x480-Pixels-p-5785.html
2946
+ // Datasheet:
2947
+ // -
2948
+ // https://www.good-display.com/public/html/pdfjs/viewer/viewernew.html?file=https://v4.cecdn.yun300.cn/100001_1909185148/GDEY0583T81-new.pdf
2949
+ // - https://v4.cecdn.yun300.cn/100001_1909185148/GDEY0583T81-new.pdf
2950
+ // Reference code from GoodDisplay:
2951
+ // - https://www.good-display.com/companyfile/903.html
2952
+ // ========================================================
2953
+
2954
+ void GDEY0583T81::initialize() {
2955
+ // Allocate buffer for old data for partial updates
2956
+ RAMAllocator<uint8_t> allocator{};
2957
+ this->old_buffer_ = allocator.allocate(this->get_buffer_length_());
2958
+ if (this->old_buffer_ == nullptr) {
2959
+ ESP_LOGE(TAG, "Could not allocate old buffer for display!");
2960
+ return;
2961
+ }
2962
+ memset(this->old_buffer_, 0xFF, this->get_buffer_length_());
2963
+
2964
+ this->init_full_();
2965
+
2966
+ this->wait_until_idle_();
2967
+
2968
+ this->deep_sleep();
2969
+ }
2970
+
2971
+ void GDEY0583T81::power_on_() {
2972
+ if (!this->power_is_on_) {
2973
+ this->command(0x04);
2974
+ this->wait_until_idle_();
2975
+ }
2976
+ this->power_is_on_ = true;
2977
+ this->is_deep_sleep_ = false;
2978
+ }
2979
+
2980
+ void GDEY0583T81::power_off_() {
2981
+ this->command(0x02);
2982
+ this->wait_until_idle_();
2983
+ this->power_is_on_ = false;
2984
+ }
2985
+
2986
+ void GDEY0583T81::deep_sleep() {
2987
+ if (this->is_deep_sleep_) {
2988
+ return;
2989
+ }
2990
+
2991
+ // VCOM and data interval setting (CDI)
2992
+ this->command(0x50);
2993
+ this->data(0xf7);
2994
+
2995
+ this->power_off_();
2996
+ delay(10);
2997
+
2998
+ // Deep sleep (DSLP)
2999
+ this->command(0x07);
3000
+ this->data(0xA5);
3001
+ this->is_deep_sleep_ = true;
3002
+ }
3003
+
3004
+ void GDEY0583T81::reset_() {
3005
+ if (this->reset_pin_ != nullptr) {
3006
+ this->reset_pin_->digital_write(false);
3007
+ delay(10);
3008
+ this->reset_pin_->digital_write(true);
3009
+ delay(10);
3010
+ }
3011
+ }
3012
+
3013
+ // Initialize for full screen update in fast mode
3014
+ void GDEY0583T81::init_full_() {
3015
+ this->init_display_();
3016
+
3017
+ // Based on the GD sample code
3018
+ // VCOM and data interval setting (CDI)
3019
+ this->command(0x50);
3020
+ this->data(0x29);
3021
+ this->data(0x07);
3022
+
3023
+ // Cascade Setting (CCSET)
3024
+ this->command(0xE0);
3025
+ this->data(0x02);
3026
+
3027
+ // Force Temperature (TSSET)
3028
+ this->command(0xE5);
3029
+ this->data(0x5A);
3030
+ }
3031
+
3032
+ // Initialize for a partial update of the full screen
3033
+ void GDEY0583T81::init_partial_() {
3034
+ this->init_display_();
3035
+
3036
+ // Cascade Setting (CCSET)
3037
+ this->command(0xE0);
3038
+ this->data(0x02);
3039
+
3040
+ // Force Temperature (TSSET)
3041
+ this->command(0xE5);
3042
+ this->data(0x6E);
3043
+ }
3044
+
3045
+ void GDEY0583T81::init_display_() {
3046
+ this->reset_();
3047
+
3048
+ // Panel Setting (PSR)
3049
+ this->command(0x00);
3050
+ // Sets: REG=0, LUT from OTP (set by CDI)
3051
+ // KW/R=1, Sets KW mode (Black/White)
3052
+ // as opposed to the default KWR mode (Black/White/Red)
3053
+ // UD=1, Gate Scan Direction, 1 = up (default)
3054
+ // SHL=1, Source Shift Direction, 1 = right (default)
3055
+ // SHD_N=1, Booster Switch, 1 = ON (default)
3056
+ // RST_N=1, Soft reset, 1 = No effect (default)
3057
+ this->data(0x1F);
3058
+
3059
+ // Resolution setting (TRES)
3060
+ this->command(0x61);
3061
+
3062
+ // Horizontal display resolution (HRES)
3063
+ this->data(get_width_internal() / 256);
3064
+ this->data(get_width_internal() % 256);
3065
+
3066
+ // Vertical display resolution (VRES)
3067
+ this->data(get_height_internal() / 256);
3068
+ this->data(get_height_internal() % 256);
3069
+
3070
+ this->power_on_();
3071
+ }
3072
+
3073
+ void HOT GDEY0583T81::display() {
3074
+ bool full_update = this->at_update_ == 0;
3075
+ if (full_update) {
3076
+ this->init_full_();
3077
+ } else {
3078
+ this->init_partial_();
3079
+
3080
+ // VCOM and data interval setting (CDI)
3081
+ this->command(0x50);
3082
+ this->data(0xA9);
3083
+ this->data(0x07);
3084
+
3085
+ // Partial In (PTIN), makes the display enter partial mode
3086
+ this->command(0x91);
3087
+
3088
+ // Partial Window (PTL)
3089
+ // We use the full screen as the window
3090
+ this->command(0x90);
3091
+
3092
+ // Horizontal start/end channel bank (HRST/HRED)
3093
+ this->data(0);
3094
+ this->data(0);
3095
+ this->data((get_width_internal() - 1) / 256);
3096
+ this->data((get_width_internal() - 1) % 256);
3097
+
3098
+ // Vertical start/end line (VRST/VRED)
3099
+ this->data(0);
3100
+ this->data(0);
3101
+ this->data((get_height_internal() - 1) / 256);
3102
+ this->data((get_height_internal() - 1) % 256);
3103
+
3104
+ this->data(0x01);
3105
+
3106
+ // Display Start Transmission 1 (DTM1)
3107
+ // in KW mode this writes "OLD" data to SRAM
3108
+ this->command(0x10);
3109
+ this->start_data_();
3110
+ this->write_array(this->old_buffer_, this->get_buffer_length_());
3111
+ this->end_data_();
3112
+ }
3113
+
3114
+ // Display Start Transmission 2 (DTM2)
3115
+ // in KW mode this writes "NEW" data to SRAM
3116
+ this->command(0x13);
3117
+ this->start_data_();
3118
+ this->write_array(this->buffer_, this->get_buffer_length_());
3119
+ this->end_data_();
3120
+
3121
+ for (size_t i = 0; i < this->get_buffer_length_(); i++) {
3122
+ this->old_buffer_[i] = this->buffer_[i];
3123
+ }
3124
+
3125
+ // Display Refresh (DRF)
3126
+ this->command(0x12);
3127
+ delay(10);
3128
+ this->wait_until_idle_();
3129
+
3130
+ if (full_update) {
3131
+ ESP_LOGD(TAG, "Full update done");
3132
+ } else {
3133
+ // Partial out (PTOUT), makes the display exit partial mode
3134
+ this->command(0x92);
3135
+ ESP_LOGD(TAG, "Partial update done, next full update after %" PRIu32 " cycles",
3136
+ this->full_update_every_ - this->at_update_ - 1);
3137
+ }
3138
+
3139
+ this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
3140
+
3141
+ this->deep_sleep();
3142
+ }
3143
+
3144
+ void GDEY0583T81::set_full_update_every(uint32_t full_update_every) { this->full_update_every_ = full_update_every; }
3145
+ int GDEY0583T81::get_width_internal() { return 648; }
3146
+ int GDEY0583T81::get_height_internal() { return 480; }
3147
+ uint32_t GDEY0583T81::idle_timeout_() { return 5000; }
3148
+ void GDEY0583T81::dump_config() {
3149
+ LOG_DISPLAY("", "GoodDisplay E-Paper", this);
3150
+ ESP_LOGCONFIG(TAG, " Model: 5.83in B/W GDEY0583T81");
3151
+ ESP_LOGCONFIG(TAG, " Full Update Every: %" PRIu32, this->full_update_every_);
3152
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
3153
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
3154
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
3155
+ LOG_UPDATE_INTERVAL(this);
3156
+ }
3157
+
3158
+ void WaveshareEPaper7P5InBV2::initialize() {
3159
+ // COMMAND POWER SETTING
3160
+ this->command(0x01);
3161
+ this->data(0x07);
3162
+ this->data(0x07); // VGH=20V,VGL=-20V
3163
+ this->data(0x3f); // VDH=15V
3164
+ this->data(0x3f); // VDL=-15V
3165
+ // COMMAND POWER ON
3166
+ this->command(0x04);
3167
+ delay(100); // NOLINT
3168
+ this->wait_until_idle_();
3169
+ // COMMAND PANEL SETTING
3170
+ this->command(0x00);
3171
+ this->data(0x0F); // KW3f, KWR-2F, BWROTP 0f, BWOTP 1f
3172
+ this->command(0x61); // tres
3173
+ this->data(0x03); // 800px
3174
+ this->data(0x20);
3175
+ this->data(0x01); // 400px
3176
+ this->data(0xE0);
3177
+ this->command(0x15);
3178
+ this->data(0x00);
3179
+ // COMMAND VCOM AND DATA INTERVAL SETTING
3180
+ this->command(0x50);
3181
+ this->data(0x11);
3182
+ this->data(0x07);
3183
+ // COMMAND TCON SETTING
3184
+ this->command(0x60);
3185
+ this->data(0x22);
3186
+
3187
+ this->command(0x82);
3188
+ this->data(0x08);
3189
+ this->command(0x30);
3190
+ this->data(0x06);
3191
+
3192
+ // COMMAND RESOLUTION SETTING
3193
+ this->command(0x65);
3194
+ this->data(0x00);
3195
+ this->data(0x00); // 800*480
3196
+ this->data(0x00);
3197
+ this->data(0x00);
3198
+ }
3199
+ void HOT WaveshareEPaper7P5InBV2::display() {
3200
+ // COMMAND DATA START TRANSMISSION 1 (B/W data)
3201
+ this->command(0x10);
3202
+ delay(2);
3203
+ this->start_data_();
3204
+ this->write_array(this->buffer_, this->get_buffer_length_());
3205
+ this->end_data_();
3206
+ delay(2);
3207
+
3208
+ // COMMAND DATA START TRANSMISSION 2 (RED data)
3209
+ this->command(0x13);
3210
+ delay(2);
3211
+ this->start_data_();
3212
+ for (size_t i = 0; i < this->get_buffer_length_(); i++)
3213
+ this->write_byte(0x00);
3214
+ this->end_data_();
3215
+ delay(2);
3216
+
3217
+ // COMMAND DISPLAY REFRESH
3218
+ this->command(0x12);
3219
+ delay(100); // NOLINT
3220
+ this->wait_until_idle_();
3221
+ this->deep_sleep();
3222
+ }
3223
+ int WaveshareEPaper7P5InBV2::get_width_internal() { return 800; }
3224
+ int WaveshareEPaper7P5InBV2::get_height_internal() { return 480; }
3225
+ void WaveshareEPaper7P5InBV2::dump_config() {
3226
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
3227
+ ESP_LOGCONFIG(TAG, " Model: 7.5in-bv2");
3228
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
3229
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
3230
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
3231
+ LOG_UPDATE_INTERVAL(this);
3232
+ }
3233
+
3234
+ void WaveshareEPaper7P5InBV3::initialize() { this->init_display_(); }
3235
+ bool WaveshareEPaper7P5InBV3::wait_until_idle_() {
3236
+ if (this->busy_pin_ == nullptr) {
3237
+ return true;
3238
+ }
3239
+
3240
+ const uint32_t start = millis();
3241
+ while (this->busy_pin_->digital_read()) {
3242
+ this->command(0x71);
3243
+ if (millis() - start > this->idle_timeout_()) {
3244
+ ESP_LOGI(TAG, "Timeout while displaying image!");
3245
+ return false;
3246
+ }
3247
+ App.feed_wdt();
3248
+ delay(10);
3249
+ }
3250
+ delay(200); // NOLINT
3251
+ return true;
3252
+ };
3253
+ void WaveshareEPaper7P5InBV3::init_display_() {
3254
+ this->reset_();
3255
+
3256
+ // COMMAND POWER SETTING
3257
+ this->command(0x01);
3258
+
3259
+ // 1-0=11: internal power
3260
+ this->data(0x07);
3261
+ this->data(0x17); // VGH&VGL
3262
+ this->data(0x3F); // VSH
3263
+ this->data(0x26); // VSL
3264
+ this->data(0x11); // VSHR
3265
+
3266
+ // VCOM DC Setting
3267
+ this->command(0x82);
3268
+ this->data(0x24); // VCOM
3269
+
3270
+ // Booster Setting
3271
+ this->command(0x06);
3272
+ this->data(0x27);
3273
+ this->data(0x27);
3274
+ this->data(0x2F);
3275
+ this->data(0x17);
3276
+
3277
+ // POWER ON
3278
+ this->command(0x04);
3279
+
3280
+ delay(100); // NOLINT
3281
+ this->wait_until_idle_();
3282
+ // COMMAND PANEL SETTING
3283
+ this->command(0x00);
3284
+ this->data(0x3F); // KW-3f KWR-2F BWROTP 0f BWOTP 1f
3285
+
3286
+ // COMMAND RESOLUTION SETTING
3287
+ this->command(0x61);
3288
+ this->data(0x03); // source 800
3289
+ this->data(0x20);
3290
+ this->data(0x01); // gate 480
3291
+ this->data(0xE0);
3292
+ // COMMAND ...?
3293
+ this->command(0x15);
3294
+ this->data(0x00);
3295
+ // COMMAND VCOM AND DATA INTERVAL SETTING
3296
+ this->command(0x50);
3297
+ this->data(0x10);
3298
+ this->data(0x00);
3299
+ // COMMAND TCON SETTING
3300
+ this->command(0x60);
3301
+ this->data(0x22);
3302
+ // Resolution setting
3303
+ this->command(0x65);
3304
+ this->data(0x00);
3305
+ this->data(0x00); // 800*480
3306
+ this->data(0x00);
3307
+ this->data(0x00);
3308
+
3309
+ uint8_t lut_vcom_7_i_n5_v2[] = {
3310
+ 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3311
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3312
+ };
3313
+
3314
+ uint8_t lut_ww_7_i_n5_v2[] = {
3315
+ 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3316
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3317
+ };
3318
+
3319
+ uint8_t lut_bw_7_i_n5_v2[] = {
3320
+ 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3321
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3322
+ };
3323
+
3324
+ uint8_t lut_wb_7_i_n5_v2[] = {
3325
+ 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
3326
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3327
+ };
3328
+
3329
+ uint8_t lut_bb_7_i_n5_v2[] = {
3330
+ 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3331
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3332
+ };
3333
+
3334
+ uint8_t count;
3335
+ this->command(0x20); // VCOM
3336
+ for (count = 0; count < 42; count++)
3337
+ this->data(lut_vcom_7_i_n5_v2[count]);
3338
+
3339
+ this->command(0x21); // LUTBW
3340
+ for (count = 0; count < 42; count++)
3341
+ this->data(lut_ww_7_i_n5_v2[count]);
3342
+
3343
+ this->command(0x22); // LUTBW
3344
+ for (count = 0; count < 42; count++)
3345
+ this->data(lut_bw_7_i_n5_v2[count]);
3346
+
3347
+ this->command(0x23); // LUTWB
3348
+ for (count = 0; count < 42; count++)
3349
+ this->data(lut_wb_7_i_n5_v2[count]);
3350
+
3351
+ this->command(0x24); // LUTBB
3352
+ for (count = 0; count < 42; count++)
3353
+ this->data(lut_bb_7_i_n5_v2[count]);
3354
+ };
3355
+ void HOT WaveshareEPaper7P5InBV3::display() {
3356
+ this->init_display_();
3357
+ uint32_t buf_len = this->get_buffer_length_();
3358
+
3359
+ this->command(0x10);
3360
+ for (uint32_t i = 0; i < buf_len; i++) {
3361
+ this->data(0xFF);
3362
+ }
3363
+
3364
+ this->command(0x13); // Start Transmission
3365
+ delay(2);
3366
+ for (uint32_t i = 0; i < buf_len; i++) {
3367
+ this->data(~this->buffer_[i]);
3368
+ }
3369
+
3370
+ this->command(0x12); // Display Refresh
3371
+ delay(100); // NOLINT
3372
+ this->wait_until_idle_();
3373
+ this->deep_sleep();
3374
+ }
3375
+ int WaveshareEPaper7P5InBV3::get_width_internal() { return 800; }
3376
+ int WaveshareEPaper7P5InBV3::get_height_internal() { return 480; }
3377
+ void WaveshareEPaper7P5InBV3::dump_config() {
3378
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
3379
+ ESP_LOGCONFIG(TAG, " Model: 7.5in-bv3");
3380
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
3381
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
3382
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
3383
+ LOG_UPDATE_INTERVAL(this);
3384
+ }
3385
+
3386
+ void WaveshareEPaper7P5InBV3BWR::initialize() { this->init_display_(); }
3387
+ bool WaveshareEPaper7P5InBV3BWR::wait_until_idle_() {
3388
+ if (this->busy_pin_ == nullptr) {
3389
+ return true;
3390
+ }
3391
+
3392
+ const uint32_t start = millis();
3393
+ while (this->busy_pin_->digital_read()) {
3394
+ this->command(0x71);
3395
+ if (millis() - start > this->idle_timeout_()) {
3396
+ ESP_LOGI(TAG, "Timeout while displaying image!");
3397
+ return false;
3398
+ }
3399
+ App.feed_wdt();
3400
+ delay(10);
3401
+ }
3402
+ delay(200); // NOLINT
3403
+ return true;
3404
+ };
3405
+ void WaveshareEPaper7P5InBV3BWR::init_display_() {
3406
+ this->reset_();
3407
+
3408
+ // COMMAND POWER SETTING
3409
+ this->command(0x01);
3410
+
3411
+ // 1-0=11: internal power
3412
+ this->data(0x07); // VRS_EN=1, VS_EN=1, VG_EN=1
3413
+ this->data(0x17); // VGH&VGL ??? VCOM_SLEW=1 but this is fixed, VG_LVL[2:0]=111 => VGH=20V VGL=-20V, it could be 0x07
3414
+ this->data(0x3F); // VSH=15V?
3415
+ this->data(0x26); // VSL=-9.4V?
3416
+ this->data(0x11); // VSHR=5.8V?
3417
+
3418
+ // VCOM DC Setting
3419
+ this->command(0x82);
3420
+ this->data(0x24); // VCOM=-1.9V
3421
+
3422
+ // POWER ON
3423
+ this->command(0x04);
3424
+ delay(100); // NOLINT
3425
+ this->wait_until_idle_();
3426
+
3427
+ // COMMAND PANEL SETTING
3428
+ this->command(0x00);
3429
+ this->data(0x0F); // KW-3f KWR-2F BWROTP 0f BWOTP 1f
3430
+
3431
+ // COMMAND RESOLUTION SETTING
3432
+ this->command(0x61);
3433
+ this->data(0x03); // source 800
3434
+ this->data(0x20);
3435
+ this->data(0x01); // gate 480
3436
+ this->data(0xE0);
3437
+
3438
+ // COMMAND VCOM AND DATA INTERVAL SETTING
3439
+ this->command(0x50);
3440
+ this->data(0x20);
3441
+ this->data(0x00);
3442
+
3443
+ // COMMAND TCON SETTING
3444
+ this->command(0x60);
3445
+ this->data(0x22);
3446
+
3447
+ // Resolution setting
3448
+ this->command(0x65);
3449
+ this->data(0x00);
3450
+ this->data(0x00); // 800*480
3451
+ this->data(0x00);
3452
+ this->data(0x00);
3453
+ };
3454
+ void HOT WaveshareEPaper7P5InBV3BWR::display() {
3455
+ this->init_display_();
3456
+ const uint32_t buf_len = this->get_buffer_length_() / 2u;
3457
+
3458
+ this->command(0x10); // Send BW data Transmission
3459
+ delay(2);
3460
+ for (uint32_t i = 0; i < buf_len; i++) {
3461
+ this->data(this->buffer_[i]);
3462
+ }
3463
+
3464
+ this->command(0x13); // Send red data Transmission
3465
+ delay(2);
3466
+ for (uint32_t i = 0; i < buf_len; i++) {
3467
+ this->data(this->buffer_[i + buf_len]);
3468
+ }
3469
+
3470
+ this->command(0x12); // Display Refresh
3471
+ delay(100); // NOLINT
3472
+ this->wait_until_idle_();
3473
+ this->deep_sleep();
3474
+ }
3475
+ int WaveshareEPaper7P5InBV3BWR::get_width_internal() { return 800; }
3476
+ int WaveshareEPaper7P5InBV3BWR::get_height_internal() { return 480; }
3477
+ void WaveshareEPaper7P5InBV3BWR::dump_config() {
3478
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
3479
+ ESP_LOGCONFIG(TAG, " Model: 7.5in-bv3 BWR-Mode");
3480
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
3481
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
3482
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
3483
+ LOG_UPDATE_INTERVAL(this);
3484
+ }
3485
+
3486
+ void WaveshareEPaper7P5In::initialize() {
3487
+ // COMMAND POWER SETTING
3488
+ this->command(0x01);
3489
+ this->data(0x37);
3490
+ this->data(0x00);
3491
+ // COMMAND PANEL SETTING
3492
+ this->command(0x00);
3493
+ this->data(0xCF);
3494
+ this->data(0x0B);
3495
+ // COMMAND BOOSTER SOFT START
3496
+ this->command(0x06);
3497
+ this->data(0xC7);
3498
+ this->data(0xCC);
3499
+ this->data(0x28);
3500
+ // COMMAND POWER ON
3501
+ this->command(0x04);
3502
+ this->wait_until_idle_();
3503
+ delay(10);
3504
+ // COMMAND PLL CONTROL
3505
+ this->command(0x30);
3506
+ this->data(0x3C);
3507
+ // COMMAND TEMPERATURE SENSOR CALIBRATION
3508
+ this->command(0x41);
3509
+ this->data(0x00);
3510
+ // COMMAND VCOM AND DATA INTERVAL SETTING
3511
+ this->command(0x50);
3512
+ this->data(0x77);
3513
+ // COMMAND TCON SETTING
3514
+ this->command(0x60);
3515
+ this->data(0x22);
3516
+ // COMMAND RESOLUTION SETTING
3517
+ this->command(0x61);
3518
+ this->data(0x02);
3519
+ this->data(0x80);
3520
+ this->data(0x01);
3521
+ this->data(0x80);
3522
+ // COMMAND VCM DC SETTING REGISTER
3523
+ this->command(0x82);
3524
+ this->data(0x1E);
3525
+ this->command(0xE5);
3526
+ this->data(0x03);
3527
+ }
3528
+ void HOT WaveshareEPaper7P5In::display() {
3529
+ // COMMAND DATA START TRANSMISSION 1
3530
+ this->command(0x10);
3531
+ this->start_data_();
3532
+ for (size_t i = 0; i < this->get_buffer_length_(); i++) {
3533
+ uint8_t temp1 = this->buffer_[i];
3534
+ for (uint8_t j = 0; j < 8; j++) {
3535
+ uint8_t temp2;
3536
+ if (temp1 & 0x80) {
3537
+ temp2 = 0x03;
3538
+ } else {
3539
+ temp2 = 0x00;
3540
+ }
3541
+ temp2 <<= 4;
3542
+ temp1 <<= 1;
3543
+ j++;
3544
+ if (temp1 & 0x80) {
3545
+ temp2 |= 0x03;
3546
+ } else {
3547
+ temp2 |= 0x00;
3548
+ }
3549
+ temp1 <<= 1;
3550
+ this->write_byte(temp2);
3551
+ }
3552
+ App.feed_wdt();
3553
+ }
3554
+ this->end_data_();
3555
+ // COMMAND DISPLAY REFRESH
3556
+ this->command(0x12);
3557
+ }
3558
+ int WaveshareEPaper7P5In::get_width_internal() { return 640; }
3559
+ int WaveshareEPaper7P5In::get_height_internal() { return 384; }
3560
+ void WaveshareEPaper7P5In::dump_config() {
3561
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
3562
+ ESP_LOGCONFIG(TAG, " Model: 7.5in");
3563
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
3564
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
3565
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
3566
+ LOG_UPDATE_INTERVAL(this);
3567
+ }
3568
+
3569
+ // Waveshare 5.65F ========================================================
3570
+
3571
+ namespace cmddata_5P65InF {
3572
+ // WaveshareEPaper5P65InF commands
3573
+ // https://www.waveshare.com/wiki/5.65inch_e-Paper_Module_(F)
3574
+
3575
+ // R00H (PSR): Panel setting Register
3576
+ // UD(1): scan up
3577
+ // SHL(1) shift right
3578
+ // SHD_N(1) DC-DC on
3579
+ // RST_N(1) no reset
3580
+ static const uint8_t R00_CMD_PSR[] = {0x00, 0xEF, 0x08};
3581
+
3582
+ // R01H (PWR): Power setting Register
3583
+ // internal DC-DC power generation
3584
+ static const uint8_t R01_CMD_PWR[] = {0x01, 0x07, 0x00, 0x00, 0x00};
3585
+
3586
+ // R02H (POF): Power OFF Command
3587
+ static const uint8_t R02_CMD_POF[] = {0x02};
3588
+
3589
+ // R03H (PFS): Power off sequence setting Register
3590
+ // T_VDS_OFF (00) = 1 frame
3591
+ static const uint8_t R03_CMD_PFS[] = {0x03, 0x00};
3592
+
3593
+ // R04H (PON): Power ON Command
3594
+ static const uint8_t R04_CMD_PON[] = {0x04};
3595
+
3596
+ // R06h (BTST): Booster Soft Start
3597
+ static const uint8_t R06_CMD_BTST[] = {0x06, 0xC7, 0xC7, 0x1D};
3598
+
3599
+ // R07H (DSLP): Deep sleep#
3600
+ // Note Documentation @ Waveshare shows cmd code as 0x10 in table, but
3601
+ // 0x10 is DTM1.
3602
+ static const uint8_t R07_CMD_DSLP[] = {0x07, 0xA5};
3603
+
3604
+ // R10H (DTM1): Data Start Transmission 1
3605
+
3606
+ static const uint8_t R10_CMD_DTM1[] = {0x10};
3607
+
3608
+ // R11H (DSP): Data Stop
3609
+ static const uint8_t R11_CMD_DSP[] = {0x11};
3610
+
3611
+ // R12H (DRF): Display Refresh
3612
+ static const uint8_t R12_CMD_DRF[] = {0x12};
3613
+
3614
+ // R13H (IPC): Image Process Command
3615
+ static const uint8_t R13_CMD_IPC[] = {0x13, 0x00};
3616
+
3617
+ // R30H (PLL): PLL Control
3618
+ // 0x3C = 50Hz
3619
+ static const uint8_t R30_CMD_PLL[] = {0x30, 0x3C};
3620
+
3621
+ // R41H (TSE): Temperature Sensor Enable
3622
+ // TSE(0) enable, TO(0000) +0 degree offset
3623
+ static const uint8_t R41_CMD_TSE[] = {0x41, 0x00};
3624
+
3625
+ // R50H (CDI) VCOM and Data interval setting
3626
+ // CDI(0111) 10
3627
+ // DDX(1), VBD(001) Border output "White"
3628
+ static const uint8_t R50_CMD_CDI[] = {0x50, 0x37};
3629
+
3630
+ // R60H (TCON) Gate and Source non overlap period command
3631
+ // S2G(10) 12 units
3632
+ // G2S(10) 12 units
3633
+ static const uint8_t R60_CMD_TCON[] = {0x60, 0x22};
3634
+
3635
+ // R61H (TRES) Resolution Setting
3636
+ // 0x258 = 600
3637
+ // 0x1C0 = 448
3638
+ static const uint8_t R61_CMD_TRES[] = {0x61, 0x02, 0x58, 0x01, 0xC0};
3639
+
3640
+ // RE3H (PWS) Power Savings
3641
+ static const uint8_t RE3_CMD_PWS[] = {0xE3, 0xAA};
3642
+ } // namespace cmddata_5P65InF
3643
+
3644
+ void WaveshareEPaper5P65InF::initialize() {
3645
+ if (this->buffers_[0] == nullptr) {
3646
+ ESP_LOGE(TAG, "Buffer unavailable!");
3647
+ return;
3648
+ }
3649
+
3650
+ this->reset_();
3651
+ delay(20);
3652
+ this->wait_until_(IDLE);
3653
+
3654
+ using namespace cmddata_5P65InF;
3655
+
3656
+ this->cmd_data(R00_CMD_PSR, sizeof(R00_CMD_PSR));
3657
+ this->cmd_data(R01_CMD_PWR, sizeof(R01_CMD_PWR));
3658
+ this->cmd_data(R03_CMD_PFS, sizeof(R03_CMD_PFS));
3659
+ this->cmd_data(R06_CMD_BTST, sizeof(R06_CMD_BTST));
3660
+ this->cmd_data(R30_CMD_PLL, sizeof(R30_CMD_PLL));
3661
+ this->cmd_data(R41_CMD_TSE, sizeof(R41_CMD_TSE));
3662
+ this->cmd_data(R50_CMD_CDI, sizeof(R50_CMD_CDI));
3663
+ this->cmd_data(R60_CMD_TCON, sizeof(R60_CMD_TCON));
3664
+ this->cmd_data(R61_CMD_TRES, sizeof(R61_CMD_TRES));
3665
+ this->cmd_data(RE3_CMD_PWS, sizeof(RE3_CMD_PWS));
3666
+
3667
+ delay(100); // NOLINT
3668
+ this->cmd_data(R50_CMD_CDI, sizeof(R50_CMD_CDI));
3669
+
3670
+ ESP_LOGI(TAG, "Display initialized successfully");
3671
+ }
3672
+
3673
+ void HOT WaveshareEPaper5P65InF::display() {
3674
+ // INITIALIZATION
3675
+ ESP_LOGI(TAG, "Initialise the display");
3676
+ this->initialize();
3677
+
3678
+ using namespace cmddata_5P65InF;
3679
+
3680
+ // COMMAND DATA START TRANSMISSION
3681
+ ESP_LOGI(TAG, "Sending data to the display");
3682
+ this->cmd_data(R61_CMD_TRES, sizeof(R61_CMD_TRES));
3683
+ this->cmd_data(R10_CMD_DTM1, sizeof(R10_CMD_DTM1));
3684
+ this->send_buffers_();
3685
+
3686
+ // COMMAND POWER ON
3687
+ ESP_LOGI(TAG, "Power on the display");
3688
+ this->cmd_data(R04_CMD_PON, sizeof(R04_CMD_PON));
3689
+ this->wait_until_(IDLE);
3690
+
3691
+ // COMMAND REFRESH SCREEN
3692
+ ESP_LOGI(TAG, "Refresh the display");
3693
+ this->cmd_data(R12_CMD_DRF, sizeof(R12_CMD_DRF));
3694
+ this->wait_until_(IDLE);
3695
+
3696
+ // COMMAND POWER OFF
3697
+ ESP_LOGI(TAG, "Power off the display");
3698
+ this->cmd_data(R02_CMD_POF, sizeof(R02_CMD_POF));
3699
+ this->wait_until_(BUSY);
3700
+
3701
+ if (this->deep_sleep_between_updates_) {
3702
+ ESP_LOGI(TAG, "Set the display to deep sleep");
3703
+ this->cmd_data(R07_CMD_DSLP, sizeof(R07_CMD_DSLP));
3704
+ }
3705
+ }
3706
+
3707
+ int WaveshareEPaper5P65InF::get_width_internal() { return 600; }
3708
+ int WaveshareEPaper5P65InF::get_height_internal() { return 448; }
3709
+ uint32_t WaveshareEPaper5P65InF::idle_timeout_() { return 35000; }
3710
+
3711
+ void WaveshareEPaper5P65InF::dump_config() {
3712
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
3713
+ ESP_LOGCONFIG(TAG, " Model: 5.65in-F");
3714
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
3715
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
3716
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
3717
+ LOG_UPDATE_INTERVAL(this);
3718
+ }
3719
+
3720
+ bool WaveshareEPaper5P65InF::wait_until_(WaitForState busy_state) {
3721
+ if (this->busy_pin_ == nullptr) {
3722
+ return true;
3723
+ }
3724
+
3725
+ const uint32_t start = millis();
3726
+ while (busy_state != this->busy_pin_->digital_read()) {
3727
+ if (millis() - start > this->idle_timeout_()) {
3728
+ ESP_LOGE(TAG, "Timeout while displaying image!");
3729
+ return false;
3730
+ }
3731
+ App.feed_wdt();
3732
+ delay(10);
3733
+ }
3734
+ return true;
3735
+ }
3736
+
3737
+ void WaveshareEPaper7P3InF::initialize() {
3738
+ if (this->buffers_[0] == nullptr) {
3739
+ ESP_LOGE(TAG, "Buffer unavailable!");
3740
+ return;
3741
+ }
3742
+
3743
+ this->reset_();
3744
+ delay(20);
3745
+ this->wait_until_idle_();
3746
+
3747
+ // COMMAND CMDH
3748
+ this->command(0xAA);
3749
+ this->data(0x49);
3750
+ this->data(0x55);
3751
+ this->data(0x20);
3752
+ this->data(0x08);
3753
+ this->data(0x09);
3754
+ this->data(0x18);
3755
+
3756
+ this->command(0x01);
3757
+ this->data(0x3F);
3758
+ this->data(0x00);
3759
+ this->data(0x32);
3760
+ this->data(0x2A);
3761
+ this->data(0x0E);
3762
+ this->data(0x2A);
3763
+
3764
+ this->command(0x00);
3765
+ this->data(0x5F);
3766
+ this->data(0x69);
3767
+
3768
+ this->command(0x03);
3769
+ this->data(0x00);
3770
+ this->data(0x54);
3771
+ this->data(0x00);
3772
+ this->data(0x44);
3773
+
3774
+ this->command(0x05);
3775
+ this->data(0x40);
3776
+ this->data(0x1F);
3777
+ this->data(0x1F);
3778
+ this->data(0x2C);
3779
+
3780
+ this->command(0x06);
3781
+ this->data(0x6F);
3782
+ this->data(0x1F);
3783
+ this->data(0x1F);
3784
+ this->data(0x22);
3785
+
3786
+ this->command(0x08);
3787
+ this->data(0x6F);
3788
+ this->data(0x1F);
3789
+ this->data(0x1F);
3790
+ this->data(0x22);
3791
+
3792
+ // COMMAND IPC
3793
+ this->command(0x13);
3794
+ this->data(0x00);
3795
+ this->data(0x04);
3796
+
3797
+ this->command(0x30);
3798
+ this->data(0x3C);
3799
+
3800
+ // COMMAND TSE
3801
+ this->command(0x41);
3802
+ this->data(0x00);
3803
+
3804
+ this->command(0x50);
3805
+ this->data(0x3F);
3806
+
3807
+ this->command(0x60);
3808
+ this->data(0x02);
3809
+ this->data(0x00);
3810
+
3811
+ this->command(0x61);
3812
+ this->data(0x03);
3813
+ this->data(0x20);
3814
+ this->data(0x01);
3815
+ this->data(0xE0);
3816
+
3817
+ this->command(0x82);
3818
+ this->data(0x1E);
3819
+
3820
+ this->command(0x84);
3821
+ this->data(0x00);
3822
+
3823
+ // COMMAND AGID
3824
+ this->command(0x86);
3825
+ this->data(0x00);
3826
+
3827
+ this->command(0xE3);
3828
+ this->data(0x2F);
3829
+
3830
+ // COMMAND CCSET
3831
+ this->command(0xE0);
3832
+ this->data(0x00);
3833
+
3834
+ // COMMAND TSSET
3835
+ this->command(0xE6);
3836
+ this->data(0x00);
3837
+
3838
+ ESP_LOGI(TAG, "Display initialized successfully");
3839
+ }
3840
+ void HOT WaveshareEPaper7P3InF::display() {
3841
+ // INITIALIZATION
3842
+ ESP_LOGI(TAG, "Initialise the display");
3843
+ this->initialize();
3844
+
3845
+ // COMMAND DATA START TRANSMISSION
3846
+ ESP_LOGI(TAG, "Sending data to the display");
3847
+ this->command(0x10);
3848
+ this->send_buffers_();
3849
+
3850
+ // COMMAND POWER ON
3851
+ ESP_LOGI(TAG, "Power on the display");
3852
+ this->command(0x04);
3853
+ this->wait_until_idle_();
3854
+
3855
+ // COMMAND REFRESH SCREEN
3856
+ ESP_LOGI(TAG, "Refresh the display");
3857
+ this->command(0x12);
3858
+ this->data(0x00);
3859
+ this->wait_until_idle_();
3860
+
3861
+ // COMMAND POWER OFF
3862
+ ESP_LOGI(TAG, "Power off the display");
3863
+ this->command(0x02);
3864
+ this->data(0x00);
3865
+ this->wait_until_idle_();
3866
+
3867
+ if (this->deep_sleep_between_updates_) {
3868
+ ESP_LOGI(TAG, "Set the display to deep sleep");
3869
+ this->command(0x07);
3870
+ this->data(0xA5);
3871
+ }
3872
+ }
3873
+ int WaveshareEPaper7P3InF::get_width_internal() { return 800; }
3874
+ int WaveshareEPaper7P3InF::get_height_internal() { return 480; }
3875
+ uint32_t WaveshareEPaper7P3InF::idle_timeout_() { return 35000; }
3876
+ void WaveshareEPaper7P3InF::dump_config() {
3877
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
3878
+ ESP_LOGCONFIG(TAG, " Model: 7.3in-F");
3879
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
3880
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
3881
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
3882
+ LOG_UPDATE_INTERVAL(this);
3883
+ }
3884
+
3885
+ bool WaveshareEPaper7P3InF::wait_until_idle_() {
3886
+ if (this->busy_pin_ == nullptr) {
3887
+ return true;
3888
+ }
3889
+ const uint32_t start = millis();
3890
+ while (this->busy_pin_->digital_read()) {
3891
+ if (millis() - start > this->idle_timeout_()) {
3892
+ ESP_LOGE(TAG, "Timeout while displaying image!");
3893
+ return false;
3894
+ }
3895
+ App.feed_wdt();
3896
+ delay(10);
3897
+ }
3898
+ delay(200); // NOLINT
3899
+ return true;
3900
+ }
3901
+ bool WaveshareEPaper7P5InV2::wait_until_idle_() {
3902
+ if (this->busy_pin_ == nullptr) {
3903
+ return true;
3904
+ }
3905
+
3906
+ const uint32_t start = millis();
3907
+ while (this->busy_pin_->digital_read()) {
3908
+ this->command(0x71);
3909
+ if (millis() - start > this->idle_timeout_()) {
3910
+ ESP_LOGE(TAG, "Timeout while displaying image!");
3911
+ return false;
3912
+ }
3913
+ App.feed_wdt();
3914
+ delay(10);
3915
+ }
3916
+ return true;
3917
+ }
3918
+ void WaveshareEPaper7P5InV2::initialize() {
3919
+ // COMMAND POWER SETTING
3920
+ this->command(0x01);
3921
+ this->data(0x07);
3922
+ this->data(0x07);
3923
+ this->data(0x3f);
3924
+ this->data(0x3f);
3925
+
3926
+ // We don't want the display to be powered at this point
3927
+
3928
+ delay(100); // NOLINT
3929
+ this->wait_until_idle_();
3930
+
3931
+ // COMMAND VCOM AND DATA INTERVAL SETTING
3932
+ this->command(0x50);
3933
+ this->data(0x10);
3934
+ this->data(0x07);
3935
+
3936
+ // COMMAND TCON SETTING
3937
+ this->command(0x60);
3938
+ this->data(0x22);
3939
+
3940
+ // COMMAND PANEL SETTING
3941
+ this->command(0x00);
3942
+ this->data(0x1F);
3943
+
3944
+ // COMMAND RESOLUTION SETTING
3945
+ this->command(0x61);
3946
+ this->data(0x03);
3947
+ this->data(0x20);
3948
+ this->data(0x01);
3949
+ this->data(0xE0);
3950
+
3951
+ // COMMAND DUAL SPI MM_EN, DUSPI_EN
3952
+ this->command(0x15);
3953
+ this->data(0x00);
3954
+
3955
+ // COMMAND POWER DRIVER HAT DOWN
3956
+ // This command will turn off booster, controller, source driver, gate driver, VCOM, and
3957
+ // temperature sensor, but register data will be kept until VDD turned OFF or Deep Sleep Mode.
3958
+ // Source/Gate/Border/VCOM will be released to floating.
3959
+ this->command(0x02);
3960
+ }
3961
+ void HOT WaveshareEPaper7P5InV2::display() {
3962
+ uint32_t buf_len = this->get_buffer_length_();
3963
+
3964
+ // COMMAND POWER ON
3965
+ ESP_LOGI(TAG, "Power on the display and hat");
3966
+
3967
+ // This command will turn on booster, controller, regulators, and temperature sensor will be
3968
+ // activated for one-time sensing before enabling booster. When all voltages are ready, the
3969
+ // BUSY_N signal will return to high.
3970
+ this->command(0x04);
3971
+ delay(200); // NOLINT
3972
+ this->wait_until_idle_();
3973
+
3974
+ // COMMAND DATA START TRANSMISSION NEW DATA
3975
+ this->command(0x13);
3976
+ delay(2);
3977
+ for (uint32_t i = 0; i < buf_len; i++) {
3978
+ this->data(~(this->buffer_[i]));
3979
+ }
3980
+
3981
+ delay(100); // NOLINT
3982
+ this->wait_until_idle_();
3983
+
3984
+ // COMMAND DISPLAY REFRESH
3985
+ this->command(0x12);
3986
+ delay(100); // NOLINT
3987
+ this->wait_until_idle_();
3988
+
3989
+ ESP_LOGV(TAG, "Before command(0x02) (>> power off)");
3990
+ this->command(0x02);
3991
+ this->wait_until_idle_();
3992
+ ESP_LOGV(TAG, "After command(0x02) (>> power off)");
3993
+ }
3994
+
3995
+ int WaveshareEPaper7P5InV2::get_width_internal() { return 800; }
3996
+ int WaveshareEPaper7P5InV2::get_height_internal() { return 480; }
3997
+ uint32_t WaveshareEPaper7P5InV2::idle_timeout_() { return 10000; }
3998
+ void WaveshareEPaper7P5InV2::dump_config() {
3999
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
4000
+ ESP_LOGCONFIG(TAG, " Model: 7.5inV2rev2");
4001
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
4002
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
4003
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
4004
+ LOG_UPDATE_INTERVAL(this);
4005
+ }
4006
+
4007
+ /* 7.50inV2alt */
4008
+ bool WaveshareEPaper7P5InV2alt::wait_until_idle_() {
4009
+ if (this->busy_pin_ == nullptr) {
4010
+ return true;
4011
+ }
4012
+
4013
+ const uint32_t start = millis();
4014
+ while (this->busy_pin_->digital_read()) {
4015
+ this->command(0x71);
4016
+ if (millis() - start > this->idle_timeout_()) {
4017
+ ESP_LOGI(TAG, "Timeout while displaying image!");
4018
+ return false;
4019
+ }
4020
+ delay(10);
4021
+ }
4022
+ return true;
4023
+ }
4024
+
4025
+ void WaveshareEPaper7P5InV2alt::initialize() {
4026
+ this->reset_();
4027
+
4028
+ // COMMAND POWER SETTING
4029
+ this->command(0x01);
4030
+
4031
+ // 1-0=11: internal power
4032
+ this->data(0x07);
4033
+ this->data(0x17); // VGH&VGL
4034
+ this->data(0x3F); // VSH
4035
+ this->data(0x26); // VSL
4036
+ this->data(0x11); // VSHR
4037
+
4038
+ // VCOM DC Setting
4039
+ this->command(0x82);
4040
+ this->data(0x24); // VCOM
4041
+
4042
+ // Booster Setting
4043
+ this->command(0x06);
4044
+ this->data(0x27);
4045
+ this->data(0x27);
4046
+ this->data(0x2F);
4047
+ this->data(0x17);
4048
+
4049
+ // POWER ON
4050
+ this->command(0x04);
4051
+
4052
+ delay(100); // NOLINT
4053
+ this->wait_until_idle_();
4054
+ // COMMAND PANEL SETTING
4055
+ this->command(0x00);
4056
+ this->data(0x3F); // KW-3f KWR-2F BWROTP 0f BWOTP 1f
4057
+
4058
+ // COMMAND RESOLUTION SETTING
4059
+ this->command(0x61);
4060
+ this->data(0x03); // source 800
4061
+ this->data(0x20);
4062
+ this->data(0x01); // gate 480
4063
+ this->data(0xE0);
4064
+ // COMMAND ...?
4065
+ this->command(0x15);
4066
+ this->data(0x00);
4067
+ // COMMAND VCOM AND DATA INTERVAL SETTING
4068
+ this->command(0x50);
4069
+ this->data(0x10);
4070
+ this->data(0x00);
4071
+ // COMMAND TCON SETTING
4072
+ this->command(0x60);
4073
+ this->data(0x22);
4074
+ // Resolution setting
4075
+ this->command(0x65);
4076
+ this->data(0x00);
4077
+ this->data(0x00); // 800*480
4078
+ this->data(0x00);
4079
+ this->data(0x00);
4080
+
4081
+ this->wait_until_idle_();
4082
+
4083
+ uint8_t lut_vcom_7_i_n5_v2[] = {
4084
+ 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4085
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4086
+ };
4087
+
4088
+ uint8_t lut_ww_7_i_n5_v2[] = {
4089
+ 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4090
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4091
+ };
4092
+
4093
+ uint8_t lut_bw_7_i_n5_v2[] = {
4094
+ 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4095
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4096
+ };
4097
+
4098
+ uint8_t lut_wb_7_i_n5_v2[] = {
4099
+ 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
4100
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4101
+ };
4102
+
4103
+ uint8_t lut_bb_7_i_n5_v2[] = {
4104
+ 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4105
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4106
+ };
4107
+
4108
+ uint8_t count;
4109
+ this->command(0x20); // VCOM
4110
+ for (count = 0; count < 42; count++)
4111
+ this->data(lut_vcom_7_i_n5_v2[count]);
4112
+
4113
+ this->command(0x21); // LUTBW
4114
+ for (count = 0; count < 42; count++)
4115
+ this->data(lut_ww_7_i_n5_v2[count]);
4116
+
4117
+ this->command(0x22); // LUTBW
4118
+ for (count = 0; count < 42; count++)
4119
+ this->data(lut_bw_7_i_n5_v2[count]);
4120
+
4121
+ this->command(0x23); // LUTWB
4122
+ for (count = 0; count < 42; count++)
4123
+ this->data(lut_wb_7_i_n5_v2[count]);
4124
+
4125
+ this->command(0x24); // LUTBB
4126
+ for (count = 0; count < 42; count++)
4127
+ this->data(lut_bb_7_i_n5_v2[count]);
4128
+ }
4129
+
4130
+ void WaveshareEPaper7P5InV2alt::dump_config() {
4131
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
4132
+ ESP_LOGCONFIG(TAG, " Model: 7.5inV2");
4133
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
4134
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
4135
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
4136
+ LOG_UPDATE_INTERVAL(this);
4137
+ }
4138
+
4139
+ /* 7.50inV2 with partial and fast refresh */
4140
+ bool WaveshareEPaper7P5InV2P::wait_until_idle_() {
4141
+ if (this->busy_pin_ == nullptr) {
4142
+ return true;
4143
+ }
4144
+
4145
+ const uint32_t start = millis();
4146
+ while (this->busy_pin_->digital_read()) {
4147
+ this->command(0x71);
4148
+ if (millis() - start > this->idle_timeout_()) {
4149
+ ESP_LOGE(TAG, "Timeout while displaying image!");
4150
+ return false;
4151
+ }
4152
+ App.feed_wdt();
4153
+ delay(10);
4154
+ }
4155
+ return true;
4156
+ }
4157
+
4158
+ void WaveshareEPaper7P5InV2P::reset_() {
4159
+ if (this->reset_pin_ != nullptr) {
4160
+ this->reset_pin_->digital_write(true);
4161
+ delay(20);
4162
+ this->reset_pin_->digital_write(false);
4163
+ delay(2);
4164
+ this->reset_pin_->digital_write(true);
4165
+ delay(20);
4166
+ }
4167
+ }
4168
+
4169
+ void WaveshareEPaper7P5InV2P::turn_on_display_() {
4170
+ this->command(0x12);
4171
+ delay(100); // NOLINT
4172
+ this->wait_until_idle_();
4173
+ }
4174
+
4175
+ void WaveshareEPaper7P5InV2P::initialize() {
4176
+ this->reset_();
4177
+
4178
+ // COMMAND POWER SETTING
4179
+ this->command(0x01);
4180
+ this->data(0x07);
4181
+ this->data(0x07);
4182
+ this->data(0x3f);
4183
+ this->data(0x3f);
4184
+
4185
+ // COMMAND BOOSTER SOFT START
4186
+ this->command(0x06);
4187
+ this->data(0x17);
4188
+ this->data(0x17);
4189
+ this->data(0x28);
4190
+ this->data(0x17);
4191
+
4192
+ // COMMAND POWER DRIVER HAT UP
4193
+ this->command(0x04);
4194
+ delay(100); // NOLINT
4195
+ this->wait_until_idle_();
4196
+
4197
+ // COMMAND PANEL SETTING
4198
+ this->command(0x00);
4199
+ this->data(0x1F);
4200
+
4201
+ // COMMAND RESOLUTION SETTING
4202
+ this->command(0x61);
4203
+ this->data(0x03);
4204
+ this->data(0x20);
4205
+ this->data(0x01);
4206
+ this->data(0xE0);
4207
+
4208
+ // COMMAND DUAL SPI MM_EN, DUSPI_EN
4209
+ this->command(0x15);
4210
+ this->data(0x00);
4211
+
4212
+ // COMMAND VCOM AND DATA INTERVAL SETTING
4213
+ this->command(0x50);
4214
+ this->data(0x10);
4215
+ this->data(0x07);
4216
+
4217
+ // COMMAND TCON SETTING
4218
+ this->command(0x60);
4219
+ this->data(0x22);
4220
+
4221
+ // COMMAND ENABLE FAST UPDATE
4222
+ this->command(0xE0);
4223
+ this->data(0x02);
4224
+ this->command(0xE5);
4225
+ this->data(0x5A);
4226
+
4227
+ // COMMAND POWER DRIVER HAT DOWN
4228
+ this->command(0x02);
4229
+ }
4230
+
4231
+ void HOT WaveshareEPaper7P5InV2P::display() {
4232
+ uint32_t buf_len = this->get_buffer_length_();
4233
+
4234
+ // COMMAND POWER ON
4235
+ ESP_LOGI(TAG, "Power on the display and hat");
4236
+
4237
+ this->command(0x04);
4238
+ delay(200); // NOLINT
4239
+ this->wait_until_idle_();
4240
+
4241
+ if (this->full_update_every_ == 1) {
4242
+ this->command(0x13);
4243
+ for (uint32_t i = 0; i < buf_len; i++) {
4244
+ this->data(~(this->buffer_[i]));
4245
+ }
4246
+
4247
+ this->turn_on_display_();
4248
+
4249
+ this->command(0x02);
4250
+ this->wait_until_idle_();
4251
+ return;
4252
+ }
4253
+
4254
+ this->command(0x50);
4255
+ this->data(0xA9);
4256
+ this->data(0x07);
4257
+
4258
+ if (this->at_update_ == 0) {
4259
+ // Enable fast refresh
4260
+ this->command(0xE5);
4261
+ this->data(0x5A);
4262
+
4263
+ this->command(0x92);
4264
+
4265
+ this->command(0x10);
4266
+ delay(2);
4267
+ for (uint32_t i = 0; i < buf_len; i++) {
4268
+ this->data(~(this->buffer_[i]));
4269
+ }
4270
+
4271
+ delay(100); // NOLINT
4272
+ this->wait_until_idle_();
4273
+
4274
+ this->command(0x13);
4275
+ delay(2);
4276
+ for (uint32_t i = 0; i < buf_len; i++) {
4277
+ this->data(this->buffer_[i]);
4278
+ }
4279
+
4280
+ delay(100); // NOLINT
4281
+ this->wait_until_idle_();
4282
+
4283
+ this->turn_on_display_();
4284
+
4285
+ } else {
4286
+ // Enable partial refresh
4287
+ this->command(0xE5);
4288
+ this->data(0x6E);
4289
+
4290
+ // Activate partial refresh and set window bounds
4291
+ this->command(0x91);
4292
+ this->command(0x90);
4293
+
4294
+ this->data(0x00);
4295
+ this->data(0x00);
4296
+ this->data((get_width_internal() - 1) >> 8 & 0xFF);
4297
+ this->data((get_width_internal() - 1) & 0xFF);
4298
+
4299
+ this->data(0x00);
4300
+ this->data(0x00);
4301
+ this->data((get_height_internal() - 1) >> 8 & 0xFF);
4302
+ this->data((get_height_internal() - 1) & 0xFF);
4303
+
4304
+ this->data(0x01);
4305
+
4306
+ this->command(0x13);
4307
+ delay(2);
4308
+ for (uint32_t i = 0; i < buf_len; i++) {
4309
+ this->data(this->buffer_[i]);
4310
+ }
4311
+
4312
+ delay(100); // NOLINT
4313
+ this->wait_until_idle_();
4314
+
4315
+ this->turn_on_display_();
4316
+ }
4317
+
4318
+ ESP_LOGV(TAG, "Before command(0x02) (>> power off)");
4319
+ this->command(0x02);
4320
+ this->wait_until_idle_();
4321
+ ESP_LOGV(TAG, "After command(0x02) (>> power off)");
4322
+
4323
+ this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
4324
+ }
4325
+
4326
+ int WaveshareEPaper7P5InV2P::get_width_internal() { return 800; }
4327
+ int WaveshareEPaper7P5InV2P::get_height_internal() { return 480; }
4328
+ uint32_t WaveshareEPaper7P5InV2P::idle_timeout_() { return 10000; }
4329
+ void WaveshareEPaper7P5InV2P::dump_config() {
4330
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
4331
+ ESP_LOGCONFIG(TAG, " Model: 7.50inv2p");
4332
+ ESP_LOGCONFIG(TAG, " Full Update Every: %" PRIu32, this->full_update_every_);
4333
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
4334
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
4335
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
4336
+ LOG_UPDATE_INTERVAL(this);
4337
+ }
4338
+ void WaveshareEPaper7P5InV2P::set_full_update_every(uint32_t full_update_every) {
4339
+ this->full_update_every_ = full_update_every;
4340
+ }
4341
+
4342
+ /* 7.50in-bc */
4343
+ void WaveshareEPaper7P5InBC::initialize() {
4344
+ /* The command sequence is similar to the 7P5In display but differs in subtle ways
4345
+ to allow for faster updates. */
4346
+ // COMMAND POWER SETTING
4347
+ this->command(0x01);
4348
+ this->data(0x37);
4349
+ this->data(0x00);
4350
+
4351
+ // COMMAND PANEL SETTING
4352
+ this->command(0x00);
4353
+ this->data(0xCF);
4354
+ this->data(0x08);
4355
+
4356
+ // COMMAND PLL CONTROL
4357
+ this->command(0x30);
4358
+ this->data(0x3A);
4359
+
4360
+ // COMMAND VCM_DC_SETTING: all temperature range
4361
+ this->command(0x82);
4362
+ this->data(0x28);
4363
+
4364
+ // COMMAND BOOSTER SOFT START
4365
+ this->command(0x06);
4366
+ this->data(0xC7);
4367
+ this->data(0xCC);
4368
+ this->data(0x15);
4369
+
4370
+ // COMMAND VCOM AND DATA INTERVAL SETTING
4371
+ this->command(0x50);
4372
+ this->data(0x77);
4373
+
4374
+ // COMMAND TCON SETTING
4375
+ this->command(0x60);
4376
+ this->data(0x22);
4377
+
4378
+ // COMMAND FLASH CONTROL
4379
+ this->command(0x65);
4380
+ this->data(0x00);
4381
+
4382
+ // COMMAND RESOLUTION SETTING
4383
+ this->command(0x61);
4384
+ this->data(0x02); // 640 >> 8
4385
+ this->data(0x80);
4386
+ this->data(0x01); // 384 >> 8
4387
+ this->data(0x80);
4388
+
4389
+ // COMMAND FLASH MODE
4390
+ this->command(0xE5);
4391
+ this->data(0x03);
4392
+ }
4393
+
4394
+ void HOT WaveshareEPaper7P5InBC::display() {
4395
+ // COMMAND DATA START TRANSMISSION 1
4396
+ this->command(0x10);
4397
+ this->start_data_();
4398
+
4399
+ for (size_t i = 0; i < this->get_buffer_length_(); i++) {
4400
+ // A line of eight source pixels (each a bit in this byte)
4401
+ uint8_t eight_pixels = this->buffer_[i];
4402
+
4403
+ for (uint8_t j = 0; j < 8; j += 2) {
4404
+ /* For bichromatic displays, each byte represents two pixels. Each nibble encodes a pixel: 0=white, 3=black,
4405
+ 4=color. Therefore, e.g. 0x44 = two adjacent color pixels, 0x33 is two adjacent black pixels, etc. If you want
4406
+ to draw using the color pixels, change '0x30' with '0x40' and '0x03' with '0x04' below. */
4407
+ uint8_t left_nibble = (eight_pixels & 0x80) ? 0x30 : 0x00;
4408
+ eight_pixels <<= 1;
4409
+ uint8_t right_nibble = (eight_pixels & 0x80) ? 0x03 : 0x00;
4410
+ eight_pixels <<= 1;
4411
+ this->write_byte(left_nibble | right_nibble);
4412
+ }
4413
+ App.feed_wdt();
4414
+ }
4415
+ this->end_data_();
4416
+
4417
+ // Unlike the 7P5In display, we send the "power on" command here rather than during initialization
4418
+ // COMMAND POWER ON
4419
+ this->command(0x04);
4420
+
4421
+ // COMMAND DISPLAY REFRESH
4422
+ this->command(0x12);
4423
+ }
4424
+
4425
+ int WaveshareEPaper7P5InBC::get_width_internal() { return 640; }
4426
+
4427
+ int WaveshareEPaper7P5InBC::get_height_internal() { return 384; }
4428
+
4429
+ void WaveshareEPaper7P5InBC::dump_config() {
4430
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
4431
+ ESP_LOGCONFIG(TAG, " Model: 7.5in-bc");
4432
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
4433
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
4434
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
4435
+ LOG_UPDATE_INTERVAL(this);
4436
+ }
4437
+
4438
+ void WaveshareEPaper7P5InHDB::initialize() {
4439
+ this->command(0x12); // SWRESET
4440
+
4441
+ this->wait_until_idle_(); // waiting for the electronic paper IC to release the idle signal
4442
+
4443
+ this->command(0x46); // Auto Write RAM
4444
+ this->data(0xF7);
4445
+
4446
+ this->wait_until_idle_(); // waiting for the electronic paper IC to release the idle signal
4447
+
4448
+ this->command(0x47); // Auto Write RAM
4449
+ this->data(0xF7);
4450
+
4451
+ this->wait_until_idle_(); // waiting for the electronic paper IC to release the idle signal
4452
+
4453
+ this->command(0x0C); // Soft start setting
4454
+ this->data(0xAE);
4455
+ this->data(0xC7);
4456
+ this->data(0xC3);
4457
+ this->data(0xC0);
4458
+ this->data(0x40);
4459
+
4460
+ this->command(0x01); // Set MUX as 527
4461
+ this->data(0xAF);
4462
+ this->data(0x02);
4463
+ this->data(0x01);
4464
+
4465
+ this->command(0x11); // Data entry mode
4466
+ this->data(0x01);
4467
+
4468
+ this->command(0x44);
4469
+ this->data(0x00); // RAM x address start at 0
4470
+ this->data(0x00);
4471
+ this->data(0x6F); // RAM x address end at 36Fh -> 879
4472
+ this->data(0x03);
4473
+
4474
+ this->command(0x45);
4475
+ this->data(0xAF); // RAM y address start at 20Fh;
4476
+ this->data(0x02);
4477
+ this->data(0x00); // RAM y address end at 00h;
4478
+ this->data(0x00);
4479
+
4480
+ this->command(0x3C); // VBD
4481
+ this->data(0x01); // LUT1, for white
4482
+
4483
+ this->command(0x18);
4484
+ this->data(0x80);
4485
+
4486
+ this->command(0x22);
4487
+ this->data(0xB1); // Load Temperature and waveform setting.
4488
+
4489
+ this->command(0x20);
4490
+
4491
+ this->wait_until_idle_(); // waiting for the electronic paper IC to release the idle signal
4492
+
4493
+ this->command(0x4E);
4494
+ this->data(0x00);
4495
+ this->data(0x00);
4496
+
4497
+ this->command(0x4F);
4498
+ this->data(0xAF);
4499
+ this->data(0x02);
4500
+ }
4501
+
4502
+ void HOT WaveshareEPaper7P5InHDB::display() {
4503
+ this->command(0x4F);
4504
+ this->data(0xAf);
4505
+ this->data(0x02);
4506
+
4507
+ // BLACK
4508
+ this->command(0x24);
4509
+ this->start_data_();
4510
+ this->write_array(this->buffer_, this->get_buffer_length_());
4511
+ this->end_data_();
4512
+
4513
+ // RED
4514
+ this->command(0x26);
4515
+ this->start_data_();
4516
+ for (size_t i = 0; i < this->get_buffer_length_(); i++)
4517
+ this->write_byte(0x00);
4518
+ this->end_data_();
4519
+
4520
+ this->command(0x22);
4521
+ this->data(0xC7);
4522
+ this->command(0x20);
4523
+ delay(100); // NOLINT
4524
+ }
4525
+
4526
+ int WaveshareEPaper7P5InHDB::get_width_internal() { return 880; }
4527
+
4528
+ int WaveshareEPaper7P5InHDB::get_height_internal() { return 528; }
4529
+
4530
+ void WaveshareEPaper7P5InHDB::dump_config() {
4531
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
4532
+ ESP_LOGCONFIG(TAG, " Model: 7.5in-HD-b");
4533
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
4534
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
4535
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
4536
+ LOG_UPDATE_INTERVAL(this);
4537
+ }
4538
+
4539
+ static const uint8_t LUT_SIZE_TTGO_DKE_PART = 153;
4540
+
4541
+ static const uint8_t PART_UPDATE_LUT_TTGO_DKE[LUT_SIZE_TTGO_DKE_PART] = {
4542
+ 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4543
+ 0x0, 0x0, 0x0, 0x0, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0,
4544
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4545
+ 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4546
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4547
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4548
+ 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4549
+ 0x0, 0x0, 0x0, 0x0, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x0, 0x0, 0x0,
4550
+ // 0x22, 0x17, 0x41, 0x0, 0x32, 0x32
4551
+ };
4552
+
4553
+ void WaveshareEPaper2P13InDKE::initialize() {}
4554
+ void HOT WaveshareEPaper2P13InDKE::display() {
4555
+ bool partial = this->at_update_ != 0;
4556
+ this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
4557
+
4558
+ if (partial) {
4559
+ ESP_LOGI(TAG, "Performing partial e-paper update.");
4560
+ } else {
4561
+ ESP_LOGI(TAG, "Performing full e-paper update.");
4562
+ }
4563
+
4564
+ // start and set up data format
4565
+ this->command(0x12);
4566
+ this->wait_until_idle_();
4567
+
4568
+ this->command(0x11);
4569
+ this->data(0x03);
4570
+ this->command(0x44);
4571
+ this->data(1);
4572
+ this->data(this->get_width_internal() / 8);
4573
+ this->command(0x45);
4574
+ this->data(0);
4575
+ this->data(0);
4576
+ this->data(this->get_height_internal());
4577
+ this->data(0);
4578
+ this->command(0x4e);
4579
+ this->data(1);
4580
+ this->command(0x4f);
4581
+ this->data(0);
4582
+ this->data(0);
4583
+
4584
+ if (!partial) {
4585
+ // send data
4586
+ this->command(0x24);
4587
+ this->start_data_();
4588
+ this->write_array(this->buffer_, this->get_buffer_length_());
4589
+ this->end_data_();
4590
+
4591
+ // commit
4592
+ this->command(0x20);
4593
+ this->wait_until_idle_();
4594
+ } else {
4595
+ // set up partial update
4596
+ this->command(0x32);
4597
+ this->start_data_();
4598
+ this->write_array(PART_UPDATE_LUT_TTGO_DKE, sizeof(PART_UPDATE_LUT_TTGO_DKE));
4599
+ this->end_data_();
4600
+ this->command(0x3F);
4601
+ this->data(0x22);
4602
+
4603
+ this->command(0x03);
4604
+ this->data(0x17);
4605
+ this->command(0x04);
4606
+ this->data(0x41);
4607
+ this->data(0x00);
4608
+ this->data(0x32);
4609
+ this->command(0x2C);
4610
+ this->data(0x32);
4611
+
4612
+ this->command(0x37);
4613
+ this->data(0x00);
4614
+ this->data(0x00);
4615
+ this->data(0x00);
4616
+ this->data(0x00);
4617
+ this->data(0x00);
4618
+ this->data(0x40);
4619
+ this->data(0x00);
4620
+ this->data(0x00);
4621
+ this->data(0x00);
4622
+ this->data(0x00);
4623
+
4624
+ this->command(0x3C);
4625
+ this->data(0x80);
4626
+ this->command(0x22);
4627
+ this->data(0xC0);
4628
+ this->command(0x20);
4629
+ this->wait_until_idle_();
4630
+
4631
+ // send data
4632
+ this->command(0x24);
4633
+ this->start_data_();
4634
+ this->write_array(this->buffer_, this->get_buffer_length_());
4635
+ this->end_data_();
4636
+
4637
+ // commit as partial
4638
+ this->command(0x22);
4639
+ this->data(0xCF);
4640
+ this->command(0x20);
4641
+ this->wait_until_idle_();
4642
+
4643
+ // data must be sent again on partial update
4644
+ this->command(0x24);
4645
+ this->start_data_();
4646
+ this->write_array(this->buffer_, this->get_buffer_length_());
4647
+ this->end_data_();
4648
+ }
4649
+
4650
+ ESP_LOGI(TAG, "Completed e-paper update.");
4651
+ }
4652
+
4653
+ int WaveshareEPaper2P13InDKE::get_width_internal() { return 128; }
4654
+ int WaveshareEPaper2P13InDKE::get_height_internal() { return 250; }
4655
+ uint32_t WaveshareEPaper2P13InDKE::idle_timeout_() { return 5000; }
4656
+ void WaveshareEPaper2P13InDKE::dump_config() {
4657
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
4658
+ ESP_LOGCONFIG(TAG, " Model: 2.13inDKE");
4659
+ LOG_PIN(" CS Pin: ", this->cs_);
4660
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
4661
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
4662
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
4663
+ LOG_UPDATE_INTERVAL(this);
4664
+ }
4665
+
4666
+ void WaveshareEPaper2P13InDKE::set_full_update_every(uint32_t full_update_every) {
4667
+ this->full_update_every_ = full_update_every;
4668
+ }
4669
+
4670
+ // ========================================================
4671
+ // 13.3in (K version)
4672
+ // Datasheet/Specification/Reference:
4673
+ // - https://files.waveshare.com/wiki/13.3inch-e-Paper-HAT-(K)/13.3-inch-e-Paper-(K)-user-manual.pdf
4674
+ // - https://github.com/waveshareteam/e-Paper/tree/master/Arduino/epd13in3k
4675
+ // ========================================================
4676
+
4677
+ // using default wait_until_idle_() function
4678
+ void WaveshareEPaper13P3InK::initialize() {
4679
+ this->wait_until_idle_();
4680
+ this->command(0x12); // SWRESET
4681
+ this->wait_until_idle_();
4682
+
4683
+ this->command(0x0c); // set soft start
4684
+ this->data(0xae);
4685
+ this->data(0xc7);
4686
+ this->data(0xc3);
4687
+ this->data(0xc0);
4688
+ this->data(0x80);
4689
+
4690
+ this->command(0x01); // driver output control
4691
+ this->data((get_height_internal() - 1) % 256); // Y
4692
+ this->data((get_height_internal() - 1) / 256); // Y
4693
+ this->data(0x00);
4694
+
4695
+ this->command(0x11); // data entry mode
4696
+ this->data(0x03);
4697
+
4698
+ // SET WINDOWS
4699
+ // XRAM_START_AND_END_POSITION
4700
+ this->command(0x44);
4701
+ this->data(0 & 0xFF);
4702
+ this->data((0 >> 8) & 0x03);
4703
+ this->data((get_width_internal() - 1) & 0xFF);
4704
+ this->data(((get_width_internal() - 1) >> 8) & 0x03);
4705
+ // YRAM_START_AND_END_POSITION
4706
+ this->command(0x45);
4707
+ this->data(0 & 0xFF);
4708
+ this->data((0 >> 8) & 0x03);
4709
+ this->data((get_height_internal() - 1) & 0xFF);
4710
+ this->data(((get_height_internal() - 1) >> 8) & 0x03);
4711
+
4712
+ this->command(0x3C); // Border setting
4713
+ this->data(0x01);
4714
+
4715
+ this->command(0x18); // use the internal temperature sensor
4716
+ this->data(0x80);
4717
+
4718
+ // SET CURSOR
4719
+ // XRAM_ADDRESS
4720
+ this->command(0x4E);
4721
+ this->data(0 & 0xFF);
4722
+ this->data((0 >> 8) & 0x03);
4723
+ // YRAM_ADDRESS
4724
+ this->command(0x4F);
4725
+ this->data(0 & 0xFF);
4726
+ this->data((0 >> 8) & 0x03);
4727
+ }
4728
+ void HOT WaveshareEPaper13P3InK::display() {
4729
+ // do single full update
4730
+ this->command(0x24);
4731
+ this->start_data_();
4732
+ this->write_array(this->buffer_, this->get_buffer_length_());
4733
+ this->end_data_();
4734
+
4735
+ // COMMAND DISPLAY REFRESH
4736
+ this->command(0x22);
4737
+ this->data(0xF7);
4738
+ this->command(0x20);
4739
+ }
4740
+
4741
+ int WaveshareEPaper13P3InK::get_width_internal() { return 960; }
4742
+ int WaveshareEPaper13P3InK::get_height_internal() { return 680; }
4743
+ uint32_t WaveshareEPaper13P3InK::idle_timeout_() { return 10000; }
4744
+ void WaveshareEPaper13P3InK::dump_config() {
4745
+ LOG_DISPLAY("", "Waveshare E-Paper", this);
4746
+ ESP_LOGCONFIG(TAG, " Model: 13.3inK");
4747
+ LOG_PIN(" Reset Pin: ", this->reset_pin_);
4748
+ LOG_PIN(" DC Pin: ", this->dc_pin_);
4749
+ LOG_PIN(" Busy Pin: ", this->busy_pin_);
4750
+ LOG_UPDATE_INTERVAL(this);
4751
+ }
4752
+
4753
+ } // namespace waveshare_epaper
4754
+ } // namespace esphome