diff --git a/esphome/components/ethernet/ethernet_component.cpp b/esphome/components/ethernet/ethernet_component.cpp index 75bdd29be7..7370cb4b44 100644 --- a/esphome/components/ethernet/ethernet_component.cpp +++ b/esphome/components/ethernet/ethernet_component.cpp @@ -631,7 +631,7 @@ void EthernetComponent::write_phy_register_(esp_eth_mac_t *mac, PHYRegister regi ESPHL_ERROR_CHECK(err, "Writing PHY Register failed"); if (this->type_ == ETHERNET_TYPE_RTL8201 && register_data.page) { - ESP_LOGD(TAG, "Select PHY Register Page 0x%02" PRIX32, 0x0); + ESP_LOGD(TAG, "Select PHY Register Page 0x00"); err = mac->write_phy_reg(mac, this->phy_addr_, eth_phy_psr_reg_addr, 0x0); ESPHL_ERROR_CHECK(err, "Select PHY Register Page 0 failed"); } diff --git a/esphome/components/gpio/one_wire/gpio_one_wire.cpp b/esphome/components/gpio/one_wire/gpio_one_wire.cpp index f47e8d58e3..34c2cf3c29 100644 --- a/esphome/components/gpio/one_wire/gpio_one_wire.cpp +++ b/esphome/components/gpio/one_wire/gpio_one_wire.cpp @@ -60,7 +60,7 @@ void HOT IRAM_ATTR GPIOOneWireBus::write_bit_(bool bit) { // recovery time: t_rec: min=1µs // ds18b20 appears to read the bus after roughly 14µs uint32_t delay0 = bit ? 6 : 60; - uint32_t delay1 = bit ? 54 : 5; + uint32_t delay1 = bit ? 59 : 5; // delay A/C delayMicroseconds(delay0); diff --git a/esphome/components/ili9xxx/ili9xxx_display.cpp b/esphome/components/ili9xxx/ili9xxx_display.cpp index 21d46ea825..de03df5d41 100644 --- a/esphome/components/ili9xxx/ili9xxx_display.cpp +++ b/esphome/components/ili9xxx/ili9xxx_display.cpp @@ -34,8 +34,8 @@ void ILI9XXXDisplay::setup() { ESP_LOGD(TAG, "Setting up ILI9xxx"); this->setup_pins_(); - this->init_lcd_(this->init_sequence_); - this->init_lcd_(this->extra_init_sequence_.data()); + this->init_lcd(this->init_sequence_); + this->init_lcd(this->extra_init_sequence_.data()); switch (this->pixel_mode_) { case PIXEL_MODE_16: if (this->is_18bitdisplay_) { @@ -405,7 +405,7 @@ void ILI9XXXDisplay::reset_() { } } -void ILI9XXXDisplay::init_lcd_(const uint8_t *addr) { +void ILI9XXXDisplay::init_lcd(const uint8_t *addr) { if (addr == nullptr) return; uint8_t cmd, x, num_args; @@ -427,6 +427,20 @@ void ILI9XXXDisplay::init_lcd_(const uint8_t *addr) { } } +void ILI9XXXGC9A01A::init_lcd(const uint8_t *addr) { + if (addr == nullptr) + return; + uint8_t cmd, x, num_args; + while ((cmd = *addr++) != 0) { + x = *addr++; + num_args = x & 0x7F; + this->send_command(cmd, addr, num_args); + addr += num_args; + if (x & 0x80) + delay(150); // NOLINT + } +} + // Tell the display controller where we want to draw pixels. void ILI9XXXDisplay::set_addr_window_(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { x1 += this->offset_x_; diff --git a/esphome/components/ili9xxx/ili9xxx_display.h b/esphome/components/ili9xxx/ili9xxx_display.h index 7a320dac7b..b60047a8c3 100644 --- a/esphome/components/ili9xxx/ili9xxx_display.h +++ b/esphome/components/ili9xxx/ili9xxx_display.h @@ -109,7 +109,7 @@ class ILI9XXXDisplay : public display::DisplayBuffer, virtual void set_madctl(); void display_(); - void init_lcd_(const uint8_t *addr); + virtual void init_lcd(const uint8_t *addr); void set_addr_window_(uint16_t x, uint16_t y, uint16_t x2, uint16_t y2); void reset_(); @@ -269,6 +269,7 @@ class ILI9XXXS3BoxLite : public ILI9XXXDisplay { class ILI9XXXGC9A01A : public ILI9XXXDisplay { public: ILI9XXXGC9A01A() : ILI9XXXDisplay(INITCMD_GC9A01A, 240, 240, true) {} + void init_lcd(const uint8_t *addr) override; }; //----------- ILI9XXX_24_TFT display -------------- diff --git a/esphome/components/mqtt/mqtt_datetime.cpp b/esphome/components/mqtt/mqtt_datetime.cpp index 4fa44aafb8..4ae6d0d416 100644 --- a/esphome/components/mqtt/mqtt_datetime.cpp +++ b/esphome/components/mqtt/mqtt_datetime.cpp @@ -6,12 +6,12 @@ #include "mqtt_const.h" #ifdef USE_MQTT -#ifdef USE_DATETIME_TIME +#ifdef USE_DATETIME_DATETIME namespace esphome { namespace mqtt { -static const char *const TAG = "mqtt.datetime.time"; +static const char *const TAG = "mqtt.datetime.datetime"; using namespace esphome::datetime; @@ -80,5 +80,5 @@ bool MQTTDateTimeComponent::publish_state(uint16_t year, uint8_t month, uint8_t } // namespace mqtt } // namespace esphome -#endif // USE_DATETIME_TIME +#endif // USE_DATETIME_DATETIME #endif // USE_MQTT diff --git a/esphome/components/mqtt/mqtt_datetime.h b/esphome/components/mqtt/mqtt_datetime.h index f0d68ad2e1..ba81c06cb3 100644 --- a/esphome/components/mqtt/mqtt_datetime.h +++ b/esphome/components/mqtt/mqtt_datetime.h @@ -3,7 +3,7 @@ #include "esphome/core/defines.h" #ifdef USE_MQTT -#ifdef USE_DATETIME_TIME +#ifdef USE_DATETIME_DATETIME #include "esphome/components/datetime/datetime_entity.h" #include "mqtt_component.h" @@ -17,7 +17,7 @@ class MQTTDateTimeComponent : public mqtt::MQTTComponent { * * @param time The time entity. */ - explicit MQTTDateTimeComponent(datetime::DateTimeEntity *time); + explicit MQTTDateTimeComponent(datetime::DateTimeEntity *datetime); // ========== INTERNAL METHODS ========== // (In most use cases you won't need these) @@ -41,5 +41,5 @@ class MQTTDateTimeComponent : public mqtt::MQTTComponent { } // namespace mqtt } // namespace esphome -#endif // USE_DATETIME_DATE +#endif // USE_DATETIME_DATETIME #endif // USE_MQTT diff --git a/esphome/components/veml7700/veml7700.cpp b/esphome/components/veml7700/veml7700.cpp index 68550811a1..a8c1411c68 100644 --- a/esphome/components/veml7700/veml7700.cpp +++ b/esphome/components/veml7700/veml7700.cpp @@ -243,7 +243,7 @@ ErrorCode VEML7700Component::configure_() { } PSMRegister psm{0}; - psm.PSM = PSM::PSM_MODE_1; + psm.PSM = PSMMode::PSM_MODE_1; psm.PSM_EN = false; ESP_LOGV(TAG, "Setting PSM to 0x%04X", psm.raw); err = this->write_register((uint8_t) CommandRegisters::PWR_SAVING, psm.raw_bytes, VEML_REG_SIZE); diff --git a/esphome/components/veml7700/veml7700.h b/esphome/components/veml7700/veml7700.h index fe5e1158e3..17fee6b851 100644 --- a/esphome/components/veml7700/veml7700.h +++ b/esphome/components/veml7700/veml7700.h @@ -24,7 +24,7 @@ enum class CommandRegisters : uint8_t { ALS_INT = 0x06 // R: ALS INT trigger event }; -enum Gain : uint8_t { +enum Gain : uint16_t { X_1 = 0, X_2 = 1, X_1_8 = 2, @@ -32,7 +32,7 @@ enum Gain : uint8_t { }; const uint8_t GAINS_COUNT = 4; -enum IntegrationTime : uint8_t { +enum IntegrationTime : uint16_t { INTEGRATION_TIME_25MS = 0b1100, INTEGRATION_TIME_50MS = 0b1000, INTEGRATION_TIME_100MS = 0b0000, @@ -42,14 +42,14 @@ enum IntegrationTime : uint8_t { }; const uint8_t INTEGRATION_TIMES_COUNT = 6; -enum Persistence : uint8_t { +enum Persistence : uint16_t { PERSISTENCE_1 = 0, PERSISTENCE_2 = 1, PERSISTENCE_4 = 2, PERSISTENCE_8 = 3, }; -enum PSM : uint8_t { +enum PSMMode : uint16_t { PSM_MODE_1 = 0, PSM_MODE_2 = 1, PSM_MODE_3 = 2, @@ -92,7 +92,7 @@ union PSMRegister { uint8_t raw_bytes[2]; struct { bool PSM_EN : 1; - uint8_t PSM : 2; + PSMMode PSM : 2; uint16_t reserved : 13; } __attribute__((packed)); }; diff --git a/esphome/components/voice_assistant/voice_assistant.cpp b/esphome/components/voice_assistant/voice_assistant.cpp index 1fa8236cf4..8a8a9e92aa 100644 --- a/esphome/components/voice_assistant/voice_assistant.cpp +++ b/esphome/components/voice_assistant/voice_assistant.cpp @@ -799,7 +799,7 @@ void VoiceAssistant::on_audio(const api::VoiceAssistantAudio &msg) { this->speaker_buffer_index_ += msg.data.length(); this->speaker_buffer_size_ += msg.data.length(); this->speaker_bytes_received_ += msg.data.length(); - ESP_LOGV(TAG, "Received audio: %" PRId32 " bytes from API", msg.data.length()); + ESP_LOGV(TAG, "Received audio: %u bytes from API", msg.data.length()); } else { ESP_LOGE(TAG, "Cannot receive audio, buffer is full"); } diff --git a/tests/components/a01nyub/common.yaml b/tests/components/a01nyub/common.yaml new file mode 100644 index 0000000000..0717acfff7 --- /dev/null +++ b/tests/components/a01nyub/common.yaml @@ -0,0 +1,11 @@ +uart: + - id: uart_a01nyub + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: a01nyub + id: a01nyub_sensor + name: a01nyub Distance + uart_id: uart_a01nyub diff --git a/tests/components/a01nyub/test.esp32-c3-idf.yaml b/tests/components/a01nyub/test.esp32-c3-idf.yaml index 3132f77136..b516342f3b 100644 --- a/tests/components/a01nyub/test.esp32-c3-idf.yaml +++ b/tests/components/a01nyub/test.esp32-c3-idf.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/a01nyub/test.esp32-c3.yaml b/tests/components/a01nyub/test.esp32-c3.yaml index 3132f77136..b516342f3b 100644 --- a/tests/components/a01nyub/test.esp32-c3.yaml +++ b/tests/components/a01nyub/test.esp32-c3.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/a01nyub/test.esp32-idf.yaml b/tests/components/a01nyub/test.esp32-idf.yaml index 79fc9c5fbf..f486544afa 100644 --- a/tests/components/a01nyub/test.esp32-idf.yaml +++ b/tests/components/a01nyub/test.esp32-idf.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/a01nyub/test.esp32.yaml b/tests/components/a01nyub/test.esp32.yaml index 79fc9c5fbf..f486544afa 100644 --- a/tests/components/a01nyub/test.esp32.yaml +++ b/tests/components/a01nyub/test.esp32.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/a01nyub/test.esp8266.yaml b/tests/components/a01nyub/test.esp8266.yaml index 3132f77136..b516342f3b 100644 --- a/tests/components/a01nyub/test.esp8266.yaml +++ b/tests/components/a01nyub/test.esp8266.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/a01nyub/test.rp2040.yaml b/tests/components/a01nyub/test.rp2040.yaml index 3132f77136..b516342f3b 100644 --- a/tests/components/a01nyub/test.rp2040.yaml +++ b/tests/components/a01nyub/test.rp2040.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/api/common.yaml b/tests/components/api/common.yaml index 3c56811b95..e0b900f92d 100644 --- a/tests/components/api/common.yaml +++ b/tests/components/api/common.yaml @@ -50,12 +50,12 @@ api: then: - logger.log: # yamllint disable rule:line-length - format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)" + format: "Bool: %s (%u), Int: %ld (%u), Float: %f (%u), String: %s (%u)" # yamllint enable rule:line-length args: - YESNO(bool_arr[0]) - bool_arr.size() - - int_arr[0] + - (long) int_arr[0] - int_arr.size() - float_arr[0] - float_arr.size() diff --git a/tests/components/esp32_hall/common.yaml b/tests/components/esp32_hall/common.yaml deleted file mode 100644 index f8429f5aa0..0000000000 --- a/tests/components/esp32_hall/common.yaml +++ /dev/null @@ -1,3 +0,0 @@ -sensor: - - platform: esp32_hall - name: ESP32 Hall Sensor diff --git a/tests/components/esp32_hall/test.esp32-idf.yaml b/tests/components/esp32_hall/test.esp32-idf.yaml deleted file mode 100644 index dade44d145..0000000000 --- a/tests/components/esp32_hall/test.esp32-idf.yaml +++ /dev/null @@ -1 +0,0 @@ -<<: !include common.yaml diff --git a/tests/components/esp32_hall/test.esp32.yaml b/tests/components/esp32_hall/test.esp32.yaml index dade44d145..f8429f5aa0 100644 --- a/tests/components/esp32_hall/test.esp32.yaml +++ b/tests/components/esp32_hall/test.esp32.yaml @@ -1 +1,3 @@ -<<: !include common.yaml +sensor: + - platform: esp32_hall + name: ESP32 Hall Sensor diff --git a/tests/components/ethernet/lan8720.esp32.yaml b/tests/components/ethernet/common-dp83848.yaml similarity index 92% rename from tests/components/ethernet/lan8720.esp32.yaml rename to tests/components/ethernet/common-dp83848.yaml index b9ed9cb036..5b6ed3e8d0 100644 --- a/tests/components/ethernet/lan8720.esp32.yaml +++ b/tests/components/ethernet/common-dp83848.yaml @@ -1,5 +1,5 @@ ethernet: - type: LAN8720 + type: DP83848 mdc_pin: 23 mdio_pin: 25 clk_mode: GPIO0_IN diff --git a/tests/components/ethernet/lan8720.esp32-idf.yaml b/tests/components/ethernet/common-ip101.yaml similarity index 92% rename from tests/components/ethernet/lan8720.esp32-idf.yaml rename to tests/components/ethernet/common-ip101.yaml index b9ed9cb036..5ca369cce1 100644 --- a/tests/components/ethernet/lan8720.esp32-idf.yaml +++ b/tests/components/ethernet/common-ip101.yaml @@ -1,5 +1,5 @@ ethernet: - type: LAN8720 + type: IP101 mdc_pin: 23 mdio_pin: 25 clk_mode: GPIO0_IN diff --git a/tests/components/ethernet/common-jl1101.yaml b/tests/components/ethernet/common-jl1101.yaml new file mode 100644 index 0000000000..639542d807 --- /dev/null +++ b/tests/components/ethernet/common-jl1101.yaml @@ -0,0 +1,12 @@ +ethernet: + type: JL1101 + mdc_pin: 23 + mdio_pin: 25 + clk_mode: GPIO0_IN + phy_addr: 0 + power_pin: 26 + manual_ip: + static_ip: 192.168.178.56 + gateway: 192.168.178.1 + subnet: 255.255.255.0 + domain: .local diff --git a/tests/components/ethernet/common-ksz8081.yaml b/tests/components/ethernet/common-ksz8081.yaml new file mode 100644 index 0000000000..167606a1eb --- /dev/null +++ b/tests/components/ethernet/common-ksz8081.yaml @@ -0,0 +1,12 @@ +ethernet: + type: KSZ8081 + mdc_pin: 23 + mdio_pin: 25 + clk_mode: GPIO0_IN + phy_addr: 0 + power_pin: 26 + manual_ip: + static_ip: 192.168.178.56 + gateway: 192.168.178.1 + subnet: 255.255.255.0 + domain: .local diff --git a/tests/components/ethernet/common-ksz8081rna.yaml b/tests/components/ethernet/common-ksz8081rna.yaml new file mode 100644 index 0000000000..f506906b1b --- /dev/null +++ b/tests/components/ethernet/common-ksz8081rna.yaml @@ -0,0 +1,12 @@ +ethernet: + type: KSZ8081RNA + mdc_pin: 23 + mdio_pin: 25 + clk_mode: GPIO0_IN + phy_addr: 0 + power_pin: 26 + manual_ip: + static_ip: 192.168.178.56 + gateway: 192.168.178.1 + subnet: 255.255.255.0 + domain: .local diff --git a/tests/components/ethernet/common.yaml b/tests/components/ethernet/common-lan8720.yaml similarity index 100% rename from tests/components/ethernet/common.yaml rename to tests/components/ethernet/common-lan8720.yaml diff --git a/tests/components/ethernet/common-rtl8201.yaml b/tests/components/ethernet/common-rtl8201.yaml new file mode 100644 index 0000000000..43842e7c9f --- /dev/null +++ b/tests/components/ethernet/common-rtl8201.yaml @@ -0,0 +1,12 @@ +ethernet: + type: RTL8201 + mdc_pin: 23 + mdio_pin: 25 + clk_mode: GPIO0_IN + phy_addr: 0 + power_pin: 26 + manual_ip: + static_ip: 192.168.178.56 + gateway: 192.168.178.1 + subnet: 255.255.255.0 + domain: .local diff --git a/tests/components/ethernet/w5500.esp32.yaml b/tests/components/ethernet/common-w5500.yaml similarity index 57% rename from tests/components/ethernet/w5500.esp32.yaml rename to tests/components/ethernet/common-w5500.yaml index 6fdccb36e3..76661a75c3 100644 --- a/tests/components/ethernet/w5500.esp32.yaml +++ b/tests/components/ethernet/common-w5500.yaml @@ -1,11 +1,11 @@ ethernet: type: W5500 - clk_pin: GPIO19 - mosi_pin: GPIO21 - miso_pin: GPIO23 - cs_pin: GPIO18 - interrupt_pin: GPIO36 - reset_pin: GPIO22 + clk_pin: 19 + mosi_pin: 21 + miso_pin: 23 + cs_pin: 18 + interrupt_pin: 36 + reset_pin: 22 clock_speed: 10Mhz manual_ip: static_ip: 192.168.178.56 diff --git a/tests/components/ethernet/test-dp83848.esp32-idf.yaml b/tests/components/ethernet/test-dp83848.esp32-idf.yaml new file mode 100644 index 0000000000..906bfba17c --- /dev/null +++ b/tests/components/ethernet/test-dp83848.esp32-idf.yaml @@ -0,0 +1 @@ +<<: !include common-dp83848.yaml diff --git a/tests/components/ethernet/test-dp83848.esp32.yaml b/tests/components/ethernet/test-dp83848.esp32.yaml new file mode 100644 index 0000000000..906bfba17c --- /dev/null +++ b/tests/components/ethernet/test-dp83848.esp32.yaml @@ -0,0 +1 @@ +<<: !include common-dp83848.yaml diff --git a/tests/components/ethernet/test-ip101.esp32-idf.yaml b/tests/components/ethernet/test-ip101.esp32-idf.yaml new file mode 100644 index 0000000000..e52329d7ea --- /dev/null +++ b/tests/components/ethernet/test-ip101.esp32-idf.yaml @@ -0,0 +1 @@ +<<: !include common-ip101.yaml diff --git a/tests/components/ethernet/test-ip101.esp32.yaml b/tests/components/ethernet/test-ip101.esp32.yaml new file mode 100644 index 0000000000..e52329d7ea --- /dev/null +++ b/tests/components/ethernet/test-ip101.esp32.yaml @@ -0,0 +1 @@ +<<: !include common-ip101.yaml diff --git a/tests/components/ethernet/test-jl1101.esp32-idf.yaml b/tests/components/ethernet/test-jl1101.esp32-idf.yaml new file mode 100644 index 0000000000..95d8cd1f21 --- /dev/null +++ b/tests/components/ethernet/test-jl1101.esp32-idf.yaml @@ -0,0 +1 @@ +<<: !include common-jl1101.yaml diff --git a/tests/components/ethernet/test-jl1101.esp32.yaml b/tests/components/ethernet/test-jl1101.esp32.yaml new file mode 100644 index 0000000000..95d8cd1f21 --- /dev/null +++ b/tests/components/ethernet/test-jl1101.esp32.yaml @@ -0,0 +1 @@ +<<: !include common-jl1101.yaml diff --git a/tests/components/ethernet/test-ksz8081.esp32-idf.yaml b/tests/components/ethernet/test-ksz8081.esp32-idf.yaml new file mode 100644 index 0000000000..8f3c750c77 --- /dev/null +++ b/tests/components/ethernet/test-ksz8081.esp32-idf.yaml @@ -0,0 +1 @@ +<<: !include common-ksz8081.yaml diff --git a/tests/components/ethernet/test-ksz8081.esp32.yaml b/tests/components/ethernet/test-ksz8081.esp32.yaml new file mode 100644 index 0000000000..8f3c750c77 --- /dev/null +++ b/tests/components/ethernet/test-ksz8081.esp32.yaml @@ -0,0 +1 @@ +<<: !include common-ksz8081.yaml diff --git a/tests/components/ethernet/test-ksz8081rna.esp32-idf.yaml b/tests/components/ethernet/test-ksz8081rna.esp32-idf.yaml new file mode 100644 index 0000000000..a48e591996 --- /dev/null +++ b/tests/components/ethernet/test-ksz8081rna.esp32-idf.yaml @@ -0,0 +1 @@ +<<: !include common-ksz8081rna.yaml diff --git a/tests/components/ethernet/test-ksz8081rna.esp32.yaml b/tests/components/ethernet/test-ksz8081rna.esp32.yaml new file mode 100644 index 0000000000..a48e591996 --- /dev/null +++ b/tests/components/ethernet/test-ksz8081rna.esp32.yaml @@ -0,0 +1 @@ +<<: !include common-ksz8081rna.yaml diff --git a/tests/components/ethernet/test-lan8720.esp32-idf.yaml b/tests/components/ethernet/test-lan8720.esp32-idf.yaml new file mode 100644 index 0000000000..3df9ac874a --- /dev/null +++ b/tests/components/ethernet/test-lan8720.esp32-idf.yaml @@ -0,0 +1 @@ +<<: !include common-lan8720.yaml diff --git a/tests/components/ethernet/test-lan8720.esp32.yaml b/tests/components/ethernet/test-lan8720.esp32.yaml new file mode 100644 index 0000000000..3df9ac874a --- /dev/null +++ b/tests/components/ethernet/test-lan8720.esp32.yaml @@ -0,0 +1 @@ +<<: !include common-lan8720.yaml diff --git a/tests/components/ethernet/test-rtl8201.esp32-idf.yaml b/tests/components/ethernet/test-rtl8201.esp32-idf.yaml new file mode 100644 index 0000000000..e69f88dc94 --- /dev/null +++ b/tests/components/ethernet/test-rtl8201.esp32-idf.yaml @@ -0,0 +1 @@ +<<: !include common-rtl8201.yaml diff --git a/tests/components/ethernet/test-rtl8201.esp32.yaml b/tests/components/ethernet/test-rtl8201.esp32.yaml new file mode 100644 index 0000000000..e69f88dc94 --- /dev/null +++ b/tests/components/ethernet/test-rtl8201.esp32.yaml @@ -0,0 +1 @@ +<<: !include common-rtl8201.yaml diff --git a/tests/components/ethernet/test-w5500.esp32-idf.yaml b/tests/components/ethernet/test-w5500.esp32-idf.yaml new file mode 100644 index 0000000000..36f1b5365f --- /dev/null +++ b/tests/components/ethernet/test-w5500.esp32-idf.yaml @@ -0,0 +1 @@ +<<: !include common-w5500.yaml diff --git a/tests/components/ethernet/test-w5500.esp32.yaml b/tests/components/ethernet/test-w5500.esp32.yaml new file mode 100644 index 0000000000..36f1b5365f --- /dev/null +++ b/tests/components/ethernet/test-w5500.esp32.yaml @@ -0,0 +1 @@ +<<: !include common-w5500.yaml diff --git a/tests/components/ethernet/test.esp32-idf.yaml b/tests/components/ethernet/test.esp32-idf.yaml deleted file mode 100644 index dade44d145..0000000000 --- a/tests/components/ethernet/test.esp32-idf.yaml +++ /dev/null @@ -1 +0,0 @@ -<<: !include common.yaml diff --git a/tests/components/ethernet/test.esp32.yaml b/tests/components/ethernet/test.esp32.yaml deleted file mode 100644 index dade44d145..0000000000 --- a/tests/components/ethernet/test.esp32.yaml +++ /dev/null @@ -1 +0,0 @@ -<<: !include common.yaml diff --git a/tests/components/ethernet/w5500.esp32-idf.yaml b/tests/components/ethernet/w5500.esp32-idf.yaml deleted file mode 100644 index 6fdccb36e3..0000000000 --- a/tests/components/ethernet/w5500.esp32-idf.yaml +++ /dev/null @@ -1,14 +0,0 @@ -ethernet: - type: W5500 - clk_pin: GPIO19 - mosi_pin: GPIO21 - miso_pin: GPIO23 - cs_pin: GPIO18 - interrupt_pin: GPIO36 - reset_pin: GPIO22 - clock_speed: 10Mhz - manual_ip: - static_ip: 192.168.178.56 - gateway: 192.168.178.1 - subnet: 255.255.255.0 - domain: .local diff --git a/tests/components/http_request/common.yaml b/tests/components/http_request/common.yaml index 83b334ca2d..589b7fb4b4 100644 --- a/tests/components/http_request/common.yaml +++ b/tests/components/http_request/common.yaml @@ -15,10 +15,10 @@ esphome: on_response: then: - logger.log: - format: "Response status: %d, Duration: %u ms" + format: "Response status: %d, Duration: %lu ms" args: - response->status_code - - response->duration_ms + - (long) response->duration_ms - http_request.post: url: https://esphome.io headers: diff --git a/tests/components/wireguard/common.yaml b/tests/components/wireguard/common.yaml new file mode 100644 index 0000000000..cd7ab1075e --- /dev/null +++ b/tests/components/wireguard/common.yaml @@ -0,0 +1,59 @@ +wifi: + ssid: "MySSID1" + password: "password1" + +time: + - platform: sntp + +wireguard: + address: 172.16.34.100 + netmask: 255.255.255.0 + # NEVER use the following keys for your VPN -- they are now public! + private_key: wPBMxtNYH3mChicrbpsRpZIasIdPq3yZuthn23FbGG8= + peer_public_key: Hs2JfikvYU03/Kv3YoAs1hrUIPPTEkpsZKSPUljE9yc= + peer_preshared_key: 20fjM5GRnSolGPC5SRj9ljgIUyQfruv0B0bvLl3Yt60= + peer_endpoint: wg.server.example + peer_persistent_keepalive: 25s + peer_allowed_ips: + - 172.16.34.0/24 + - 192.168.4.0/24 + +binary_sensor: + - platform: wireguard + status: + name: 'WireGuard Status' + enabled: + name: 'WireGuard Enabled' + +sensor: + - platform: wireguard + latest_handshake: + name: 'WireGuard Latest Handshake' + +text_sensor: + - platform: wireguard + address: + name: 'WireGuard Address' + +button: + - platform: template + name: 'Toggle WireGuard' + entity_category: config + on_press: + - if: + condition: wireguard.enabled + then: + - wireguard.disable: + else: + - wireguard.enable: + + - platform: template + name: 'Log WireGuard status' + entity_category: config + on_press: + - if: + condition: wireguard.peer_online + then: + - logger.log: 'wireguard remote peer is online' + else: + - logger.log: 'wireguard remote peer is offline' diff --git a/tests/components/wireguard/test.bk72xx.yaml b/tests/components/wireguard/test.bk72xx.yaml index 85325139a9..dade44d145 100644 --- a/tests/components/wireguard/test.bk72xx.yaml +++ b/tests/components/wireguard/test.bk72xx.yaml @@ -1,59 +1 @@ -wifi: - ssid: "MySSID1" - password: "password1" - -time: - - platform: sntp - -wireguard: - address: 172.16.34.100 - netmask: 255.255.255.0 - # NEVER use the following keys for your vpn, they are now public! - private_key: wPBMxtNYH3mChicrbpsRpZIasIdPq3yZuthn23FbGG8= - peer_public_key: Hs2JfikvYU03/Kv3YoAs1hrUIPPTEkpsZKSPUljE9yc= - peer_preshared_key: 20fjM5GRnSolGPC5SRj9ljgIUyQfruv0B0bvLl3Yt60= - peer_endpoint: wg.server.example - peer_persistent_keepalive: 25s - peer_allowed_ips: - - 172.16.34.0/24 - - 192.168.4.0/24 - -binary_sensor: - - platform: wireguard - status: - name: 'WireGuard Status' - enabled: - name: 'WireGuard Enabled' - -sensor: - - platform: wireguard - latest_handshake: - name: 'WireGuard Latest Handshake' - -text_sensor: - - platform: wireguard - address: - name: 'WireGuard Address' - -button: - - platform: template - name: 'Toggle WireGuard' - entity_category: config - on_press: - - if: - condition: wireguard.enabled - then: - - wireguard.disable: - else: - - wireguard.enable: - - - platform: template - name: 'Log WireGuard status' - entity_category: config - on_press: - - if: - condition: wireguard.peer_online - then: - - logger.log: 'wireguard remote peer is online' - else: - - logger.log: 'wireguard remote peer is offline' +<<: !include common.yaml diff --git a/tests/components/wireguard/test.esp32-c3-idf.yaml b/tests/components/wireguard/test.esp32-c3-idf.yaml index 37d1727842..dade44d145 100644 --- a/tests/components/wireguard/test.esp32-c3-idf.yaml +++ b/tests/components/wireguard/test.esp32-c3-idf.yaml @@ -1,60 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - -wireguard: - id: vpn - address: 172.16.34.100 - netmask: 255.255.255.0 - # NEVER use the following keys for your vpn, they are now public! - private_key: wPBMxtNYH3mChicrbpsRpZIasIdPq3yZuthn23FbGG8= - peer_public_key: Hs2JfikvYU03/Kv3YoAs1hrUIPPTEkpsZKSPUljE9yc= - peer_preshared_key: 20fjM5GRnSolGPC5SRj9ljgIUyQfruv0B0bvLl3Yt60= - peer_endpoint: wg.server.example - peer_persistent_keepalive: 25s - peer_allowed_ips: - - 172.16.34.0/24 - - 192.168.4.0/24 - -binary_sensor: - - platform: wireguard - status: - name: 'WireGuard Status' - enabled: - name: 'WireGuard Enabled' - -sensor: - - platform: wireguard - latest_handshake: - name: 'WireGuard Latest Handshake' - -text_sensor: - - platform: wireguard - address: - name: 'WireGuard Address' - -button: - - platform: template - name: 'Toggle WireGuard' - entity_category: config - on_press: - - if: - condition: wireguard.enabled - then: - - wireguard.disable: - else: - - wireguard.enable: - - - platform: template - name: 'Log WireGuard status' - entity_category: config - on_press: - - if: - condition: wireguard.peer_online - then: - - logger.log: 'wireguard remote peer is online' - else: - - logger.log: 'wireguard remote peer is offline' +<<: !include common.yaml diff --git a/tests/components/wireguard/test.esp32-c3.yaml b/tests/components/wireguard/test.esp32-c3.yaml index 37d1727842..dade44d145 100644 --- a/tests/components/wireguard/test.esp32-c3.yaml +++ b/tests/components/wireguard/test.esp32-c3.yaml @@ -1,60 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - -wireguard: - id: vpn - address: 172.16.34.100 - netmask: 255.255.255.0 - # NEVER use the following keys for your vpn, they are now public! - private_key: wPBMxtNYH3mChicrbpsRpZIasIdPq3yZuthn23FbGG8= - peer_public_key: Hs2JfikvYU03/Kv3YoAs1hrUIPPTEkpsZKSPUljE9yc= - peer_preshared_key: 20fjM5GRnSolGPC5SRj9ljgIUyQfruv0B0bvLl3Yt60= - peer_endpoint: wg.server.example - peer_persistent_keepalive: 25s - peer_allowed_ips: - - 172.16.34.0/24 - - 192.168.4.0/24 - -binary_sensor: - - platform: wireguard - status: - name: 'WireGuard Status' - enabled: - name: 'WireGuard Enabled' - -sensor: - - platform: wireguard - latest_handshake: - name: 'WireGuard Latest Handshake' - -text_sensor: - - platform: wireguard - address: - name: 'WireGuard Address' - -button: - - platform: template - name: 'Toggle WireGuard' - entity_category: config - on_press: - - if: - condition: wireguard.enabled - then: - - wireguard.disable: - else: - - wireguard.enable: - - - platform: template - name: 'Log WireGuard status' - entity_category: config - on_press: - - if: - condition: wireguard.peer_online - then: - - logger.log: 'wireguard remote peer is online' - else: - - logger.log: 'wireguard remote peer is offline' +<<: !include common.yaml diff --git a/tests/components/wireguard/test.esp32-idf.yaml b/tests/components/wireguard/test.esp32-idf.yaml index 9ea7f00bdb..2798f8e566 100644 --- a/tests/components/wireguard/test.esp32-idf.yaml +++ b/tests/components/wireguard/test.esp32-idf.yaml @@ -1,62 +1,4 @@ -wifi: - ssid: "MySSID1" - password: "password1" +<<: !include common.yaml network: enable_ipv6: true - -time: - - platform: sntp - -wireguard: - address: 172.16.34.100 - netmask: 255.255.255.0 - # NEVER use the following keys for your vpn, they are now public! - private_key: wPBMxtNYH3mChicrbpsRpZIasIdPq3yZuthn23FbGG8= - peer_public_key: Hs2JfikvYU03/Kv3YoAs1hrUIPPTEkpsZKSPUljE9yc= - peer_preshared_key: 20fjM5GRnSolGPC5SRj9ljgIUyQfruv0B0bvLl3Yt60= - peer_endpoint: wg.server.example - peer_persistent_keepalive: 25s - peer_allowed_ips: - - 172.16.34.0/24 - - 192.168.4.0/24 - -binary_sensor: - - platform: wireguard - status: - name: 'WireGuard Status' - enabled: - name: 'WireGuard Enabled' - -sensor: - - platform: wireguard - latest_handshake: - name: 'WireGuard Latest Handshake' - -text_sensor: - - platform: wireguard - address: - name: 'WireGuard Address' - -button: - - platform: template - name: 'Toggle WireGuard' - entity_category: config - on_press: - - if: - condition: wireguard.enabled - then: - - wireguard.disable: - else: - - wireguard.enable: - - - platform: template - name: 'Log WireGuard status' - entity_category: config - on_press: - - if: - condition: wireguard.peer_online - then: - - logger.log: 'wireguard remote peer is online' - else: - - logger.log: 'wireguard remote peer is offline' diff --git a/tests/components/wireguard/test.esp32.yaml b/tests/components/wireguard/test.esp32.yaml index 9ea7f00bdb..2798f8e566 100644 --- a/tests/components/wireguard/test.esp32.yaml +++ b/tests/components/wireguard/test.esp32.yaml @@ -1,62 +1,4 @@ -wifi: - ssid: "MySSID1" - password: "password1" +<<: !include common.yaml network: enable_ipv6: true - -time: - - platform: sntp - -wireguard: - address: 172.16.34.100 - netmask: 255.255.255.0 - # NEVER use the following keys for your vpn, they are now public! - private_key: wPBMxtNYH3mChicrbpsRpZIasIdPq3yZuthn23FbGG8= - peer_public_key: Hs2JfikvYU03/Kv3YoAs1hrUIPPTEkpsZKSPUljE9yc= - peer_preshared_key: 20fjM5GRnSolGPC5SRj9ljgIUyQfruv0B0bvLl3Yt60= - peer_endpoint: wg.server.example - peer_persistent_keepalive: 25s - peer_allowed_ips: - - 172.16.34.0/24 - - 192.168.4.0/24 - -binary_sensor: - - platform: wireguard - status: - name: 'WireGuard Status' - enabled: - name: 'WireGuard Enabled' - -sensor: - - platform: wireguard - latest_handshake: - name: 'WireGuard Latest Handshake' - -text_sensor: - - platform: wireguard - address: - name: 'WireGuard Address' - -button: - - platform: template - name: 'Toggle WireGuard' - entity_category: config - on_press: - - if: - condition: wireguard.enabled - then: - - wireguard.disable: - else: - - wireguard.enable: - - - platform: template - name: 'Log WireGuard status' - entity_category: config - on_press: - - if: - condition: wireguard.peer_online - then: - - logger.log: 'wireguard remote peer is online' - else: - - logger.log: 'wireguard remote peer is offline' diff --git a/tests/components/wireguard/test.esp8266.yaml b/tests/components/wireguard/test.esp8266.yaml index 9ea7f00bdb..2798f8e566 100644 --- a/tests/components/wireguard/test.esp8266.yaml +++ b/tests/components/wireguard/test.esp8266.yaml @@ -1,62 +1,4 @@ -wifi: - ssid: "MySSID1" - password: "password1" +<<: !include common.yaml network: enable_ipv6: true - -time: - - platform: sntp - -wireguard: - address: 172.16.34.100 - netmask: 255.255.255.0 - # NEVER use the following keys for your vpn, they are now public! - private_key: wPBMxtNYH3mChicrbpsRpZIasIdPq3yZuthn23FbGG8= - peer_public_key: Hs2JfikvYU03/Kv3YoAs1hrUIPPTEkpsZKSPUljE9yc= - peer_preshared_key: 20fjM5GRnSolGPC5SRj9ljgIUyQfruv0B0bvLl3Yt60= - peer_endpoint: wg.server.example - peer_persistent_keepalive: 25s - peer_allowed_ips: - - 172.16.34.0/24 - - 192.168.4.0/24 - -binary_sensor: - - platform: wireguard - status: - name: 'WireGuard Status' - enabled: - name: 'WireGuard Enabled' - -sensor: - - platform: wireguard - latest_handshake: - name: 'WireGuard Latest Handshake' - -text_sensor: - - platform: wireguard - address: - name: 'WireGuard Address' - -button: - - platform: template - name: 'Toggle WireGuard' - entity_category: config - on_press: - - if: - condition: wireguard.enabled - then: - - wireguard.disable: - else: - - wireguard.enable: - - - platform: template - name: 'Log WireGuard status' - entity_category: config - on_press: - - if: - condition: wireguard.peer_online - then: - - logger.log: 'wireguard remote peer is online' - else: - - logger.log: 'wireguard remote peer is offline'