esphome 2024.12.3__py3-none-any.whl → 2025.2.0b1__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 -3
- esphome/components/adc/__init__.py +17 -11
- esphome/components/adc/adc_sensor.h +17 -0
- esphome/components/adc/adc_sensor_common.cpp +55 -0
- esphome/components/adc/adc_sensor_esp32.cpp +8 -5
- esphome/components/adc/adc_sensor_esp8266.cpp +10 -6
- esphome/components/adc/adc_sensor_libretiny.cpp +11 -6
- esphome/components/adc/adc_sensor_rp2040.cpp +13 -10
- esphome/components/adc/sensor.py +9 -3
- esphome/components/ads1115/ads1115.cpp +56 -7
- esphome/components/ads1115/ads1115.h +13 -1
- esphome/components/ads1115/sensor/__init__.py +16 -0
- esphome/components/ads1115/sensor/ads1115_sensor.cpp +2 -1
- esphome/components/ads1115/sensor/ads1115_sensor.h +2 -0
- esphome/components/animation/__init__.py +23 -261
- esphome/components/animation/animation.cpp +2 -2
- esphome/components/animation/animation.h +2 -1
- esphome/components/api/api_pb2.cpp +14 -0
- esphome/components/api/api_pb2.h +1 -0
- esphome/components/audio/__init__.py +112 -0
- esphome/components/audio/audio.cpp +67 -0
- esphome/components/audio/audio.h +125 -7
- esphome/components/audio/audio_decoder.cpp +361 -0
- esphome/components/audio/audio_decoder.h +135 -0
- esphome/components/audio/audio_reader.cpp +308 -0
- esphome/components/audio/audio_reader.h +85 -0
- esphome/components/audio/audio_resampler.cpp +159 -0
- esphome/components/audio/audio_resampler.h +101 -0
- esphome/components/audio/audio_transfer_buffer.cpp +165 -0
- esphome/components/audio/audio_transfer_buffer.h +139 -0
- esphome/components/audio_adc/__init__.py +41 -0
- esphome/components/audio_adc/audio_adc.h +17 -0
- esphome/components/audio_adc/automation.h +23 -0
- esphome/components/bk72xx/__init__.py +1 -0
- esphome/components/ble_client/ble_client.cpp +1 -2
- esphome/components/ble_client/sensor/__init__.py +1 -1
- esphome/components/ble_client/text_sensor/__init__.py +1 -1
- esphome/components/bluetooth_proxy/bluetooth_connection.cpp +5 -0
- esphome/components/bluetooth_proxy/bluetooth_connection.h +1 -0
- esphome/components/bluetooth_proxy/bluetooth_proxy.cpp +5 -0
- esphome/components/ch422g/ch422g.h +2 -0
- esphome/components/climate/__init__.py +1 -1
- esphome/components/climate_ir/climate_ir.cpp +2 -1
- esphome/components/coolix/coolix.cpp +2 -1
- esphome/components/custom/__init__.py +0 -3
- esphome/components/custom/binary_sensor/__init__.py +2 -28
- esphome/components/custom/climate/__init__.py +2 -27
- esphome/components/custom/cover/__init__.py +2 -27
- esphome/components/custom/light/__init__.py +2 -27
- esphome/components/custom/output/__init__.py +2 -58
- esphome/components/custom/sensor/__init__.py +2 -24
- esphome/components/custom/switch/__init__.py +2 -24
- esphome/components/custom/text_sensor/__init__.py +2 -29
- esphome/components/custom_component/__init__.py +3 -27
- esphome/components/daly_bms/daly_bms.cpp +6 -0
- esphome/components/daly_bms/daly_bms.h +2 -0
- esphome/components/daly_bms/sensor.py +6 -0
- esphome/components/debug/debug_component.cpp +4 -0
- esphome/components/debug/debug_component.h +14 -0
- esphome/components/debug/debug_esp32.cpp +154 -74
- esphome/components/dfplayer/dfplayer.cpp +15 -2
- esphome/components/dfrobot_sen0395/dfrobot_sen0395.cpp +2 -1
- esphome/components/dht/dht.cpp +2 -1
- esphome/components/display/__init__.py +18 -5
- esphome/components/display/display.cpp +2 -1
- esphome/components/display/rect.cpp +2 -1
- esphome/components/es7210/__init__.py +0 -0
- esphome/components/es7210/audio_adc.py +51 -0
- esphome/components/es7210/es7210.cpp +228 -0
- esphome/components/es7210/es7210.h +62 -0
- esphome/components/es7210/es7210_const.h +129 -0
- esphome/components/es7243e/__init__.py +0 -0
- esphome/components/es7243e/audio_adc.py +34 -0
- esphome/components/es7243e/es7243e.cpp +125 -0
- esphome/components/es7243e/es7243e.h +37 -0
- esphome/components/es7243e/es7243e_const.h +54 -0
- esphome/components/es8156/__init__.py +0 -0
- esphome/components/es8156/audio_dac.py +27 -0
- esphome/components/es8156/es8156.cpp +87 -0
- esphome/components/es8156/es8156.h +51 -0
- esphome/components/es8156/es8156_const.h +68 -0
- esphome/components/es8311/audio_dac.py +1 -2
- esphome/components/esp32/__init__.py +1 -0
- esphome/components/esp32/core.cpp +5 -1
- esphome/components/esp32/gpio.h +2 -0
- esphome/components/esp32_ble/__init__.py +39 -0
- esphome/components/esp32_ble/queue.h +4 -4
- esphome/components/esp32_ble_client/ble_client_base.cpp +46 -0
- esphome/components/esp32_ble_client/ble_client_base.h +2 -0
- esphome/components/esp32_ble_server/__init__.py +582 -12
- esphome/components/esp32_ble_server/ble_characteristic.cpp +48 -60
- esphome/components/esp32_ble_server/ble_characteristic.h +24 -17
- esphome/components/esp32_ble_server/ble_descriptor.cpp +21 -9
- esphome/components/esp32_ble_server/ble_descriptor.h +17 -6
- esphome/components/esp32_ble_server/ble_server.cpp +62 -67
- esphome/components/esp32_ble_server/ble_server.h +28 -32
- esphome/components/esp32_ble_server/ble_server_automations.cpp +77 -0
- esphome/components/esp32_ble_server/ble_server_automations.h +115 -0
- esphome/components/esp32_ble_server/ble_service.cpp +17 -15
- esphome/components/esp32_ble_server/ble_service.h +10 -14
- esphome/components/esp32_ble_tracker/__init__.py +6 -39
- esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp +33 -10
- esphome/components/esp32_ble_tracker/esp32_ble_tracker.h +8 -4
- esphome/components/esp32_improv/__init__.py +2 -8
- esphome/components/esp32_improv/esp32_improv_component.cpp +21 -20
- esphome/components/esp32_improv/esp32_improv_component.h +3 -4
- esphome/components/esp32_rmt/__init__.py +28 -3
- esphome/components/esp32_rmt_led_strip/led_strip.cpp +73 -6
- esphome/components/esp32_rmt_led_strip/led_strip.h +21 -3
- esphome/components/esp32_rmt_led_strip/light.py +72 -7
- esphome/components/esp32_touch/esp32_touch.cpp +5 -0
- esphome/components/esp8266/__init__.py +1 -0
- esphome/components/esp8266/gpio.h +1 -0
- esphome/components/ethernet/__init__.py +10 -10
- esphome/components/event/event.cpp +4 -2
- esphome/components/event/event.h +2 -0
- esphome/components/event_emitter/__init__.py +5 -0
- esphome/components/event_emitter/event_emitter.cpp +14 -0
- esphome/components/event_emitter/event_emitter.h +63 -0
- esphome/components/gcja5/gcja5.cpp +2 -1
- esphome/components/haier/haier_base.cpp +2 -1
- esphome/components/haier/hon_climate.cpp +2 -1
- esphome/components/heatpumpir/heatpumpir.cpp +2 -1
- esphome/components/host/__init__.py +1 -0
- esphome/components/host/gpio.h +1 -0
- esphome/components/http_request/http_request.h +2 -2
- esphome/components/http_request/http_request_arduino.cpp +1 -1
- esphome/components/http_request/http_request_idf.cpp +1 -1
- esphome/components/i2c/i2c_bus_esp_idf.cpp +4 -0
- esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp +7 -5
- esphome/components/i2s_audio/speaker/__init__.py +53 -6
- esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp +92 -46
- esphome/components/i2s_audio/speaker/i2s_audio_speaker.h +8 -0
- esphome/components/ili9xxx/display.py +29 -11
- esphome/components/ili9xxx/ili9xxx_display.cpp +2 -5
- esphome/components/ili9xxx/ili9xxx_display.h +2 -1
- esphome/components/image/__init__.py +443 -255
- esphome/components/image/image.cpp +115 -61
- esphome/components/image/image.h +15 -24
- esphome/components/json/json_util.cpp +8 -34
- esphome/components/libretiny/__init__.py +1 -0
- esphome/components/libretiny/gpio_arduino.h +1 -0
- esphome/components/light/light_color_values.h +1 -1
- esphome/components/logger/__init__.py +43 -7
- esphome/components/logger/logger.cpp +16 -11
- esphome/components/logger/logger.h +11 -7
- esphome/components/logger/select/__init__.py +29 -0
- esphome/components/logger/select/logger_level_select.cpp +27 -0
- esphome/components/logger/select/logger_level_select.h +15 -0
- esphome/components/lvgl/__init__.py +96 -73
- esphome/components/lvgl/automation.py +39 -7
- esphome/components/lvgl/defines.py +8 -2
- esphome/components/lvgl/lvgl_esphome.cpp +8 -15
- esphome/components/lvgl/lvgl_esphome.h +20 -5
- esphome/components/lvgl/schemas.py +25 -14
- esphome/components/lvgl/trigger.py +27 -3
- esphome/components/lvgl/widgets/dropdown.py +1 -1
- esphome/components/lvgl/widgets/keyboard.py +8 -1
- esphome/components/lvgl/widgets/meter.py +2 -1
- esphome/components/lvgl/widgets/msgbox.py +1 -1
- esphome/components/lvgl/widgets/obj.py +1 -12
- esphome/components/lvgl/widgets/page.py +37 -2
- esphome/components/lvgl/widgets/tabview.py +1 -1
- esphome/components/max6956/max6956.h +2 -0
- esphome/components/mcp23016/mcp23016.h +2 -0
- esphome/components/mcp23xxx_base/mcp23xxx_base.h +2 -0
- esphome/components/mdns/__init__.py +1 -1
- esphome/components/media_player/__init__.py +37 -8
- esphome/components/media_player/automation.h +11 -2
- esphome/components/media_player/media_player.cpp +8 -0
- esphome/components/media_player/media_player.h +8 -4
- esphome/components/micronova/switch/micronova_switch.cpp +4 -2
- esphome/components/midea/ac_automations.h +3 -1
- esphome/components/midea/air_conditioner.cpp +7 -5
- esphome/components/midea/air_conditioner.h +1 -1
- esphome/components/midea/climate.py +4 -2
- esphome/components/midea/ir_transmitter.h +36 -5
- esphome/components/mixer/__init__.py +0 -0
- esphome/components/mixer/speaker/__init__.py +172 -0
- esphome/components/mixer/speaker/automation.h +19 -0
- esphome/components/mixer/speaker/mixer_speaker.cpp +624 -0
- esphome/components/mixer/speaker/mixer_speaker.h +207 -0
- esphome/components/mpr121/mpr121.h +2 -0
- esphome/components/mqtt/__init__.py +1 -1
- esphome/components/mqtt/mqtt_client.cpp +7 -1
- esphome/components/mqtt/mqtt_client.h +1 -1
- esphome/components/mqtt/mqtt_climate.cpp +2 -2
- esphome/components/network/ip_address.h +2 -0
- esphome/components/nextion/automation.h +17 -0
- esphome/components/nextion/display.py +42 -17
- esphome/components/nextion/nextion.cpp +4 -10
- esphome/components/nextion/nextion.h +89 -82
- esphome/components/nextion/nextion_commands.cpp +10 -10
- esphome/components/ntc/sensor.py +2 -4
- esphome/components/online_image/__init__.py +98 -46
- esphome/components/online_image/bmp_image.cpp +101 -0
- esphome/components/online_image/bmp_image.h +40 -0
- esphome/components/online_image/image_decoder.cpp +28 -2
- esphome/components/online_image/image_decoder.h +24 -15
- esphome/components/online_image/jpeg_image.cpp +90 -0
- esphome/components/online_image/jpeg_image.h +34 -0
- esphome/components/online_image/online_image.cpp +112 -53
- esphome/components/online_image/online_image.h +24 -7
- esphome/components/online_image/png_image.cpp +7 -3
- esphome/components/online_image/png_image.h +2 -1
- esphome/components/opentherm/__init__.py +73 -7
- esphome/components/opentherm/automation.h +25 -0
- esphome/components/opentherm/const.py +1 -0
- esphome/components/opentherm/generate.py +39 -6
- esphome/components/opentherm/hub.cpp +117 -79
- esphome/components/opentherm/hub.h +31 -15
- esphome/components/opentherm/opentherm.cpp +47 -23
- esphome/components/opentherm/opentherm.h +27 -6
- esphome/components/opentherm/opentherm_macros.h +11 -0
- esphome/components/opentherm/schema.py +78 -1
- esphome/components/opentherm/validate.py +7 -2
- esphome/components/pca6416a/pca6416a.h +2 -0
- esphome/components/pca9554/pca9554.h +2 -0
- esphome/components/pcf8574/pcf8574.h +2 -0
- esphome/components/preferences/__init__.py +2 -4
- esphome/components/preferences/syncer.h +10 -3
- esphome/components/prometheus/prometheus_handler.cpp +313 -0
- esphome/components/prometheus/prometheus_handler.h +48 -7
- esphome/components/psram/psram.cpp +8 -1
- esphome/components/pulse_counter/pulse_counter_sensor.cpp +14 -9
- esphome/components/pulse_counter/pulse_counter_sensor.h +4 -4
- esphome/components/pulse_meter/pulse_meter_sensor.cpp +2 -0
- esphome/components/qspi_dbi/__init__.py +3 -0
- esphome/components/qspi_dbi/display.py +74 -47
- esphome/components/qspi_dbi/models.py +245 -2
- esphome/components/qspi_dbi/qspi_dbi.cpp +9 -16
- esphome/components/qspi_dbi/qspi_dbi.h +2 -2
- esphome/components/remote_base/__init__.py +77 -25
- esphome/components/remote_base/remote_base.cpp +1 -1
- esphome/components/remote_base/remote_base.h +20 -2
- esphome/components/remote_base/toto_protocol.cpp +100 -0
- esphome/components/remote_base/toto_protocol.h +45 -0
- esphome/components/remote_receiver/__init__.py +55 -10
- esphome/components/remote_receiver/remote_receiver.h +36 -3
- esphome/components/remote_receiver/remote_receiver_esp32.cpp +145 -6
- esphome/components/remote_transmitter/__init__.py +62 -4
- esphome/components/remote_transmitter/remote_transmitter.h +21 -2
- esphome/components/remote_transmitter/remote_transmitter_esp32.cpp +140 -4
- esphome/components/remote_transmitter/remote_transmitter_esp8266.cpp +3 -3
- esphome/components/remote_transmitter/remote_transmitter_libretiny.cpp +3 -3
- esphome/components/resampler/__init__.py +0 -0
- esphome/components/resampler/speaker/__init__.py +103 -0
- esphome/components/resampler/speaker/resampler_speaker.cpp +318 -0
- esphome/components/resampler/speaker/resampler_speaker.h +107 -0
- esphome/components/resistance/resistance_sensor.h +2 -3
- esphome/components/resistance/sensor.py +2 -9
- esphome/components/rotary_encoder/rotary_encoder.cpp +8 -4
- esphome/components/rp2040/__init__.py +1 -0
- esphome/components/rp2040/gpio.h +1 -0
- esphome/components/rtl87xx/__init__.py +2 -0
- esphome/components/sdl/binary_sensor.py +270 -0
- esphome/components/sdl/sdl_esphome.cpp +16 -0
- esphome/components/sdl/sdl_esphome.h +9 -0
- esphome/components/seeed_mr60bha2/binary_sensor.py +25 -0
- esphome/components/seeed_mr60bha2/seeed_mr60bha2.cpp +26 -2
- esphome/components/seeed_mr60bha2/seeed_mr60bha2.h +9 -20
- esphome/components/seeed_mr60bha2/sensor.py +9 -1
- esphome/components/sn74hc165/sn74hc165.h +3 -0
- esphome/components/sn74hc595/sn74hc595.h +3 -0
- esphome/components/speaker/__init__.py +5 -4
- esphome/components/speaker/media_player/__init__.py +458 -0
- esphome/components/speaker/media_player/audio_pipeline.cpp +568 -0
- esphome/components/speaker/media_player/audio_pipeline.h +159 -0
- esphome/components/speaker/media_player/automation.h +26 -0
- esphome/components/speaker/media_player/speaker_media_player.cpp +577 -0
- esphome/components/speaker/media_player/speaker_media_player.h +160 -0
- esphome/components/speaker/speaker.h +20 -0
- esphome/components/spi/__init__.py +1 -5
- esphome/components/spi/spi.cpp +7 -1
- esphome/components/spi/spi.h +21 -2
- esphome/components/spi_led_strip/light.py +3 -5
- esphome/components/spi_led_strip/spi_led_strip.cpp +67 -0
- esphome/components/spi_led_strip/spi_led_strip.h +8 -60
- esphome/components/sprinkler/sprinkler.cpp +3 -1
- esphome/components/sx1509/sx1509_gpio_pin.h +2 -0
- esphome/components/tca9555/tca9555.h +2 -0
- esphome/components/toshiba/toshiba.cpp +2 -1
- esphome/components/tuya/light/tuya_light.cpp +4 -2
- esphome/components/uart/uart_component_esp32_arduino.cpp +2 -2
- esphome/components/uart/uart_component_esp_idf.cpp +2 -2
- esphome/components/udp/__init__.py +8 -2
- esphome/components/udp/udp_component.cpp +25 -56
- esphome/components/udp/udp_component.h +3 -0
- esphome/components/uponor_smatrix/sensor/__init__.py +14 -4
- esphome/components/uponor_smatrix/sensor/uponor_smatrix_sensor.cpp +5 -0
- esphome/components/uponor_smatrix/sensor/uponor_smatrix_sensor.h +1 -0
- esphome/components/uptime/text_sensor/__init__.py +19 -0
- esphome/components/uptime/text_sensor/uptime_text_sensor.cpp +63 -0
- esphome/components/uptime/text_sensor/uptime_text_sensor.h +25 -0
- esphome/components/voice_assistant/voice_assistant.cpp +24 -14
- esphome/components/voice_assistant/voice_assistant.h +8 -0
- esphome/components/waveshare_epaper/display.py +22 -1
- esphome/components/waveshare_epaper/waveshare_213v3.cpp +9 -3
- esphome/components/waveshare_epaper/waveshare_epaper.cpp +1155 -44
- esphome/components/waveshare_epaper/waveshare_epaper.h +208 -7
- esphome/components/web_server/web_server.cpp +28 -6
- esphome/components/weikai/weikai.h +2 -0
- esphome/components/wifi/__init__.py +6 -6
- esphome/components/wifi/wifi_component.cpp +1 -1
- esphome/components/wifi/wifi_component_esp32_arduino.cpp +30 -1
- esphome/components/wireguard/__init__.py +2 -2
- esphome/components/xl9535/xl9535.h +2 -0
- esphome/components/xxtea/__init__.py +3 -0
- esphome/components/xxtea/xxtea.cpp +46 -0
- esphome/components/xxtea/xxtea.h +26 -0
- esphome/components/yashima/yashima.cpp +2 -1
- esphome/config.py +9 -5
- esphome/config_validation.py +55 -17
- esphome/const.py +7 -10
- esphome/core/__init__.py +6 -13
- esphome/core/base_automation.h +1 -0
- esphome/core/config.py +57 -72
- esphome/core/defines.h +9 -1
- esphome/core/gpio.h +7 -0
- esphome/core/helpers.cpp +19 -15
- esphome/core/helpers.h +57 -8
- esphome/core/log.h +9 -7
- esphome/cpp_generator.py +2 -2
- esphome/espota2.py +3 -2
- esphome/loader.py +12 -4
- esphome/log.py +5 -7
- esphome/yaml_util.py +2 -2
- {esphome-2024.12.3.dist-info → esphome-2025.2.0b1.dist-info}/METADATA +12 -7
- {esphome-2024.12.3.dist-info → esphome-2025.2.0b1.dist-info}/RECORD +338 -289
- esphome/components/custom/binary_sensor/custom_binary_sensor.cpp +0 -16
- esphome/components/custom/binary_sensor/custom_binary_sensor.h +0 -26
- esphome/components/custom/climate/custom_climate.h +0 -22
- esphome/components/custom/cover/custom_cover.h +0 -21
- esphome/components/custom/light/custom_light_output.h +0 -24
- esphome/components/custom/output/custom_output.h +0 -37
- esphome/components/custom/sensor/custom_sensor.cpp +0 -16
- esphome/components/custom/sensor/custom_sensor.h +0 -24
- esphome/components/custom/switch/custom_switch.cpp +0 -16
- esphome/components/custom/switch/custom_switch.h +0 -24
- esphome/components/custom/text_sensor/custom_text_sensor.cpp +0 -16
- esphome/components/custom/text_sensor/custom_text_sensor.h +0 -26
- esphome/components/custom_component/custom_component.h +0 -28
- esphome/components/esp32_ble_server/ble_2901.cpp +0 -18
- esphome/components/esp32_ble_server/ble_2901.h +0 -19
- esphome/components/resistance_sampler/__init__.py +0 -6
- esphome/components/resistance_sampler/resistance_sampler.h +0 -10
- esphome/components/uptime/{sensor.py → sensor/__init__.py} +3 -3
- /esphome/components/uptime/{uptime_seconds_sensor.cpp → sensor/uptime_seconds_sensor.cpp} +0 -0
- /esphome/components/uptime/{uptime_seconds_sensor.h → sensor/uptime_seconds_sensor.h} +0 -0
- /esphome/components/uptime/{uptime_timestamp_sensor.cpp → sensor/uptime_timestamp_sensor.cpp} +0 -0
- /esphome/components/uptime/{uptime_timestamp_sensor.h → sensor/uptime_timestamp_sensor.h} +0 -0
- {esphome-2024.12.3.dist-info → esphome-2025.2.0b1.dist-info}/LICENSE +0 -0
- {esphome-2024.12.3.dist-info → esphome-2025.2.0b1.dist-info}/WHEEL +0 -0
- {esphome-2024.12.3.dist-info → esphome-2025.2.0b1.dist-info}/entry_points.txt +0 -0
- {esphome-2024.12.3.dist-info → esphome-2025.2.0b1.dist-info}/top_level.txt +0 -0
@@ -1,16 +0,0 @@
|
|
1
|
-
#include "custom_binary_sensor.h"
|
2
|
-
#include "esphome/core/log.h"
|
3
|
-
|
4
|
-
namespace esphome {
|
5
|
-
namespace custom {
|
6
|
-
|
7
|
-
static const char *const TAG = "custom.binary_sensor";
|
8
|
-
|
9
|
-
void CustomBinarySensorConstructor::dump_config() {
|
10
|
-
for (auto *child : this->binary_sensors_) {
|
11
|
-
LOG_BINARY_SENSOR("", "Custom Binary Sensor", child);
|
12
|
-
}
|
13
|
-
}
|
14
|
-
|
15
|
-
} // namespace custom
|
16
|
-
} // namespace esphome
|
@@ -1,26 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "esphome/core/component.h"
|
4
|
-
#include "esphome/components/binary_sensor/binary_sensor.h"
|
5
|
-
|
6
|
-
#include <vector>
|
7
|
-
|
8
|
-
namespace esphome {
|
9
|
-
namespace custom {
|
10
|
-
|
11
|
-
class CustomBinarySensorConstructor : public Component {
|
12
|
-
public:
|
13
|
-
CustomBinarySensorConstructor(const std::function<std::vector<binary_sensor::BinarySensor *>()> &init) {
|
14
|
-
this->binary_sensors_ = init();
|
15
|
-
}
|
16
|
-
|
17
|
-
binary_sensor::BinarySensor *get_binary_sensor(int i) { return this->binary_sensors_[i]; }
|
18
|
-
|
19
|
-
void dump_config() override;
|
20
|
-
|
21
|
-
protected:
|
22
|
-
std::vector<binary_sensor::BinarySensor *> binary_sensors_;
|
23
|
-
};
|
24
|
-
|
25
|
-
} // namespace custom
|
26
|
-
} // namespace esphome
|
@@ -1,22 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "esphome/core/component.h"
|
4
|
-
#include "esphome/components/climate/climate.h"
|
5
|
-
|
6
|
-
#include <vector>
|
7
|
-
|
8
|
-
namespace esphome {
|
9
|
-
namespace custom {
|
10
|
-
|
11
|
-
class CustomClimateConstructor {
|
12
|
-
public:
|
13
|
-
CustomClimateConstructor(const std::function<std::vector<climate::Climate *>()> &init) { this->climates_ = init(); }
|
14
|
-
|
15
|
-
climate::Climate *get_climate(int i) { return this->climates_[i]; }
|
16
|
-
|
17
|
-
protected:
|
18
|
-
std::vector<climate::Climate *> climates_;
|
19
|
-
};
|
20
|
-
|
21
|
-
} // namespace custom
|
22
|
-
} // namespace esphome
|
@@ -1,21 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "esphome/components/cover/cover.h"
|
4
|
-
|
5
|
-
#include <vector>
|
6
|
-
|
7
|
-
namespace esphome {
|
8
|
-
namespace custom {
|
9
|
-
|
10
|
-
class CustomCoverConstructor {
|
11
|
-
public:
|
12
|
-
CustomCoverConstructor(const std::function<std::vector<cover::Cover *>()> &init) { this->covers_ = init(); }
|
13
|
-
|
14
|
-
cover::Cover *get_cover(int i) { return this->covers_[i]; }
|
15
|
-
|
16
|
-
protected:
|
17
|
-
std::vector<cover::Cover *> covers_;
|
18
|
-
};
|
19
|
-
|
20
|
-
} // namespace custom
|
21
|
-
} // namespace esphome
|
@@ -1,24 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "esphome/core/component.h"
|
4
|
-
#include "esphome/components/light/light_output.h"
|
5
|
-
|
6
|
-
#include <vector>
|
7
|
-
|
8
|
-
namespace esphome {
|
9
|
-
namespace custom {
|
10
|
-
|
11
|
-
class CustomLightOutputConstructor {
|
12
|
-
public:
|
13
|
-
CustomLightOutputConstructor(const std::function<std::vector<light::LightOutput *>()> &init) {
|
14
|
-
this->outputs_ = init();
|
15
|
-
}
|
16
|
-
|
17
|
-
light::LightOutput *get_light(int i) { return this->outputs_[i]; }
|
18
|
-
|
19
|
-
protected:
|
20
|
-
std::vector<light::LightOutput *> outputs_;
|
21
|
-
};
|
22
|
-
|
23
|
-
} // namespace custom
|
24
|
-
} // namespace esphome
|
@@ -1,37 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "esphome/core/component.h"
|
4
|
-
#include "esphome/components/output/binary_output.h"
|
5
|
-
#include "esphome/components/output/float_output.h"
|
6
|
-
|
7
|
-
#include <vector>
|
8
|
-
|
9
|
-
namespace esphome {
|
10
|
-
namespace custom {
|
11
|
-
|
12
|
-
class CustomBinaryOutputConstructor {
|
13
|
-
public:
|
14
|
-
CustomBinaryOutputConstructor(const std::function<std::vector<output::BinaryOutput *>()> &init) {
|
15
|
-
this->outputs_ = init();
|
16
|
-
}
|
17
|
-
|
18
|
-
output::BinaryOutput *get_output(int i) { return this->outputs_[i]; }
|
19
|
-
|
20
|
-
protected:
|
21
|
-
std::vector<output::BinaryOutput *> outputs_;
|
22
|
-
};
|
23
|
-
|
24
|
-
class CustomFloatOutputConstructor {
|
25
|
-
public:
|
26
|
-
CustomFloatOutputConstructor(const std::function<std::vector<output::FloatOutput *>()> &init) {
|
27
|
-
this->outputs_ = init();
|
28
|
-
}
|
29
|
-
|
30
|
-
output::FloatOutput *get_output(int i) { return this->outputs_[i]; }
|
31
|
-
|
32
|
-
protected:
|
33
|
-
std::vector<output::FloatOutput *> outputs_;
|
34
|
-
};
|
35
|
-
|
36
|
-
} // namespace custom
|
37
|
-
} // namespace esphome
|
@@ -1,16 +0,0 @@
|
|
1
|
-
#include "custom_sensor.h"
|
2
|
-
#include "esphome/core/log.h"
|
3
|
-
|
4
|
-
namespace esphome {
|
5
|
-
namespace custom {
|
6
|
-
|
7
|
-
static const char *const TAG = "custom.sensor";
|
8
|
-
|
9
|
-
void CustomSensorConstructor::dump_config() {
|
10
|
-
for (auto *child : this->sensors_) {
|
11
|
-
LOG_SENSOR("", "Custom Sensor", child);
|
12
|
-
}
|
13
|
-
}
|
14
|
-
|
15
|
-
} // namespace custom
|
16
|
-
} // namespace esphome
|
@@ -1,24 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "esphome/core/component.h"
|
4
|
-
#include "esphome/components/sensor/sensor.h"
|
5
|
-
|
6
|
-
#include <vector>
|
7
|
-
|
8
|
-
namespace esphome {
|
9
|
-
namespace custom {
|
10
|
-
|
11
|
-
class CustomSensorConstructor : public Component {
|
12
|
-
public:
|
13
|
-
CustomSensorConstructor(const std::function<std::vector<sensor::Sensor *>()> &init) { this->sensors_ = init(); }
|
14
|
-
|
15
|
-
sensor::Sensor *get_sensor(int i) { return this->sensors_[i]; }
|
16
|
-
|
17
|
-
void dump_config() override;
|
18
|
-
|
19
|
-
protected:
|
20
|
-
std::vector<sensor::Sensor *> sensors_;
|
21
|
-
};
|
22
|
-
|
23
|
-
} // namespace custom
|
24
|
-
} // namespace esphome
|
@@ -1,16 +0,0 @@
|
|
1
|
-
#include "custom_switch.h"
|
2
|
-
#include "esphome/core/log.h"
|
3
|
-
|
4
|
-
namespace esphome {
|
5
|
-
namespace custom {
|
6
|
-
|
7
|
-
static const char *const TAG = "custom.switch";
|
8
|
-
|
9
|
-
void CustomSwitchConstructor::dump_config() {
|
10
|
-
for (auto *child : this->switches_) {
|
11
|
-
LOG_SWITCH("", "Custom Switch", child);
|
12
|
-
}
|
13
|
-
}
|
14
|
-
|
15
|
-
} // namespace custom
|
16
|
-
} // namespace esphome
|
@@ -1,24 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "esphome/core/component.h"
|
4
|
-
#include "esphome/components/switch/switch.h"
|
5
|
-
|
6
|
-
#include <vector>
|
7
|
-
|
8
|
-
namespace esphome {
|
9
|
-
namespace custom {
|
10
|
-
|
11
|
-
class CustomSwitchConstructor : public Component {
|
12
|
-
public:
|
13
|
-
CustomSwitchConstructor(const std::function<std::vector<switch_::Switch *>()> &init) { this->switches_ = init(); }
|
14
|
-
|
15
|
-
switch_::Switch *get_switch(int i) { return this->switches_[i]; }
|
16
|
-
|
17
|
-
void dump_config() override;
|
18
|
-
|
19
|
-
protected:
|
20
|
-
std::vector<switch_::Switch *> switches_;
|
21
|
-
};
|
22
|
-
|
23
|
-
} // namespace custom
|
24
|
-
} // namespace esphome
|
@@ -1,16 +0,0 @@
|
|
1
|
-
#include "custom_text_sensor.h"
|
2
|
-
#include "esphome/core/log.h"
|
3
|
-
|
4
|
-
namespace esphome {
|
5
|
-
namespace custom {
|
6
|
-
|
7
|
-
static const char *const TAG = "custom.text_sensor";
|
8
|
-
|
9
|
-
void CustomTextSensorConstructor::dump_config() {
|
10
|
-
for (auto *child : this->text_sensors_) {
|
11
|
-
LOG_TEXT_SENSOR("", "Custom Text Sensor", child);
|
12
|
-
}
|
13
|
-
}
|
14
|
-
|
15
|
-
} // namespace custom
|
16
|
-
} // namespace esphome
|
@@ -1,26 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "esphome/core/component.h"
|
4
|
-
#include "esphome/components/text_sensor/text_sensor.h"
|
5
|
-
|
6
|
-
#include <vector>
|
7
|
-
|
8
|
-
namespace esphome {
|
9
|
-
namespace custom {
|
10
|
-
|
11
|
-
class CustomTextSensorConstructor : public Component {
|
12
|
-
public:
|
13
|
-
CustomTextSensorConstructor(const std::function<std::vector<text_sensor::TextSensor *>()> &init) {
|
14
|
-
this->text_sensors_ = init();
|
15
|
-
}
|
16
|
-
|
17
|
-
text_sensor::TextSensor *get_text_sensor(int i) { return this->text_sensors_[i]; }
|
18
|
-
|
19
|
-
void dump_config() override;
|
20
|
-
|
21
|
-
protected:
|
22
|
-
std::vector<text_sensor::TextSensor *> text_sensors_;
|
23
|
-
};
|
24
|
-
|
25
|
-
} // namespace custom
|
26
|
-
} // namespace esphome
|
@@ -1,28 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "esphome/core/component.h"
|
4
|
-
#include "esphome/core/application.h"
|
5
|
-
|
6
|
-
#include <vector>
|
7
|
-
|
8
|
-
namespace esphome {
|
9
|
-
namespace custom_component {
|
10
|
-
|
11
|
-
class CustomComponentConstructor {
|
12
|
-
public:
|
13
|
-
CustomComponentConstructor(const std::function<std::vector<Component *>()> &init) {
|
14
|
-
this->components_ = init();
|
15
|
-
|
16
|
-
for (auto *comp : this->components_) {
|
17
|
-
App.register_component(comp);
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
Component *get_component(int i) const { return this->components_[i]; }
|
22
|
-
|
23
|
-
protected:
|
24
|
-
std::vector<Component *> components_;
|
25
|
-
};
|
26
|
-
|
27
|
-
} // namespace custom_component
|
28
|
-
} // namespace esphome
|
@@ -1,18 +0,0 @@
|
|
1
|
-
#include "ble_2901.h"
|
2
|
-
#include "esphome/components/esp32_ble/ble_uuid.h"
|
3
|
-
|
4
|
-
#ifdef USE_ESP32
|
5
|
-
|
6
|
-
namespace esphome {
|
7
|
-
namespace esp32_ble_server {
|
8
|
-
|
9
|
-
BLE2901::BLE2901(const std::string &value) : BLE2901((uint8_t *) value.data(), value.length()) {}
|
10
|
-
BLE2901::BLE2901(const uint8_t *data, size_t length) : BLEDescriptor(esp32_ble::ESPBTUUID::from_uint16(0x2901)) {
|
11
|
-
this->set_value(data, length);
|
12
|
-
this->permissions_ = ESP_GATT_PERM_READ;
|
13
|
-
}
|
14
|
-
|
15
|
-
} // namespace esp32_ble_server
|
16
|
-
} // namespace esphome
|
17
|
-
|
18
|
-
#endif
|
@@ -1,19 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "ble_descriptor.h"
|
4
|
-
|
5
|
-
#ifdef USE_ESP32
|
6
|
-
|
7
|
-
namespace esphome {
|
8
|
-
namespace esp32_ble_server {
|
9
|
-
|
10
|
-
class BLE2901 : public BLEDescriptor {
|
11
|
-
public:
|
12
|
-
BLE2901(const std::string &value);
|
13
|
-
BLE2901(const uint8_t *data, size_t length);
|
14
|
-
};
|
15
|
-
|
16
|
-
} // namespace esp32_ble_server
|
17
|
-
} // namespace esphome
|
18
|
-
|
19
|
-
#endif
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import esphome.codegen as cg
|
2
|
-
import esphome.config_validation as cv
|
3
2
|
from esphome.components import sensor, time
|
3
|
+
import esphome.config_validation as cv
|
4
4
|
from esphome.const import (
|
5
5
|
CONF_TIME_ID,
|
6
|
+
DEVICE_CLASS_DURATION,
|
6
7
|
DEVICE_CLASS_TIMESTAMP,
|
7
8
|
ENTITY_CATEGORY_DIAGNOSTIC,
|
9
|
+
ICON_TIMER,
|
8
10
|
STATE_CLASS_TOTAL_INCREASING,
|
9
11
|
UNIT_SECOND,
|
10
|
-
ICON_TIMER,
|
11
|
-
DEVICE_CLASS_DURATION,
|
12
12
|
)
|
13
13
|
|
14
14
|
uptime_ns = cg.esphome_ns.namespace("uptime")
|
File without changes
|
File without changes
|
/esphome/components/uptime/{uptime_timestamp_sensor.cpp → sensor/uptime_timestamp_sensor.cpp}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|