esphome 2025.4.2__py3-none-any.whl → 2025.5.0b3__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.
- esphome/__main__.py +16 -14
- esphome/components/ac_dimmer/ac_dimmer.cpp +3 -2
- esphome/components/adc/__init__.py +51 -34
- esphome/components/airthings_wave_base/__init__.py +1 -1
- esphome/components/alarm_control_panel/__init__.py +37 -2
- esphome/components/am43/cover/__init__.py +4 -5
- esphome/components/analog_threshold/analog_threshold_binary_sensor.cpp +6 -4
- esphome/components/analog_threshold/analog_threshold_binary_sensor.h +4 -5
- esphome/components/analog_threshold/binary_sensor.py +10 -8
- esphome/components/anova/climate.py +4 -5
- esphome/components/api/__init__.py +25 -8
- esphome/components/api/api_connection.cpp +81 -13
- esphome/components/api/api_connection.h +13 -1
- esphome/components/api/api_frame_helper.cpp +232 -177
- esphome/components/api/api_frame_helper.h +61 -8
- esphome/components/api/api_noise_context.h +13 -4
- esphome/components/api/api_pb2.cpp +1422 -1
- esphome/components/api/api_pb2.h +255 -1
- esphome/components/api/api_pb2_service.cpp +162 -49
- esphome/components/api/api_pb2_service.h +90 -51
- esphome/components/api/api_pb2_size.h +361 -0
- esphome/components/api/api_server.cpp +110 -34
- esphome/components/api/api_server.h +8 -0
- esphome/components/api/proto.h +86 -17
- esphome/components/as7341/as7341.h +1 -1
- esphome/components/atm90e32/__init__.py +1 -0
- esphome/components/atm90e32/atm90e32.cpp +576 -199
- esphome/components/atm90e32/atm90e32.h +128 -31
- esphome/components/atm90e32/atm90e32_reg.h +4 -2
- esphome/components/atm90e32/button/__init__.py +62 -10
- esphome/components/atm90e32/button/atm90e32_button.cpp +63 -4
- esphome/components/atm90e32/button/atm90e32_button.h +36 -4
- esphome/components/atm90e32/number/__init__.py +130 -0
- esphome/components/atm90e32/number/atm90e32_number.h +16 -0
- esphome/components/atm90e32/sensor.py +21 -4
- esphome/components/atm90e32/text_sensor/__init__.py +48 -0
- esphome/components/audio/__init__.py +96 -49
- esphome/components/audio/audio.h +48 -0
- esphome/components/audio/audio_decoder.cpp +1 -1
- esphome/components/audio/audio_resampler.cpp +2 -0
- esphome/components/audio/audio_resampler.h +1 -0
- esphome/components/ballu/climate.py +2 -9
- esphome/components/bang_bang/climate.py +5 -6
- esphome/components/bedjet/bedjet_hub.cpp +1 -0
- esphome/components/bedjet/climate/__init__.py +3 -8
- esphome/components/bedjet/fan/__init__.py +2 -11
- esphome/components/binary/fan/__init__.py +13 -16
- esphome/components/binary_sensor/__init__.py +13 -10
- esphome/components/bl0906/constants.h +16 -16
- esphome/components/ble_client/text_sensor/__init__.py +3 -5
- esphome/components/bluetooth_proxy/bluetooth_connection.cpp +4 -6
- esphome/components/bluetooth_proxy/bluetooth_proxy.cpp +136 -21
- esphome/components/bluetooth_proxy/bluetooth_proxy.h +7 -0
- esphome/components/button/__init__.py +11 -8
- esphome/components/canbus/canbus.cpp +3 -0
- esphome/components/canbus/canbus.h +16 -0
- esphome/components/ccs811/sensor.py +9 -6
- esphome/components/climate/__init__.py +35 -2
- esphome/components/climate/climate_mode.h +1 -1
- esphome/components/climate/climate_traits.h +63 -57
- esphome/components/climate_ir/__init__.py +57 -17
- esphome/components/climate_ir_lg/climate.py +2 -5
- esphome/components/climate_ir_lg/climate_ir_lg.cpp +7 -7
- esphome/components/climate_ir_lg/climate_ir_lg.h +1 -1
- esphome/components/color/__init__.py +2 -0
- esphome/components/const/__init__.py +5 -0
- esphome/components/coolix/climate.py +2 -9
- esphome/components/copy/cover/__init__.py +10 -9
- esphome/components/copy/fan/__init__.py +11 -9
- esphome/components/copy/lock/__init__.py +11 -9
- esphome/components/copy/text/__init__.py +9 -6
- esphome/components/cover/__init__.py +37 -2
- esphome/components/cse7766/cse7766.cpp +2 -1
- esphome/components/cst226/binary_sensor/__init__.py +28 -0
- esphome/components/cst226/binary_sensor/cs226_button.h +22 -0
- esphome/components/cst226/binary_sensor/cstt6_button.cpp +19 -0
- esphome/components/cst226/touchscreen/cst226_touchscreen.cpp +27 -5
- esphome/components/cst226/touchscreen/cst226_touchscreen.h +10 -10
- esphome/components/current_based/cover.py +37 -36
- esphome/components/current_based/current_based_cover.cpp +2 -1
- esphome/components/daikin/climate.py +2 -9
- esphome/components/daikin/daikin.cpp +15 -9
- esphome/components/daikin/daikin.h +5 -5
- esphome/components/daikin_arc/climate.py +2 -7
- esphome/components/daikin_brc/climate.py +3 -5
- esphome/components/dallas_temp/dallas_temp.cpp +17 -24
- esphome/components/dallas_temp/dallas_temp.h +0 -1
- esphome/components/daly_bms/daly_bms.cpp +2 -1
- esphome/components/debug/debug_component.cpp +6 -1
- esphome/components/debug/debug_component.h +6 -0
- esphome/components/debug/debug_esp32.cpp +109 -254
- esphome/components/debug/sensor.py +14 -0
- esphome/components/deep_sleep/deep_sleep_esp32.cpp +13 -1
- esphome/components/delonghi/climate.py +2 -9
- esphome/components/demo/__init__.py +18 -20
- esphome/components/dfrobot_sen0395/switch/__init__.py +21 -22
- esphome/components/dps310/sensor.py +6 -6
- esphome/components/ee895/sensor.py +9 -9
- esphome/components/emmeti/climate.py +2 -9
- esphome/components/endstop/cover.py +17 -16
- esphome/components/endstop/endstop_cover.cpp +2 -1
- esphome/components/ens160_base/__init__.py +12 -9
- esphome/components/esp32/__init__.py +60 -3
- esphome/components/esp32/core.cpp +11 -5
- esphome/components/esp32/gpio.cpp +86 -24
- esphome/components/esp32/gpio.py +15 -16
- esphome/components/esp32/gpio_esp32.py +1 -2
- esphome/components/esp32/gpio_esp32_c2.py +1 -1
- esphome/components/esp32/gpio_esp32_c3.py +1 -1
- esphome/components/esp32/gpio_esp32_c6.py +1 -1
- esphome/components/esp32/gpio_esp32_h2.py +1 -1
- esphome/components/esp32_ble/ble.cpp +1 -0
- esphome/components/esp32_ble/ble.h +5 -3
- esphome/components/esp32_ble/ble_advertising.cpp +2 -1
- esphome/components/esp32_ble/ble_advertising.h +1 -0
- esphome/components/esp32_ble_server/__init__.py +3 -0
- esphome/components/esp32_ble_tracker/__init__.py +7 -1
- esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp +192 -118
- esphome/components/esp32_ble_tracker/esp32_ble_tracker.h +29 -3
- esphome/components/esp32_camera/esp32_camera.cpp +2 -1
- esphome/components/esp32_camera/esp32_camera.h +1 -1
- esphome/components/esp32_can/esp32_can.cpp +1 -1
- esphome/components/esp32_improv/esp32_improv_component.cpp +1 -1
- esphome/components/esp32_rmt_led_strip/led_strip.cpp +1 -1
- esphome/components/esp32_rmt_led_strip/led_strip.h +7 -5
- esphome/components/esp32_rmt_led_strip/light.py +9 -1
- esphome/components/esp32_touch/esp32_touch.cpp +1 -1
- esphome/components/esp8266/gpio.cpp +69 -8
- esphome/components/ethernet/ethernet_component.cpp +1 -1
- esphome/components/event/__init__.py +13 -10
- esphome/components/factory_reset/switch/__init__.py +7 -21
- esphome/components/fan/__init__.py +52 -5
- esphome/components/fastled_base/__init__.py +1 -4
- esphome/components/fastled_base/fastled_light.cpp +1 -1
- esphome/components/feedback/cover.py +38 -33
- esphome/components/feedback/feedback_cover.cpp +2 -1
- esphome/components/fujitsu_general/climate.py +2 -9
- esphome/components/gcja5/gcja5.cpp +2 -1
- esphome/components/gpio/one_wire/gpio_one_wire.cpp +45 -43
- esphome/components/gpio/one_wire/gpio_one_wire.h +2 -1
- esphome/components/gpio_expander/cached_gpio.h +22 -7
- esphome/components/gps/__init__.py +47 -17
- esphome/components/gps/gps.cpp +42 -23
- esphome/components/gps/gps.h +17 -13
- esphome/components/graph/__init__.py +1 -2
- esphome/components/gree/climate.py +4 -6
- esphome/components/gree/gree.cpp +16 -2
- esphome/components/gree/gree.h +2 -2
- esphome/components/growatt_solar/growatt_solar.cpp +2 -1
- esphome/components/haier/climate.py +37 -34
- esphome/components/hbridge/fan/__init__.py +19 -17
- esphome/components/he60r/cover.py +4 -5
- esphome/components/heatpumpir/climate.py +3 -6
- esphome/components/hitachi_ac344/climate.py +2 -9
- esphome/components/hitachi_ac424/climate.py +2 -9
- esphome/components/hm3301/hm3301.h +1 -1
- esphome/components/hte501/sensor.py +6 -6
- esphome/components/http_request/__init__.py +39 -6
- esphome/components/http_request/http_request.cpp +20 -0
- esphome/components/http_request/http_request.h +57 -15
- esphome/components/http_request/http_request_arduino.cpp +22 -6
- esphome/components/http_request/http_request_arduino.h +4 -3
- esphome/components/http_request/http_request_host.cpp +141 -0
- esphome/components/http_request/http_request_host.h +37 -0
- esphome/components/http_request/http_request_idf.cpp +35 -3
- esphome/components/http_request/http_request_idf.h +10 -3
- esphome/components/http_request/httplib.h +9691 -0
- esphome/components/http_request/update/__init__.py +11 -8
- esphome/components/hyt271/sensor.py +6 -6
- esphome/components/i2c/i2c.h +4 -0
- esphome/components/i2c/i2c_bus_esp_idf.cpp +1 -1
- esphome/components/i2s_audio/__init__.py +131 -22
- esphome/components/i2s_audio/i2s_audio.h +44 -4
- esphome/components/i2s_audio/media_player/__init__.py +19 -9
- esphome/components/i2s_audio/microphone/__init__.py +63 -5
- esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp +351 -61
- esphome/components/i2s_audio/microphone/i2s_audio_microphone.h +40 -6
- esphome/components/i2s_audio/speaker/__init__.py +31 -5
- esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp +155 -19
- esphome/components/i2s_audio/speaker/i2s_audio_speaker.h +17 -4
- esphome/components/ili9xxx/ili9xxx_init.h +1 -1
- esphome/components/image/__init__.py +37 -17
- esphome/components/image/image.cpp +25 -8
- esphome/components/internal_temperature/internal_temperature.cpp +6 -4
- esphome/components/key_collector/__init__.py +35 -0
- esphome/components/key_collector/key_collector.cpp +8 -0
- esphome/components/key_collector/key_collector.h +10 -0
- esphome/components/kuntze/kuntze.cpp +2 -1
- esphome/components/ld2410/ld2410.h +1 -1
- esphome/components/ld2450/ld2450.h +1 -1
- esphome/components/light/__init__.py +57 -0
- esphome/components/lock/__init__.py +51 -4
- esphome/components/lock/automation.h +2 -13
- esphome/components/logger/__init__.py +22 -0
- esphome/components/logger/logger.cpp +154 -103
- esphome/components/logger/logger.h +211 -36
- esphome/components/logger/task_log_buffer.cpp +138 -0
- esphome/components/logger/task_log_buffer.h +69 -0
- esphome/components/lvgl/__init__.py +13 -5
- esphome/components/lvgl/automation.py +50 -1
- esphome/components/lvgl/defines.py +0 -1
- esphome/components/lvgl/lvgl_esphome.cpp +5 -1
- esphome/components/lvgl/text/__init__.py +1 -2
- esphome/components/mapping/__init__.py +134 -0
- esphome/components/matrix_keypad/matrix_keypad.cpp +2 -1
- esphome/components/max7219digit/max7219digit.cpp +28 -27
- esphome/components/mdns/__init__.py +11 -5
- esphome/components/mdns/mdns_component.cpp +11 -5
- esphome/components/mdns/mdns_component.h +3 -2
- esphome/components/mdns/mdns_esp32.cpp +4 -3
- esphome/components/mdns/mdns_esp8266.cpp +4 -2
- esphome/components/mdns/mdns_libretiny.cpp +4 -2
- esphome/components/mdns/mdns_rp2040.cpp +4 -2
- esphome/components/media_player/__init__.py +33 -1
- esphome/components/mhz19/sensor.py +11 -7
- esphome/components/micro_wake_word/__init__.py +99 -31
- esphome/components/micro_wake_word/automation.h +54 -0
- esphome/components/micro_wake_word/micro_wake_word.cpp +331 -319
- esphome/components/micro_wake_word/micro_wake_word.h +58 -105
- esphome/components/micro_wake_word/preprocessor_settings.h +19 -2
- esphome/components/micro_wake_word/streaming_model.cpp +158 -41
- esphome/components/micro_wake_word/streaming_model.h +85 -13
- esphome/components/microphone/__init__.py +139 -9
- esphome/components/microphone/automation.h +14 -2
- esphome/components/microphone/microphone.cpp +21 -0
- esphome/components/microphone/microphone.h +14 -5
- esphome/components/microphone/microphone_source.cpp +95 -0
- esphome/components/microphone/microphone_source.h +80 -0
- esphome/components/mics_4514/sensor.py +25 -14
- esphome/components/midea/climate.py +3 -4
- esphome/components/midea_ir/climate.py +3 -5
- esphome/components/mipi_spi/__init__.py +15 -0
- esphome/components/mipi_spi/display.py +474 -0
- esphome/components/mipi_spi/mipi_spi.cpp +481 -0
- esphome/components/mipi_spi/mipi_spi.h +171 -0
- esphome/components/mipi_spi/models/__init__.py +65 -0
- esphome/components/mipi_spi/models/amoled.py +72 -0
- esphome/components/mipi_spi/models/commands.py +82 -0
- esphome/components/mipi_spi/models/cyd.py +10 -0
- esphome/components/mipi_spi/models/ili.py +749 -0
- esphome/components/mipi_spi/models/jc.py +260 -0
- esphome/components/mipi_spi/models/lanbon.py +15 -0
- esphome/components/mipi_spi/models/lilygo.py +60 -0
- esphome/components/mipi_spi/models/waveshare.py +139 -0
- esphome/components/mitsubishi/climate.py +2 -5
- esphome/components/mitsubishi/mitsubishi.cpp +9 -9
- esphome/components/mixer/speaker/mixer_speaker.cpp +12 -22
- esphome/components/mixer/speaker/mixer_speaker.h +1 -3
- esphome/components/mlx90393/sensor.py +5 -0
- esphome/components/mlx90393/sensor_mlx90393.cpp +195 -13
- esphome/components/mlx90393/sensor_mlx90393.h +21 -4
- esphome/components/modbus/modbus.cpp +2 -1
- esphome/components/mqtt/__init__.py +1 -1
- esphome/components/mqtt/mqtt_client.cpp +6 -2
- esphome/components/mqtt/mqtt_const.h +4 -0
- esphome/components/mqtt/mqtt_fan.cpp +39 -0
- esphome/components/mqtt/mqtt_fan.h +2 -0
- esphome/components/ms5611/sensor.py +6 -6
- esphome/components/ms8607/sensor.py +3 -3
- esphome/components/network/__init__.py +1 -1
- esphome/components/nextion/base_component.py +17 -16
- esphome/components/nextion/display.py +11 -2
- esphome/components/nextion/nextion.cpp +39 -1
- esphome/components/nextion/nextion.h +50 -0
- esphome/components/noblex/climate.py +2 -9
- esphome/components/number/__init__.py +12 -9
- esphome/components/one_wire/one_wire_bus.cpp +14 -10
- esphome/components/one_wire/one_wire_bus.h +14 -8
- esphome/components/online_image/bmp_image.cpp +48 -11
- esphome/components/online_image/bmp_image.h +2 -0
- esphome/components/opentherm/binary_sensor/__init__.py +2 -4
- esphome/components/opentherm/number/__init__.py +11 -20
- esphome/components/opentherm/sensor/__init__.py +3 -3
- esphome/components/opentherm/switch/__init__.py +3 -5
- esphome/components/output/lock/__init__.py +11 -9
- esphome/components/packages/__init__.py +33 -31
- esphome/components/packet_transport/__init__.py +201 -0
- esphome/components/packet_transport/binary_sensor.py +19 -0
- esphome/components/packet_transport/packet_transport.cpp +534 -0
- esphome/components/packet_transport/packet_transport.h +154 -0
- esphome/components/packet_transport/sensor.py +19 -0
- esphome/components/pca9685/pca9685_output.cpp +2 -1
- esphome/components/pid/climate.py +2 -4
- esphome/components/pm2005/__init__.py +1 -0
- esphome/components/pm2005/pm2005.cpp +123 -0
- esphome/components/pm2005/pm2005.h +46 -0
- esphome/components/pm2005/sensor.py +86 -0
- esphome/components/pmsa003i/pmsa003i.cpp +43 -16
- esphome/components/pmsa003i/pmsa003i.h +25 -25
- esphome/components/pmsx003/pmsx003.cpp +195 -230
- esphome/components/pmsx003/pmsx003.h +51 -33
- esphome/components/pmsx003/sensor.py +21 -11
- esphome/components/pn7150/pn7150.h +2 -2
- esphome/components/pn7160/pn7160.h +2 -2
- esphome/components/prometheus/prometheus_handler.cpp +174 -0
- esphome/components/prometheus/prometheus_handler.h +17 -0
- esphome/components/psram/__init__.py +7 -5
- esphome/components/pulse_meter/pulse_meter_sensor.cpp +32 -12
- esphome/components/pulse_meter/pulse_meter_sensor.h +5 -5
- esphome/components/pzem004t/pzem004t.cpp +2 -1
- esphome/components/qspi_dbi/__init__.py +0 -1
- esphome/components/qspi_dbi/display.py +2 -1
- esphome/components/qspi_dbi/models.py +1 -2
- esphome/components/remote_base/__init__.py +91 -0
- esphome/components/remote_base/beo4_protocol.cpp +153 -0
- esphome/components/remote_base/beo4_protocol.h +43 -0
- esphome/components/remote_base/gobox_protocol.cpp +131 -0
- esphome/components/remote_base/gobox_protocol.h +54 -0
- esphome/components/remote_receiver/remote_receiver_esp32.cpp +16 -9
- esphome/components/resampler/speaker/resampler_speaker.cpp +12 -10
- esphome/components/resampler/speaker/resampler_speaker.h +1 -1
- esphome/components/rf_bridge/rf_bridge.cpp +2 -1
- esphome/components/scd30/sensor.py +2 -3
- esphome/components/scd4x/sensor.py +4 -5
- esphome/components/sdp3x/sensor.py +2 -1
- esphome/components/sds011/sds011.cpp +2 -1
- esphome/components/select/__init__.py +19 -20
- esphome/components/sen5x/sen5x.cpp +55 -36
- esphome/components/sen5x/sensor.py +1 -1
- esphome/components/senseair/sensor.py +3 -3
- esphome/components/sensor/__init__.py +158 -14
- esphome/components/sensor/filter.cpp +23 -0
- esphome/components/sensor/filter.h +22 -0
- esphome/components/sgp30/sensor.py +14 -16
- esphome/components/sgp4x/sensor.py +1 -1
- esphome/components/sht4x/sht4x.cpp +43 -22
- esphome/components/sht4x/sht4x.h +1 -1
- esphome/components/shtcx/sensor.py +6 -6
- esphome/components/slow_pwm/slow_pwm_output.cpp +2 -1
- esphome/components/sml/text_sensor/__init__.py +4 -6
- esphome/components/sound_level/__init__.py +0 -0
- esphome/components/sound_level/sensor.py +97 -0
- esphome/components/sound_level/sound_level.cpp +194 -0
- esphome/components/sound_level/sound_level.h +73 -0
- esphome/components/speaker/media_player/__init__.py +4 -8
- esphome/components/speaker/media_player/speaker_media_player.cpp +0 -18
- esphome/components/speaker/media_player/speaker_media_player.h +0 -11
- esphome/components/speaker/speaker.h +4 -7
- esphome/components/speed/fan/__init__.py +17 -16
- esphome/components/spi/spi.h +11 -1
- esphome/components/sprinkler/__init__.py +18 -19
- esphome/components/sprinkler/sprinkler.cpp +6 -5
- esphome/components/switch/__init__.py +32 -42
- esphome/components/syslog/__init__.py +41 -0
- esphome/components/syslog/esphome_syslog.cpp +49 -0
- esphome/components/syslog/esphome_syslog.h +27 -0
- esphome/components/t6615/sensor.py +3 -3
- esphome/components/t6615/t6615.cpp +2 -1
- esphome/components/tca9555/tca9555.cpp +11 -6
- esphome/components/tcl112/climate.py +2 -9
- esphome/components/template/alarm_control_panel/__init__.py +7 -6
- esphome/components/template/alarm_control_panel/template_alarm_control_panel.cpp +21 -17
- esphome/components/template/alarm_control_panel/template_alarm_control_panel.h +2 -1
- esphome/components/template/cover/__init__.py +27 -21
- esphome/components/template/fan/__init__.py +14 -12
- esphome/components/template/lock/__init__.py +20 -25
- esphome/components/template/lock/automation.h +18 -0
- esphome/components/template/text/__init__.py +4 -3
- esphome/components/template/valve/__init__.py +32 -21
- esphome/components/template/valve/automation.h +24 -0
- esphome/components/text/__init__.py +32 -1
- esphome/components/text_sensor/__init__.py +24 -29
- esphome/components/thermostat/climate.py +5 -5
- esphome/components/time_based/cover.py +17 -16
- esphome/components/time_based/time_based_cover.cpp +2 -1
- esphome/components/tm1638/switch/__init__.py +10 -7
- esphome/components/tormatic/cover.py +4 -5
- esphome/components/toshiba/climate.py +3 -5
- esphome/components/touchscreen/touchscreen.cpp +3 -1
- esphome/components/tuya/climate/__init__.py +5 -6
- esphome/components/tuya/cover/__init__.py +6 -11
- esphome/components/tuya/select/__init__.py +15 -5
- esphome/components/tuya/select/tuya_select.cpp +6 -1
- esphome/components/tuya/select/tuya_select.h +5 -1
- esphome/components/uart/packet_transport/__init__.py +20 -0
- esphome/components/uart/packet_transport/uart_transport.cpp +88 -0
- esphome/components/uart/packet_transport/uart_transport.h +41 -0
- esphome/components/uart/switch/uart_switch.cpp +2 -1
- esphome/components/udp/__init__.py +126 -128
- esphome/components/udp/automation.h +40 -0
- esphome/components/udp/binary_sensor.py +3 -25
- esphome/components/udp/packet_transport/__init__.py +29 -0
- esphome/components/udp/packet_transport/udp_transport.cpp +36 -0
- esphome/components/udp/packet_transport/udp_transport.h +28 -0
- esphome/components/udp/sensor.py +3 -25
- esphome/components/udp/udp_component.cpp +26 -470
- esphome/components/udp/udp_component.h +21 -128
- esphome/components/update/__init__.py +31 -1
- esphome/components/uponor_smatrix/climate/__init__.py +4 -9
- esphome/components/uponor_smatrix/climate/uponor_smatrix_climate.cpp +2 -1
- esphome/components/uponor_smatrix/uponor_smatrix.cpp +2 -1
- esphome/components/uptime/text_sensor/__init__.py +47 -7
- esphome/components/uptime/text_sensor/uptime_text_sensor.cpp +12 -7
- esphome/components/uptime/text_sensor/uptime_text_sensor.h +19 -0
- esphome/components/valve/__init__.py +34 -3
- esphome/components/valve/automation.h +1 -19
- esphome/components/vl53l0x/sensor.py +11 -0
- esphome/components/vl53l0x/vl53l0x_sensor.cpp +5 -1
- esphome/components/vl53l0x/vl53l0x_sensor.h +2 -1
- esphome/components/voice_assistant/__init__.py +36 -10
- esphome/components/voice_assistant/voice_assistant.cpp +170 -144
- esphome/components/voice_assistant/voice_assistant.h +26 -25
- esphome/components/waveshare_epaper/display.py +6 -0
- esphome/components/waveshare_epaper/waveshare_epaper.cpp +439 -37
- esphome/components/waveshare_epaper/waveshare_epaper.h +60 -11
- esphome/components/whirlpool/climate.py +3 -5
- esphome/components/whynter/climate.py +3 -5
- esphome/components/xpt2046/touchscreen/xpt2046.cpp +1 -1
- esphome/components/yashima/climate.py +6 -6
- esphome/components/zhlt01/climate.py +2 -7
- esphome/config.py +13 -13
- esphome/config_validation.py +38 -58
- esphome/const.py +15 -1
- esphome/core/__init__.py +2 -0
- esphome/core/application.cpp +23 -10
- esphome/core/application.h +9 -1
- esphome/core/automation.h +4 -3
- esphome/core/component.cpp +28 -7
- esphome/core/component.h +10 -1
- esphome/core/defines.h +23 -17
- esphome/core/macros.h +4 -0
- esphome/core/scheduler.cpp +7 -1
- esphome/cpp_generator.py +6 -2
- esphome/dashboard/web_server.py +3 -3
- esphome/helpers.py +39 -0
- esphome/loader.py +4 -0
- esphome/log.py +15 -19
- esphome/mqtt.py +23 -10
- esphome/platformio_api.py +1 -1
- esphome/schema_extractors.py +0 -1
- esphome/voluptuous_schema.py +3 -1
- esphome/vscode.py +15 -0
- esphome/wizard.py +47 -37
- esphome/zeroconf.py +7 -3
- {esphome-2025.4.2.dist-info → esphome-2025.5.0b3.dist-info}/METADATA +10 -11
- {esphome-2025.4.2.dist-info → esphome-2025.5.0b3.dist-info}/RECORD +440 -380
- {esphome-2025.4.2.dist-info → esphome-2025.5.0b3.dist-info}/WHEEL +1 -1
- {esphome-2025.4.2.dist-info → esphome-2025.5.0b3.dist-info}/entry_points.txt +0 -0
- {esphome-2025.4.2.dist-info → esphome-2025.5.0b3.dist-info}/licenses/LICENSE +0 -0
- {esphome-2025.4.2.dist-info → esphome-2025.5.0b3.dist-info}/top_level.txt +0 -0
@@ -258,6 +258,47 @@ void WaveshareEPaper7C::fill(Color color) {
|
|
258
258
|
}
|
259
259
|
}
|
260
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
|
+
|
261
302
|
void HOT WaveshareEPaper::draw_absolute_pixel_internal(int x, int y, Color color) {
|
262
303
|
if (x >= this->get_width_internal() || y >= this->get_height_internal() || x < 0 || y < 0)
|
263
304
|
return;
|
@@ -963,7 +1004,7 @@ void WaveshareEPaper1P54InBV2::initialize() {
|
|
963
1004
|
|
964
1005
|
this->command(0x4E); // set RAM x address count to 0;
|
965
1006
|
this->data(0x00);
|
966
|
-
this->command(0x4F); // set RAM y address count to
|
1007
|
+
this->command(0x4F); // set RAM y address count to 0x199;
|
967
1008
|
this->data(0xC7);
|
968
1009
|
this->data(0x00);
|
969
1010
|
|
@@ -1837,7 +1878,7 @@ void GDEY029T94::initialize() {
|
|
1837
1878
|
|
1838
1879
|
this->command(0x4E); // set RAM x address count to 0;
|
1839
1880
|
this->data(0x00);
|
1840
|
-
this->command(0x4F); // set RAM y address count to
|
1881
|
+
this->command(0x4F); // set RAM y address count to 0x199;
|
1841
1882
|
this->command(0x00);
|
1842
1883
|
this->command(0x00);
|
1843
1884
|
this->wait_until_idle_();
|
@@ -2029,7 +2070,7 @@ void GDEW029T5::init_full_() {
|
|
2029
2070
|
this->init_display_();
|
2030
2071
|
this->command(0x82); // vcom_DC setting
|
2031
2072
|
this->data(0x08);
|
2032
|
-
this->command(
|
2073
|
+
this->command(0x50); // VCOM AND DATA INTERVAL SETTING
|
2033
2074
|
this->data(0x97); // WBmode:VBDF 17|D7 VBDW 97 VBDB 57 WBRmode:VBDF F7 VBDW 77 VBDB 37 VBDR B7
|
2034
2075
|
this->command(0x20);
|
2035
2076
|
this->write_lut_(LUT_20_VCOMDC_29_5, sizeof(LUT_20_VCOMDC_29_5));
|
@@ -2049,7 +2090,7 @@ void GDEW029T5::init_partial_() {
|
|
2049
2090
|
this->init_display_();
|
2050
2091
|
this->command(0x82); // vcom_DC setting
|
2051
2092
|
this->data(0x08);
|
2052
|
-
this->command(
|
2093
|
+
this->command(0x50); // VCOM AND DATA INTERVAL SETTING
|
2053
2094
|
this->data(0x17); // WBmode:VBDF 17|D7 VBDW 97 VBDB 57 WBRmode:VBDF F7 VBDW 77 VBDB 37 VBDR B7
|
2054
2095
|
this->command(0x20);
|
2055
2096
|
this->write_lut_(LUT_20_VCOMDC_PARTIAL_29_5, sizeof(LUT_20_VCOMDC_PARTIAL_29_5));
|
@@ -2897,6 +2938,223 @@ void WaveshareEPaper5P8InV2::dump_config() {
|
|
2897
2938
|
LOG_UPDATE_INTERVAL(this);
|
2898
2939
|
}
|
2899
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 %d 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
|
+
|
2900
3158
|
void WaveshareEPaper7P5InBV2::initialize() {
|
2901
3159
|
// COMMAND POWER SETTING
|
2902
3160
|
this->command(0x01);
|
@@ -3307,6 +3565,175 @@ void WaveshareEPaper7P5In::dump_config() {
|
|
3307
3565
|
LOG_PIN(" Busy Pin: ", this->busy_pin_);
|
3308
3566
|
LOG_UPDATE_INTERVAL(this);
|
3309
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
|
+
|
3310
3737
|
void WaveshareEPaper7P3InF::initialize() {
|
3311
3738
|
if (this->buffers_[0] == nullptr) {
|
3312
3739
|
ESP_LOGE(TAG, "Buffer unavailable!");
|
@@ -3411,11 +3838,6 @@ void WaveshareEPaper7P3InF::initialize() {
|
|
3411
3838
|
ESP_LOGI(TAG, "Display initialized successfully");
|
3412
3839
|
}
|
3413
3840
|
void HOT WaveshareEPaper7P3InF::display() {
|
3414
|
-
if (this->buffers_[0] == nullptr) {
|
3415
|
-
ESP_LOGE(TAG, "Buffer unavailable!");
|
3416
|
-
return;
|
3417
|
-
}
|
3418
|
-
|
3419
3841
|
// INITIALIZATION
|
3420
3842
|
ESP_LOGI(TAG, "Initialise the display");
|
3421
3843
|
this->initialize();
|
@@ -3423,29 +3845,7 @@ void HOT WaveshareEPaper7P3InF::display() {
|
|
3423
3845
|
// COMMAND DATA START TRANSMISSION
|
3424
3846
|
ESP_LOGI(TAG, "Sending data to the display");
|
3425
3847
|
this->command(0x10);
|
3426
|
-
|
3427
|
-
uint8_t byte_to_send;
|
3428
|
-
for (auto &buffer : this->buffers_) {
|
3429
|
-
for (uint32_t buffer_pos = 0; buffer_pos < small_buffer_length; buffer_pos += 3) {
|
3430
|
-
std::bitset<24> triplet =
|
3431
|
-
buffer[buffer_pos + 0] << 16 | buffer[buffer_pos + 1] << 8 | buffer[buffer_pos + 2] << 0;
|
3432
|
-
// 8 bitset<3> are stored in 3 bytes
|
3433
|
-
// |aaabbbaa|abbbaaab|bbaaabbb|
|
3434
|
-
// | byte 1 | byte 2 | byte 3 |
|
3435
|
-
byte_to_send = ((triplet >> 17).to_ulong() & 0b01110000) | ((triplet >> 18).to_ulong() & 0b00000111);
|
3436
|
-
this->data(byte_to_send);
|
3437
|
-
|
3438
|
-
byte_to_send = ((triplet >> 11).to_ulong() & 0b01110000) | ((triplet >> 12).to_ulong() & 0b00000111);
|
3439
|
-
this->data(byte_to_send);
|
3440
|
-
|
3441
|
-
byte_to_send = ((triplet >> 5).to_ulong() & 0b01110000) | ((triplet >> 6).to_ulong() & 0b00000111);
|
3442
|
-
this->data(byte_to_send);
|
3443
|
-
|
3444
|
-
byte_to_send = ((triplet << 1).to_ulong() & 0b01110000) | ((triplet << 0).to_ulong() & 0b00000111);
|
3445
|
-
this->data(byte_to_send);
|
3446
|
-
}
|
3447
|
-
App.feed_wdt();
|
3448
|
-
}
|
3848
|
+
this->send_buffers_();
|
3449
3849
|
|
3450
3850
|
// COMMAND POWER ON
|
3451
3851
|
ESP_LOGI(TAG, "Power on the display");
|
@@ -3464,9 +3864,11 @@ void HOT WaveshareEPaper7P3InF::display() {
|
|
3464
3864
|
this->data(0x00);
|
3465
3865
|
this->wait_until_idle_();
|
3466
3866
|
|
3467
|
-
|
3468
|
-
|
3469
|
-
|
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
|
+
}
|
3470
3872
|
}
|
3471
3873
|
int WaveshareEPaper7P3InF::get_width_internal() { return 800; }
|
3472
3874
|
int WaveshareEPaper7P3InF::get_height_internal() { return 480; }
|
@@ -4079,10 +4481,10 @@ void WaveshareEPaper7P5InHDB::initialize() {
|
|
4079
4481
|
this->data(0x01); // LUT1, for white
|
4080
4482
|
|
4081
4483
|
this->command(0x18);
|
4082
|
-
this->data(
|
4484
|
+
this->data(0x80);
|
4083
4485
|
|
4084
4486
|
this->command(0x22);
|
4085
|
-
this->data(
|
4487
|
+
this->data(0xB1); // Load Temperature and waveform setting.
|
4086
4488
|
|
4087
4489
|
this->command(0x20);
|
4088
4490
|
|
@@ -94,7 +94,10 @@ class WaveshareEPaper7C : public WaveshareEPaperBase {
|
|
94
94
|
void draw_absolute_pixel_internal(int x, int y, Color color) override;
|
95
95
|
uint32_t get_buffer_length_() override;
|
96
96
|
void setup() override;
|
97
|
+
|
97
98
|
void init_internal_7c_(uint32_t buffer_length);
|
99
|
+
void send_buffers_();
|
100
|
+
void reset_();
|
98
101
|
|
99
102
|
static const int NUM_BUFFERS = 10;
|
100
103
|
uint8_t *buffers_[NUM_BUFFERS];
|
@@ -683,6 +686,63 @@ class WaveshareEPaper5P8InV2 : public WaveshareEPaper {
|
|
683
686
|
int get_height_internal() override;
|
684
687
|
};
|
685
688
|
|
689
|
+
class GDEY0583T81 : public WaveshareEPaper {
|
690
|
+
public:
|
691
|
+
void initialize() override;
|
692
|
+
|
693
|
+
void display() override;
|
694
|
+
|
695
|
+
void dump_config() override;
|
696
|
+
|
697
|
+
void deep_sleep() override;
|
698
|
+
|
699
|
+
void set_full_update_every(uint32_t full_update_every);
|
700
|
+
|
701
|
+
protected:
|
702
|
+
int get_width_internal() override;
|
703
|
+
int get_height_internal() override;
|
704
|
+
uint32_t idle_timeout_() override;
|
705
|
+
|
706
|
+
private:
|
707
|
+
void power_on_();
|
708
|
+
void power_off_();
|
709
|
+
void reset_();
|
710
|
+
void update_full_();
|
711
|
+
void update_part_();
|
712
|
+
void init_full_();
|
713
|
+
void init_partial_();
|
714
|
+
void init_display_();
|
715
|
+
|
716
|
+
uint32_t full_update_every_{30};
|
717
|
+
uint32_t at_update_{0};
|
718
|
+
bool power_is_on_{false};
|
719
|
+
bool is_deep_sleep_{false};
|
720
|
+
uint8_t *old_buffer_{nullptr};
|
721
|
+
};
|
722
|
+
|
723
|
+
class WaveshareEPaper5P65InF : public WaveshareEPaper7C {
|
724
|
+
public:
|
725
|
+
void initialize() override;
|
726
|
+
|
727
|
+
void display() override;
|
728
|
+
|
729
|
+
void dump_config() override;
|
730
|
+
|
731
|
+
protected:
|
732
|
+
int get_width_internal() override;
|
733
|
+
|
734
|
+
int get_height_internal() override;
|
735
|
+
|
736
|
+
uint32_t idle_timeout_() override;
|
737
|
+
|
738
|
+
void deep_sleep() override { ; }
|
739
|
+
|
740
|
+
enum WaitForState { BUSY = true, IDLE = false };
|
741
|
+
bool wait_until_(WaitForState state);
|
742
|
+
|
743
|
+
bool deep_sleep_between_updates_{true};
|
744
|
+
};
|
745
|
+
|
686
746
|
class WaveshareEPaper7P3InF : public WaveshareEPaper7C {
|
687
747
|
public:
|
688
748
|
void initialize() override;
|
@@ -703,17 +763,6 @@ class WaveshareEPaper7P3InF : public WaveshareEPaper7C {
|
|
703
763
|
bool wait_until_idle_();
|
704
764
|
|
705
765
|
bool deep_sleep_between_updates_{true};
|
706
|
-
|
707
|
-
void reset_() {
|
708
|
-
if (this->reset_pin_ != nullptr) {
|
709
|
-
this->reset_pin_->digital_write(true);
|
710
|
-
delay(20);
|
711
|
-
this->reset_pin_->digital_write(false);
|
712
|
-
delay(1);
|
713
|
-
this->reset_pin_->digital_write(true);
|
714
|
-
delay(20);
|
715
|
-
}
|
716
|
-
};
|
717
766
|
};
|
718
767
|
|
719
768
|
class WaveshareEPaper7P5In : public WaveshareEPaper {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import esphome.codegen as cg
|
2
2
|
from esphome.components import climate_ir
|
3
3
|
import esphome.config_validation as cv
|
4
|
-
from esphome.const import
|
4
|
+
from esphome.const import CONF_MODEL
|
5
5
|
|
6
6
|
AUTO_LOAD = ["climate_ir"]
|
7
7
|
CODEOWNERS = ["@glmnet"]
|
@@ -15,15 +15,13 @@ MODELS = {
|
|
15
15
|
"DG11J1-91": Model.MODEL_DG11J1_91,
|
16
16
|
}
|
17
17
|
|
18
|
-
CONFIG_SCHEMA = climate_ir.
|
18
|
+
CONFIG_SCHEMA = climate_ir.climate_ir_with_receiver_schema(WhirlpoolClimate).extend(
|
19
19
|
{
|
20
|
-
cv.GenerateID(): cv.declare_id(WhirlpoolClimate),
|
21
20
|
cv.Optional(CONF_MODEL, default="DG11J1-3A"): cv.enum(MODELS, upper=True),
|
22
21
|
}
|
23
22
|
)
|
24
23
|
|
25
24
|
|
26
25
|
async def to_code(config):
|
27
|
-
var =
|
28
|
-
await climate_ir.register_climate_ir(var, config)
|
26
|
+
var = await climate_ir.new_climate_ir(config)
|
29
27
|
cg.add(var.set_model(config[CONF_MODEL]))
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import esphome.codegen as cg
|
2
2
|
from esphome.components import climate_ir
|
3
3
|
import esphome.config_validation as cv
|
4
|
-
from esphome.const import
|
4
|
+
from esphome.const import CONF_USE_FAHRENHEIT
|
5
5
|
|
6
6
|
AUTO_LOAD = ["climate_ir"]
|
7
7
|
|
@@ -9,15 +9,13 @@ whynter_ns = cg.esphome_ns.namespace("whynter")
|
|
9
9
|
Whynter = whynter_ns.class_("Whynter", climate_ir.ClimateIR)
|
10
10
|
|
11
11
|
|
12
|
-
CONFIG_SCHEMA = climate_ir.
|
12
|
+
CONFIG_SCHEMA = climate_ir.climate_ir_with_receiver_schema(Whynter).extend(
|
13
13
|
{
|
14
|
-
cv.GenerateID(): cv.declare_id(Whynter),
|
15
14
|
cv.Optional(CONF_USE_FAHRENHEIT, default=False): cv.boolean,
|
16
15
|
}
|
17
16
|
)
|
18
17
|
|
19
18
|
|
20
19
|
async def to_code(config):
|
21
|
-
var =
|
22
|
-
await climate_ir.register_climate_ir(var, config)
|
20
|
+
var = await climate_ir.new_climate_ir(config)
|
23
21
|
cg.add(var.set_fahrenheit(config[CONF_USE_FAHRENHEIT]))
|
@@ -32,7 +32,7 @@ void XPT2046Component::update_touches() {
|
|
32
32
|
|
33
33
|
int16_t touch_pressure_1 = this->read_adc_(0xB1 /* touch_pressure_1 */);
|
34
34
|
int16_t touch_pressure_2 = this->read_adc_(0xC1 /* touch_pressure_2 */);
|
35
|
-
z_raw = touch_pressure_1 +
|
35
|
+
z_raw = touch_pressure_1 + 0xfff - touch_pressure_2;
|
36
36
|
ESP_LOGVV(TAG, "Touchscreen Update z = %d", z_raw);
|
37
37
|
touch = (z_raw >= this->threshold_);
|
38
38
|
if (touch) {
|