diff --git a/tests/components/absolute_humidity/common.yaml b/tests/components/absolute_humidity/common.yaml new file mode 100644 index 000000000..87a99f520 --- /dev/null +++ b/tests/components/absolute_humidity/common.yaml @@ -0,0 +1,21 @@ +sensor: + - platform: absolute_humidity + name: Absolute Humidity + temperature: template_temperature + humidity: template_humidity + - platform: template + id: template_humidity + lambda: |- + if (millis() > 10000) { + return 0.6; + } else { + return 0.0; + } + - platform: template + id: template_temperature + lambda: |- + if (millis() > 10000) { + return 42.0; + } else { + return 0.0; + } diff --git a/tests/components/absolute_humidity/test.esp32-c3-idf.yaml b/tests/components/absolute_humidity/test.esp32-c3-idf.yaml index 87a99f520..dade44d14 100644 --- a/tests/components/absolute_humidity/test.esp32-c3-idf.yaml +++ b/tests/components/absolute_humidity/test.esp32-c3-idf.yaml @@ -1,21 +1 @@ -sensor: - - platform: absolute_humidity - name: Absolute Humidity - temperature: template_temperature - humidity: template_humidity - - platform: template - id: template_humidity - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } +<<: !include common.yaml diff --git a/tests/components/absolute_humidity/test.esp32-c3.yaml b/tests/components/absolute_humidity/test.esp32-c3.yaml index 87a99f520..dade44d14 100644 --- a/tests/components/absolute_humidity/test.esp32-c3.yaml +++ b/tests/components/absolute_humidity/test.esp32-c3.yaml @@ -1,21 +1 @@ -sensor: - - platform: absolute_humidity - name: Absolute Humidity - temperature: template_temperature - humidity: template_humidity - - platform: template - id: template_humidity - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } +<<: !include common.yaml diff --git a/tests/components/absolute_humidity/test.esp32-idf.yaml b/tests/components/absolute_humidity/test.esp32-idf.yaml index 87a99f520..dade44d14 100644 --- a/tests/components/absolute_humidity/test.esp32-idf.yaml +++ b/tests/components/absolute_humidity/test.esp32-idf.yaml @@ -1,21 +1 @@ -sensor: - - platform: absolute_humidity - name: Absolute Humidity - temperature: template_temperature - humidity: template_humidity - - platform: template - id: template_humidity - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } +<<: !include common.yaml diff --git a/tests/components/absolute_humidity/test.esp32.yaml b/tests/components/absolute_humidity/test.esp32.yaml index 87a99f520..dade44d14 100644 --- a/tests/components/absolute_humidity/test.esp32.yaml +++ b/tests/components/absolute_humidity/test.esp32.yaml @@ -1,21 +1 @@ -sensor: - - platform: absolute_humidity - name: Absolute Humidity - temperature: template_temperature - humidity: template_humidity - - platform: template - id: template_humidity - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } +<<: !include common.yaml diff --git a/tests/components/absolute_humidity/test.esp8266.yaml b/tests/components/absolute_humidity/test.esp8266.yaml index 87a99f520..dade44d14 100644 --- a/tests/components/absolute_humidity/test.esp8266.yaml +++ b/tests/components/absolute_humidity/test.esp8266.yaml @@ -1,21 +1 @@ -sensor: - - platform: absolute_humidity - name: Absolute Humidity - temperature: template_temperature - humidity: template_humidity - - platform: template - id: template_humidity - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } +<<: !include common.yaml diff --git a/tests/components/absolute_humidity/test.rp2040.yaml b/tests/components/absolute_humidity/test.rp2040.yaml index 87a99f520..dade44d14 100644 --- a/tests/components/absolute_humidity/test.rp2040.yaml +++ b/tests/components/absolute_humidity/test.rp2040.yaml @@ -1,21 +1 @@ -sensor: - - platform: absolute_humidity - name: Absolute Humidity - temperature: template_temperature - humidity: template_humidity - - platform: template - id: template_humidity - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } +<<: !include common.yaml diff --git a/tests/components/airthings_wave_mini/common.yaml b/tests/components/airthings_wave_mini/common.yaml new file mode 100644 index 000000000..87902e6c6 --- /dev/null +++ b/tests/components/airthings_wave_mini/common.yaml @@ -0,0 +1,22 @@ +esp32_ble_tracker: + +ble_client: + - mac_address: 01:02:03:04:05:06 + id: airthingsmini01 + +sensor: + - id: airthingswm + platform: airthings_wave_mini + ble_client_id: airthingsmini01 + update_interval: 5min + battery_update_interval: 12h + temperature: + name: Wave Mini Temperature + humidity: + name: Wave Mini Humidity + pressure: + name: Wave Mini Pressure + tvoc: + name: Wave Mini VOC + battery_voltage: + name: Wave Mini Battery Voltage diff --git a/tests/components/airthings_wave_mini/test.esp32-c3-idf.yaml b/tests/components/airthings_wave_mini/test.esp32-c3-idf.yaml index 87902e6c6..dade44d14 100644 --- a/tests/components/airthings_wave_mini/test.esp32-c3-idf.yaml +++ b/tests/components/airthings_wave_mini/test.esp32-c3-idf.yaml @@ -1,22 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: airthingsmini01 - -sensor: - - id: airthingswm - platform: airthings_wave_mini - ble_client_id: airthingsmini01 - update_interval: 5min - battery_update_interval: 12h - temperature: - name: Wave Mini Temperature - humidity: - name: Wave Mini Humidity - pressure: - name: Wave Mini Pressure - tvoc: - name: Wave Mini VOC - battery_voltage: - name: Wave Mini Battery Voltage +<<: !include common.yaml diff --git a/tests/components/airthings_wave_mini/test.esp32-c3.yaml b/tests/components/airthings_wave_mini/test.esp32-c3.yaml index 87902e6c6..dade44d14 100644 --- a/tests/components/airthings_wave_mini/test.esp32-c3.yaml +++ b/tests/components/airthings_wave_mini/test.esp32-c3.yaml @@ -1,22 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: airthingsmini01 - -sensor: - - id: airthingswm - platform: airthings_wave_mini - ble_client_id: airthingsmini01 - update_interval: 5min - battery_update_interval: 12h - temperature: - name: Wave Mini Temperature - humidity: - name: Wave Mini Humidity - pressure: - name: Wave Mini Pressure - tvoc: - name: Wave Mini VOC - battery_voltage: - name: Wave Mini Battery Voltage +<<: !include common.yaml diff --git a/tests/components/airthings_wave_mini/test.esp32-idf.yaml b/tests/components/airthings_wave_mini/test.esp32-idf.yaml index 87902e6c6..dade44d14 100644 --- a/tests/components/airthings_wave_mini/test.esp32-idf.yaml +++ b/tests/components/airthings_wave_mini/test.esp32-idf.yaml @@ -1,22 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: airthingsmini01 - -sensor: - - id: airthingswm - platform: airthings_wave_mini - ble_client_id: airthingsmini01 - update_interval: 5min - battery_update_interval: 12h - temperature: - name: Wave Mini Temperature - humidity: - name: Wave Mini Humidity - pressure: - name: Wave Mini Pressure - tvoc: - name: Wave Mini VOC - battery_voltage: - name: Wave Mini Battery Voltage +<<: !include common.yaml diff --git a/tests/components/airthings_wave_mini/test.esp32.yaml b/tests/components/airthings_wave_mini/test.esp32.yaml index 87902e6c6..dade44d14 100644 --- a/tests/components/airthings_wave_mini/test.esp32.yaml +++ b/tests/components/airthings_wave_mini/test.esp32.yaml @@ -1,22 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: airthingsmini01 - -sensor: - - id: airthingswm - platform: airthings_wave_mini - ble_client_id: airthingsmini01 - update_interval: 5min - battery_update_interval: 12h - temperature: - name: Wave Mini Temperature - humidity: - name: Wave Mini Humidity - pressure: - name: Wave Mini Pressure - tvoc: - name: Wave Mini VOC - battery_voltage: - name: Wave Mini Battery Voltage +<<: !include common.yaml diff --git a/tests/components/airthings_wave_plus/common.yaml b/tests/components/airthings_wave_plus/common.yaml new file mode 100644 index 000000000..2124fcdae --- /dev/null +++ b/tests/components/airthings_wave_plus/common.yaml @@ -0,0 +1,28 @@ +esp32_ble_tracker: + +ble_client: + - mac_address: 01:02:03:04:05:06 + id: airthings01 + +sensor: + - id: airthingswp + platform: airthings_wave_plus + ble_client_id: airthings01 + update_interval: 5min + battery_update_interval: 12h + temperature: + name: Wave Plus Temperature + radon: + name: Wave Plus Radon + radon_long_term: + name: Wave Plus Radon Long Term + pressure: + name: Wave Plus Pressure + humidity: + name: Wave Plus Humidity + co2: + name: Wave Plus CO2 + tvoc: + name: Wave Plus VOC + battery_voltage: + name: Wave Plus Battery Voltage diff --git a/tests/components/airthings_wave_plus/test.esp32-c3-idf.yaml b/tests/components/airthings_wave_plus/test.esp32-c3-idf.yaml index 2124fcdae..dade44d14 100644 --- a/tests/components/airthings_wave_plus/test.esp32-c3-idf.yaml +++ b/tests/components/airthings_wave_plus/test.esp32-c3-idf.yaml @@ -1,28 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: airthings01 - -sensor: - - id: airthingswp - platform: airthings_wave_plus - ble_client_id: airthings01 - update_interval: 5min - battery_update_interval: 12h - temperature: - name: Wave Plus Temperature - radon: - name: Wave Plus Radon - radon_long_term: - name: Wave Plus Radon Long Term - pressure: - name: Wave Plus Pressure - humidity: - name: Wave Plus Humidity - co2: - name: Wave Plus CO2 - tvoc: - name: Wave Plus VOC - battery_voltage: - name: Wave Plus Battery Voltage +<<: !include common.yaml diff --git a/tests/components/airthings_wave_plus/test.esp32-c3.yaml b/tests/components/airthings_wave_plus/test.esp32-c3.yaml index 2124fcdae..dade44d14 100644 --- a/tests/components/airthings_wave_plus/test.esp32-c3.yaml +++ b/tests/components/airthings_wave_plus/test.esp32-c3.yaml @@ -1,28 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: airthings01 - -sensor: - - id: airthingswp - platform: airthings_wave_plus - ble_client_id: airthings01 - update_interval: 5min - battery_update_interval: 12h - temperature: - name: Wave Plus Temperature - radon: - name: Wave Plus Radon - radon_long_term: - name: Wave Plus Radon Long Term - pressure: - name: Wave Plus Pressure - humidity: - name: Wave Plus Humidity - co2: - name: Wave Plus CO2 - tvoc: - name: Wave Plus VOC - battery_voltage: - name: Wave Plus Battery Voltage +<<: !include common.yaml diff --git a/tests/components/airthings_wave_plus/test.esp32-idf.yaml b/tests/components/airthings_wave_plus/test.esp32-idf.yaml index 2124fcdae..dade44d14 100644 --- a/tests/components/airthings_wave_plus/test.esp32-idf.yaml +++ b/tests/components/airthings_wave_plus/test.esp32-idf.yaml @@ -1,28 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: airthings01 - -sensor: - - id: airthingswp - platform: airthings_wave_plus - ble_client_id: airthings01 - update_interval: 5min - battery_update_interval: 12h - temperature: - name: Wave Plus Temperature - radon: - name: Wave Plus Radon - radon_long_term: - name: Wave Plus Radon Long Term - pressure: - name: Wave Plus Pressure - humidity: - name: Wave Plus Humidity - co2: - name: Wave Plus CO2 - tvoc: - name: Wave Plus VOC - battery_voltage: - name: Wave Plus Battery Voltage +<<: !include common.yaml diff --git a/tests/components/airthings_wave_plus/test.esp32.yaml b/tests/components/airthings_wave_plus/test.esp32.yaml index 2124fcdae..dade44d14 100644 --- a/tests/components/airthings_wave_plus/test.esp32.yaml +++ b/tests/components/airthings_wave_plus/test.esp32.yaml @@ -1,28 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: airthings01 - -sensor: - - id: airthingswp - platform: airthings_wave_plus - ble_client_id: airthings01 - update_interval: 5min - battery_update_interval: 12h - temperature: - name: Wave Plus Temperature - radon: - name: Wave Plus Radon - radon_long_term: - name: Wave Plus Radon Long Term - pressure: - name: Wave Plus Pressure - humidity: - name: Wave Plus Humidity - co2: - name: Wave Plus CO2 - tvoc: - name: Wave Plus VOC - battery_voltage: - name: Wave Plus Battery Voltage +<<: !include common.yaml diff --git a/tests/components/alarm_control_panel/common.yaml b/tests/components/alarm_control_panel/common.yaml new file mode 100644 index 000000000..218274bad --- /dev/null +++ b/tests/components/alarm_control_panel/common.yaml @@ -0,0 +1,64 @@ +binary_sensor: + - platform: gpio + id: bin1 + pin: 1 + +alarm_control_panel: + - platform: template + id: alarmcontrolpanel1 + name: Alarm Panel + codes: + - "1234" + requires_code_to_arm: true + arming_home_time: 1s + arming_night_time: 1s + arming_away_time: 15s + pending_time: 15s + trigger_time: 30s + binary_sensors: + - input: bin1 + bypass_armed_home: true + bypass_armed_night: true + on_state: + then: + - lambda: !lambda |- + ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state()))); + - platform: template + id: alarmcontrolpanel2 + name: Alarm Panel + codes: + - "1234" + requires_code_to_arm: true + arming_home_time: 1s + arming_night_time: 1s + arming_away_time: 15s + pending_time: 15s + trigger_time: 30s + binary_sensors: + - input: bin1 + bypass_armed_home: true + bypass_armed_night: true + on_disarmed: + then: + - logger.log: "### DISARMED ###" + on_pending: + then: + - logger.log: "### PENDING ###" + on_arming: + then: + - logger.log: "### ARMING ###" + on_armed_home: + then: + - logger.log: "### ARMED HOME ###" + on_armed_night: + then: + - logger.log: "### ARMED NIGHT ###" + on_armed_away: + then: + - logger.log: "### ARMED AWAY ###" + on_triggered: + then: + - logger.log: "### TRIGGERED ###" + on_cleared: + then: + - logger.log: "### CLEARED ###" diff --git a/tests/components/alarm_control_panel/test.esp32-c3-idf.yaml b/tests/components/alarm_control_panel/test.esp32-c3-idf.yaml index 218274bad..dade44d14 100644 --- a/tests/components/alarm_control_panel/test.esp32-c3-idf.yaml +++ b/tests/components/alarm_control_panel/test.esp32-c3-idf.yaml @@ -1,64 +1 @@ -binary_sensor: - - platform: gpio - id: bin1 - pin: 1 - -alarm_control_panel: - - platform: template - id: alarmcontrolpanel1 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_state: - then: - - lambda: !lambda |- - ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state()))); - - platform: template - id: alarmcontrolpanel2 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_disarmed: - then: - - logger.log: "### DISARMED ###" - on_pending: - then: - - logger.log: "### PENDING ###" - on_arming: - then: - - logger.log: "### ARMING ###" - on_armed_home: - then: - - logger.log: "### ARMED HOME ###" - on_armed_night: - then: - - logger.log: "### ARMED NIGHT ###" - on_armed_away: - then: - - logger.log: "### ARMED AWAY ###" - on_triggered: - then: - - logger.log: "### TRIGGERED ###" - on_cleared: - then: - - logger.log: "### CLEARED ###" +<<: !include common.yaml diff --git a/tests/components/alarm_control_panel/test.esp32-c3.yaml b/tests/components/alarm_control_panel/test.esp32-c3.yaml index 218274bad..dade44d14 100644 --- a/tests/components/alarm_control_panel/test.esp32-c3.yaml +++ b/tests/components/alarm_control_panel/test.esp32-c3.yaml @@ -1,64 +1 @@ -binary_sensor: - - platform: gpio - id: bin1 - pin: 1 - -alarm_control_panel: - - platform: template - id: alarmcontrolpanel1 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_state: - then: - - lambda: !lambda |- - ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state()))); - - platform: template - id: alarmcontrolpanel2 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_disarmed: - then: - - logger.log: "### DISARMED ###" - on_pending: - then: - - logger.log: "### PENDING ###" - on_arming: - then: - - logger.log: "### ARMING ###" - on_armed_home: - then: - - logger.log: "### ARMED HOME ###" - on_armed_night: - then: - - logger.log: "### ARMED NIGHT ###" - on_armed_away: - then: - - logger.log: "### ARMED AWAY ###" - on_triggered: - then: - - logger.log: "### TRIGGERED ###" - on_cleared: - then: - - logger.log: "### CLEARED ###" +<<: !include common.yaml diff --git a/tests/components/alarm_control_panel/test.esp32-idf.yaml b/tests/components/alarm_control_panel/test.esp32-idf.yaml index 218274bad..dade44d14 100644 --- a/tests/components/alarm_control_panel/test.esp32-idf.yaml +++ b/tests/components/alarm_control_panel/test.esp32-idf.yaml @@ -1,64 +1 @@ -binary_sensor: - - platform: gpio - id: bin1 - pin: 1 - -alarm_control_panel: - - platform: template - id: alarmcontrolpanel1 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_state: - then: - - lambda: !lambda |- - ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state()))); - - platform: template - id: alarmcontrolpanel2 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_disarmed: - then: - - logger.log: "### DISARMED ###" - on_pending: - then: - - logger.log: "### PENDING ###" - on_arming: - then: - - logger.log: "### ARMING ###" - on_armed_home: - then: - - logger.log: "### ARMED HOME ###" - on_armed_night: - then: - - logger.log: "### ARMED NIGHT ###" - on_armed_away: - then: - - logger.log: "### ARMED AWAY ###" - on_triggered: - then: - - logger.log: "### TRIGGERED ###" - on_cleared: - then: - - logger.log: "### CLEARED ###" +<<: !include common.yaml diff --git a/tests/components/alarm_control_panel/test.esp32.yaml b/tests/components/alarm_control_panel/test.esp32.yaml index 218274bad..dade44d14 100644 --- a/tests/components/alarm_control_panel/test.esp32.yaml +++ b/tests/components/alarm_control_panel/test.esp32.yaml @@ -1,64 +1 @@ -binary_sensor: - - platform: gpio - id: bin1 - pin: 1 - -alarm_control_panel: - - platform: template - id: alarmcontrolpanel1 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_state: - then: - - lambda: !lambda |- - ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state()))); - - platform: template - id: alarmcontrolpanel2 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_disarmed: - then: - - logger.log: "### DISARMED ###" - on_pending: - then: - - logger.log: "### PENDING ###" - on_arming: - then: - - logger.log: "### ARMING ###" - on_armed_home: - then: - - logger.log: "### ARMED HOME ###" - on_armed_night: - then: - - logger.log: "### ARMED NIGHT ###" - on_armed_away: - then: - - logger.log: "### ARMED AWAY ###" - on_triggered: - then: - - logger.log: "### TRIGGERED ###" - on_cleared: - then: - - logger.log: "### CLEARED ###" +<<: !include common.yaml diff --git a/tests/components/alarm_control_panel/test.esp8266.yaml b/tests/components/alarm_control_panel/test.esp8266.yaml index 218274bad..dade44d14 100644 --- a/tests/components/alarm_control_panel/test.esp8266.yaml +++ b/tests/components/alarm_control_panel/test.esp8266.yaml @@ -1,64 +1 @@ -binary_sensor: - - platform: gpio - id: bin1 - pin: 1 - -alarm_control_panel: - - platform: template - id: alarmcontrolpanel1 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_state: - then: - - lambda: !lambda |- - ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state()))); - - platform: template - id: alarmcontrolpanel2 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_disarmed: - then: - - logger.log: "### DISARMED ###" - on_pending: - then: - - logger.log: "### PENDING ###" - on_arming: - then: - - logger.log: "### ARMING ###" - on_armed_home: - then: - - logger.log: "### ARMED HOME ###" - on_armed_night: - then: - - logger.log: "### ARMED NIGHT ###" - on_armed_away: - then: - - logger.log: "### ARMED AWAY ###" - on_triggered: - then: - - logger.log: "### TRIGGERED ###" - on_cleared: - then: - - logger.log: "### CLEARED ###" +<<: !include common.yaml diff --git a/tests/components/alarm_control_panel/test.rp2040.yaml b/tests/components/alarm_control_panel/test.rp2040.yaml index 218274bad..dade44d14 100644 --- a/tests/components/alarm_control_panel/test.rp2040.yaml +++ b/tests/components/alarm_control_panel/test.rp2040.yaml @@ -1,64 +1 @@ -binary_sensor: - - platform: gpio - id: bin1 - pin: 1 - -alarm_control_panel: - - platform: template - id: alarmcontrolpanel1 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_state: - then: - - lambda: !lambda |- - ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state()))); - - platform: template - id: alarmcontrolpanel2 - name: Alarm Panel - codes: - - "1234" - requires_code_to_arm: true - arming_home_time: 1s - arming_night_time: 1s - arming_away_time: 15s - pending_time: 15s - trigger_time: 30s - binary_sensors: - - input: bin1 - bypass_armed_home: true - bypass_armed_night: true - on_disarmed: - then: - - logger.log: "### DISARMED ###" - on_pending: - then: - - logger.log: "### PENDING ###" - on_arming: - then: - - logger.log: "### ARMING ###" - on_armed_home: - then: - - logger.log: "### ARMED HOME ###" - on_armed_night: - then: - - logger.log: "### ARMED NIGHT ###" - on_armed_away: - then: - - logger.log: "### ARMED AWAY ###" - on_triggered: - then: - - logger.log: "### TRIGGERED ###" - on_cleared: - then: - - logger.log: "### CLEARED ###" +<<: !include common.yaml diff --git a/tests/components/alpha3/common.yaml b/tests/components/alpha3/common.yaml new file mode 100644 index 000000000..913f086ac --- /dev/null +++ b/tests/components/alpha3/common.yaml @@ -0,0 +1,17 @@ +esp32_ble_tracker: + +ble_client: + - mac_address: 01:02:03:04:05:06 + id: alpha3_blec + +sensor: + - platform: alpha3 + ble_client_id: alpha3_blec + flow: + name: "Radiator Pump Flow" + head: + name: "Radiator Pump Head" + power: + name: "Radiator Pump Power" + speed: + name: "Radiator Pump Speed" diff --git a/tests/components/alpha3/test.esp32-c3-idf.yaml b/tests/components/alpha3/test.esp32-c3-idf.yaml index 913f086ac..dade44d14 100644 --- a/tests/components/alpha3/test.esp32-c3-idf.yaml +++ b/tests/components/alpha3/test.esp32-c3-idf.yaml @@ -1,17 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: alpha3_blec - -sensor: - - platform: alpha3 - ble_client_id: alpha3_blec - flow: - name: "Radiator Pump Flow" - head: - name: "Radiator Pump Head" - power: - name: "Radiator Pump Power" - speed: - name: "Radiator Pump Speed" +<<: !include common.yaml diff --git a/tests/components/alpha3/test.esp32-c3.yaml b/tests/components/alpha3/test.esp32-c3.yaml index 913f086ac..dade44d14 100644 --- a/tests/components/alpha3/test.esp32-c3.yaml +++ b/tests/components/alpha3/test.esp32-c3.yaml @@ -1,17 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: alpha3_blec - -sensor: - - platform: alpha3 - ble_client_id: alpha3_blec - flow: - name: "Radiator Pump Flow" - head: - name: "Radiator Pump Head" - power: - name: "Radiator Pump Power" - speed: - name: "Radiator Pump Speed" +<<: !include common.yaml diff --git a/tests/components/alpha3/test.esp32-idf.yaml b/tests/components/alpha3/test.esp32-idf.yaml index 913f086ac..dade44d14 100644 --- a/tests/components/alpha3/test.esp32-idf.yaml +++ b/tests/components/alpha3/test.esp32-idf.yaml @@ -1,17 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: alpha3_blec - -sensor: - - platform: alpha3 - ble_client_id: alpha3_blec - flow: - name: "Radiator Pump Flow" - head: - name: "Radiator Pump Head" - power: - name: "Radiator Pump Power" - speed: - name: "Radiator Pump Speed" +<<: !include common.yaml diff --git a/tests/components/alpha3/test.esp32.yaml b/tests/components/alpha3/test.esp32.yaml index 913f086ac..dade44d14 100644 --- a/tests/components/alpha3/test.esp32.yaml +++ b/tests/components/alpha3/test.esp32.yaml @@ -1,17 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: alpha3_blec - -sensor: - - platform: alpha3 - ble_client_id: alpha3_blec - flow: - name: "Radiator Pump Flow" - head: - name: "Radiator Pump Head" - power: - name: "Radiator Pump Power" - speed: - name: "Radiator Pump Speed" +<<: !include common.yaml diff --git a/tests/components/am43/common.yaml b/tests/components/am43/common.yaml new file mode 100644 index 000000000..60b7d81a5 --- /dev/null +++ b/tests/components/am43/common.yaml @@ -0,0 +1,19 @@ +esp32_ble_tracker: + +ble_client: + - mac_address: 01:02:03:04:05:06 + id: am43_blec + +cover: + - platform: am43 + name: Test AM43 Cover + id: am43_test + ble_client_id: am43_blec + +sensor: + - platform: am43 + ble_client_id: am43_blec + battery_level: + name: Kitchen blinds battery + illuminance: + name: Kitchen blinds light diff --git a/tests/components/am43/test.esp32-c3-idf.yaml b/tests/components/am43/test.esp32-c3-idf.yaml index 60b7d81a5..dade44d14 100644 --- a/tests/components/am43/test.esp32-c3-idf.yaml +++ b/tests/components/am43/test.esp32-c3-idf.yaml @@ -1,19 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: am43_blec - -cover: - - platform: am43 - name: Test AM43 Cover - id: am43_test - ble_client_id: am43_blec - -sensor: - - platform: am43 - ble_client_id: am43_blec - battery_level: - name: Kitchen blinds battery - illuminance: - name: Kitchen blinds light +<<: !include common.yaml diff --git a/tests/components/am43/test.esp32-c3.yaml b/tests/components/am43/test.esp32-c3.yaml index 60b7d81a5..dade44d14 100644 --- a/tests/components/am43/test.esp32-c3.yaml +++ b/tests/components/am43/test.esp32-c3.yaml @@ -1,19 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: am43_blec - -cover: - - platform: am43 - name: Test AM43 Cover - id: am43_test - ble_client_id: am43_blec - -sensor: - - platform: am43 - ble_client_id: am43_blec - battery_level: - name: Kitchen blinds battery - illuminance: - name: Kitchen blinds light +<<: !include common.yaml diff --git a/tests/components/am43/test.esp32-idf.yaml b/tests/components/am43/test.esp32-idf.yaml index 60b7d81a5..dade44d14 100644 --- a/tests/components/am43/test.esp32-idf.yaml +++ b/tests/components/am43/test.esp32-idf.yaml @@ -1,19 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: am43_blec - -cover: - - platform: am43 - name: Test AM43 Cover - id: am43_test - ble_client_id: am43_blec - -sensor: - - platform: am43 - ble_client_id: am43_blec - battery_level: - name: Kitchen blinds battery - illuminance: - name: Kitchen blinds light +<<: !include common.yaml diff --git a/tests/components/am43/test.esp32.yaml b/tests/components/am43/test.esp32.yaml index 60b7d81a5..dade44d14 100644 --- a/tests/components/am43/test.esp32.yaml +++ b/tests/components/am43/test.esp32.yaml @@ -1,19 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: am43_blec - -cover: - - platform: am43 - name: Test AM43 Cover - id: am43_test - ble_client_id: am43_blec - -sensor: - - platform: am43 - ble_client_id: am43_blec - battery_level: - name: Kitchen blinds battery - illuminance: - name: Kitchen blinds light +<<: !include common.yaml diff --git a/tests/components/analog_threshold/common.yaml b/tests/components/analog_threshold/common.yaml new file mode 100644 index 000000000..b5c14dfe5 --- /dev/null +++ b/tests/components/analog_threshold/common.yaml @@ -0,0 +1,28 @@ +sensor: + - platform: template + id: template_sensor + name: Template Sensor + lambda: |- + if (millis() > 10000) { + return 42.0; + } else { + return 0.0; + } + update_interval: 15s + +binary_sensor: + - platform: analog_threshold + name: Analog Threshold 1 + sensor_id: template_sensor + threshold: + upper: 110 + lower: 90 + filters: + - delayed_on: 0s + - delayed_off: 10s + - platform: analog_threshold + name: Analog Threshold 2 + sensor_id: template_sensor + threshold: 100 + filters: + - invert: diff --git a/tests/components/analog_threshold/test.esp32-c3-idf.yaml b/tests/components/analog_threshold/test.esp32-c3-idf.yaml index b5c14dfe5..dade44d14 100644 --- a/tests/components/analog_threshold/test.esp32-c3-idf.yaml +++ b/tests/components/analog_threshold/test.esp32-c3-idf.yaml @@ -1,28 +1 @@ -sensor: - - platform: template - id: template_sensor - name: Template Sensor - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 15s - -binary_sensor: - - platform: analog_threshold - name: Analog Threshold 1 - sensor_id: template_sensor - threshold: - upper: 110 - lower: 90 - filters: - - delayed_on: 0s - - delayed_off: 10s - - platform: analog_threshold - name: Analog Threshold 2 - sensor_id: template_sensor - threshold: 100 - filters: - - invert: +<<: !include common.yaml diff --git a/tests/components/analog_threshold/test.esp32-c3.yaml b/tests/components/analog_threshold/test.esp32-c3.yaml index b5c14dfe5..dade44d14 100644 --- a/tests/components/analog_threshold/test.esp32-c3.yaml +++ b/tests/components/analog_threshold/test.esp32-c3.yaml @@ -1,28 +1 @@ -sensor: - - platform: template - id: template_sensor - name: Template Sensor - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 15s - -binary_sensor: - - platform: analog_threshold - name: Analog Threshold 1 - sensor_id: template_sensor - threshold: - upper: 110 - lower: 90 - filters: - - delayed_on: 0s - - delayed_off: 10s - - platform: analog_threshold - name: Analog Threshold 2 - sensor_id: template_sensor - threshold: 100 - filters: - - invert: +<<: !include common.yaml diff --git a/tests/components/analog_threshold/test.esp32-idf.yaml b/tests/components/analog_threshold/test.esp32-idf.yaml index b5c14dfe5..dade44d14 100644 --- a/tests/components/analog_threshold/test.esp32-idf.yaml +++ b/tests/components/analog_threshold/test.esp32-idf.yaml @@ -1,28 +1 @@ -sensor: - - platform: template - id: template_sensor - name: Template Sensor - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 15s - -binary_sensor: - - platform: analog_threshold - name: Analog Threshold 1 - sensor_id: template_sensor - threshold: - upper: 110 - lower: 90 - filters: - - delayed_on: 0s - - delayed_off: 10s - - platform: analog_threshold - name: Analog Threshold 2 - sensor_id: template_sensor - threshold: 100 - filters: - - invert: +<<: !include common.yaml diff --git a/tests/components/analog_threshold/test.esp32.yaml b/tests/components/analog_threshold/test.esp32.yaml index b5c14dfe5..dade44d14 100644 --- a/tests/components/analog_threshold/test.esp32.yaml +++ b/tests/components/analog_threshold/test.esp32.yaml @@ -1,28 +1 @@ -sensor: - - platform: template - id: template_sensor - name: Template Sensor - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 15s - -binary_sensor: - - platform: analog_threshold - name: Analog Threshold 1 - sensor_id: template_sensor - threshold: - upper: 110 - lower: 90 - filters: - - delayed_on: 0s - - delayed_off: 10s - - platform: analog_threshold - name: Analog Threshold 2 - sensor_id: template_sensor - threshold: 100 - filters: - - invert: +<<: !include common.yaml diff --git a/tests/components/analog_threshold/test.esp8266.yaml b/tests/components/analog_threshold/test.esp8266.yaml index b5c14dfe5..dade44d14 100644 --- a/tests/components/analog_threshold/test.esp8266.yaml +++ b/tests/components/analog_threshold/test.esp8266.yaml @@ -1,28 +1 @@ -sensor: - - platform: template - id: template_sensor - name: Template Sensor - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 15s - -binary_sensor: - - platform: analog_threshold - name: Analog Threshold 1 - sensor_id: template_sensor - threshold: - upper: 110 - lower: 90 - filters: - - delayed_on: 0s - - delayed_off: 10s - - platform: analog_threshold - name: Analog Threshold 2 - sensor_id: template_sensor - threshold: 100 - filters: - - invert: +<<: !include common.yaml diff --git a/tests/components/analog_threshold/test.rp2040.yaml b/tests/components/analog_threshold/test.rp2040.yaml index b5c14dfe5..dade44d14 100644 --- a/tests/components/analog_threshold/test.rp2040.yaml +++ b/tests/components/analog_threshold/test.rp2040.yaml @@ -1,28 +1 @@ -sensor: - - platform: template - id: template_sensor - name: Template Sensor - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 15s - -binary_sensor: - - platform: analog_threshold - name: Analog Threshold 1 - sensor_id: template_sensor - threshold: - upper: 110 - lower: 90 - filters: - - delayed_on: 0s - - delayed_off: 10s - - platform: analog_threshold - name: Analog Threshold 2 - sensor_id: template_sensor - threshold: 100 - filters: - - invert: +<<: !include common.yaml diff --git a/tests/components/anova/common.yaml b/tests/components/anova/common.yaml new file mode 100644 index 000000000..c4162fe71 --- /dev/null +++ b/tests/components/anova/common.yaml @@ -0,0 +1,11 @@ +esp32_ble_tracker: + +ble_client: + - mac_address: 01:02:03:04:05:06 + id: anova_blec + +climate: + - platform: anova + name: Anova cooker + ble_client_id: anova_blec + unit_of_measurement: c diff --git a/tests/components/anova/test.esp32-c3-idf.yaml b/tests/components/anova/test.esp32-c3-idf.yaml index c4162fe71..dade44d14 100644 --- a/tests/components/anova/test.esp32-c3-idf.yaml +++ b/tests/components/anova/test.esp32-c3-idf.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: anova_blec - -climate: - - platform: anova - name: Anova cooker - ble_client_id: anova_blec - unit_of_measurement: c +<<: !include common.yaml diff --git a/tests/components/anova/test.esp32-c3.yaml b/tests/components/anova/test.esp32-c3.yaml index c4162fe71..dade44d14 100644 --- a/tests/components/anova/test.esp32-c3.yaml +++ b/tests/components/anova/test.esp32-c3.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: anova_blec - -climate: - - platform: anova - name: Anova cooker - ble_client_id: anova_blec - unit_of_measurement: c +<<: !include common.yaml diff --git a/tests/components/anova/test.esp32-idf.yaml b/tests/components/anova/test.esp32-idf.yaml index c4162fe71..dade44d14 100644 --- a/tests/components/anova/test.esp32-idf.yaml +++ b/tests/components/anova/test.esp32-idf.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: anova_blec - -climate: - - platform: anova - name: Anova cooker - ble_client_id: anova_blec - unit_of_measurement: c +<<: !include common.yaml diff --git a/tests/components/anova/test.esp32.yaml b/tests/components/anova/test.esp32.yaml index c4162fe71..dade44d14 100644 --- a/tests/components/anova/test.esp32.yaml +++ b/tests/components/anova/test.esp32.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: anova_blec - -climate: - - platform: anova - name: Anova cooker - ble_client_id: anova_blec - unit_of_measurement: c +<<: !include common.yaml diff --git a/tests/components/api/common.yaml b/tests/components/api/common.yaml new file mode 100644 index 000000000..3c56811b9 --- /dev/null +++ b/tests/components/api/common.yaml @@ -0,0 +1,63 @@ +esphome: + on_boot: + then: + - homeassistant.event: + event: esphome.button_pressed + data: + message: Button was pressed + - homeassistant.service: + service: notify.html5 + data: + message: Button was pressed + - homeassistant.tag_scanned: pulse + +wifi: + ssid: MySSID + password: password1 + +api: + port: 8000 + password: pwd + reboot_timeout: 0min + encryption: + key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU= + services: + - service: hello_world + variables: + name: string + then: + - logger.log: + format: Hello World %s! + args: + - name.c_str() + - service: empty_service + then: + - logger.log: Service Called + - service: all_types + variables: + bool_: bool + int_: int + float_: float + string_: string + then: + - logger.log: Something happened + - service: array_types + variables: + bool_arr: bool[] + int_arr: int[] + float_arr: float[] + string_arr: string[] + then: + - logger.log: + # yamllint disable rule:line-length + format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)" + # yamllint enable rule:line-length + args: + - YESNO(bool_arr[0]) + - bool_arr.size() + - int_arr[0] + - int_arr.size() + - float_arr[0] + - float_arr.size() + - string_arr[0].c_str() + - string_arr.size() diff --git a/tests/components/api/test.esp32-c3-idf.yaml b/tests/components/api/test.esp32-c3-idf.yaml index 3c56811b9..dade44d14 100644 --- a/tests/components/api/test.esp32-c3-idf.yaml +++ b/tests/components/api/test.esp32-c3-idf.yaml @@ -1,63 +1 @@ -esphome: - on_boot: - then: - - homeassistant.event: - event: esphome.button_pressed - data: - message: Button was pressed - - homeassistant.service: - service: notify.html5 - data: - message: Button was pressed - - homeassistant.tag_scanned: pulse - -wifi: - ssid: MySSID - password: password1 - -api: - port: 8000 - password: pwd - reboot_timeout: 0min - encryption: - key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU= - services: - - service: hello_world - variables: - name: string - then: - - logger.log: - format: Hello World %s! - args: - - name.c_str() - - service: empty_service - then: - - logger.log: Service Called - - service: all_types - variables: - bool_: bool - int_: int - float_: float - string_: string - then: - - logger.log: Something happened - - service: array_types - variables: - bool_arr: bool[] - int_arr: int[] - float_arr: float[] - string_arr: string[] - then: - - logger.log: - # yamllint disable rule:line-length - format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)" - # yamllint enable rule:line-length - args: - - YESNO(bool_arr[0]) - - bool_arr.size() - - int_arr[0] - - int_arr.size() - - float_arr[0] - - float_arr.size() - - string_arr[0].c_str() - - string_arr.size() +<<: !include common.yaml diff --git a/tests/components/api/test.esp32-c3.yaml b/tests/components/api/test.esp32-c3.yaml index 3c56811b9..dade44d14 100644 --- a/tests/components/api/test.esp32-c3.yaml +++ b/tests/components/api/test.esp32-c3.yaml @@ -1,63 +1 @@ -esphome: - on_boot: - then: - - homeassistant.event: - event: esphome.button_pressed - data: - message: Button was pressed - - homeassistant.service: - service: notify.html5 - data: - message: Button was pressed - - homeassistant.tag_scanned: pulse - -wifi: - ssid: MySSID - password: password1 - -api: - port: 8000 - password: pwd - reboot_timeout: 0min - encryption: - key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU= - services: - - service: hello_world - variables: - name: string - then: - - logger.log: - format: Hello World %s! - args: - - name.c_str() - - service: empty_service - then: - - logger.log: Service Called - - service: all_types - variables: - bool_: bool - int_: int - float_: float - string_: string - then: - - logger.log: Something happened - - service: array_types - variables: - bool_arr: bool[] - int_arr: int[] - float_arr: float[] - string_arr: string[] - then: - - logger.log: - # yamllint disable rule:line-length - format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)" - # yamllint enable rule:line-length - args: - - YESNO(bool_arr[0]) - - bool_arr.size() - - int_arr[0] - - int_arr.size() - - float_arr[0] - - float_arr.size() - - string_arr[0].c_str() - - string_arr.size() +<<: !include common.yaml diff --git a/tests/components/api/test.esp32-idf.yaml b/tests/components/api/test.esp32-idf.yaml index 3c56811b9..dade44d14 100644 --- a/tests/components/api/test.esp32-idf.yaml +++ b/tests/components/api/test.esp32-idf.yaml @@ -1,63 +1 @@ -esphome: - on_boot: - then: - - homeassistant.event: - event: esphome.button_pressed - data: - message: Button was pressed - - homeassistant.service: - service: notify.html5 - data: - message: Button was pressed - - homeassistant.tag_scanned: pulse - -wifi: - ssid: MySSID - password: password1 - -api: - port: 8000 - password: pwd - reboot_timeout: 0min - encryption: - key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU= - services: - - service: hello_world - variables: - name: string - then: - - logger.log: - format: Hello World %s! - args: - - name.c_str() - - service: empty_service - then: - - logger.log: Service Called - - service: all_types - variables: - bool_: bool - int_: int - float_: float - string_: string - then: - - logger.log: Something happened - - service: array_types - variables: - bool_arr: bool[] - int_arr: int[] - float_arr: float[] - string_arr: string[] - then: - - logger.log: - # yamllint disable rule:line-length - format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)" - # yamllint enable rule:line-length - args: - - YESNO(bool_arr[0]) - - bool_arr.size() - - int_arr[0] - - int_arr.size() - - float_arr[0] - - float_arr.size() - - string_arr[0].c_str() - - string_arr.size() +<<: !include common.yaml diff --git a/tests/components/api/test.esp32.yaml b/tests/components/api/test.esp32.yaml index 3c56811b9..dade44d14 100644 --- a/tests/components/api/test.esp32.yaml +++ b/tests/components/api/test.esp32.yaml @@ -1,63 +1 @@ -esphome: - on_boot: - then: - - homeassistant.event: - event: esphome.button_pressed - data: - message: Button was pressed - - homeassistant.service: - service: notify.html5 - data: - message: Button was pressed - - homeassistant.tag_scanned: pulse - -wifi: - ssid: MySSID - password: password1 - -api: - port: 8000 - password: pwd - reboot_timeout: 0min - encryption: - key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU= - services: - - service: hello_world - variables: - name: string - then: - - logger.log: - format: Hello World %s! - args: - - name.c_str() - - service: empty_service - then: - - logger.log: Service Called - - service: all_types - variables: - bool_: bool - int_: int - float_: float - string_: string - then: - - logger.log: Something happened - - service: array_types - variables: - bool_arr: bool[] - int_arr: int[] - float_arr: float[] - string_arr: string[] - then: - - logger.log: - # yamllint disable rule:line-length - format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)" - # yamllint enable rule:line-length - args: - - YESNO(bool_arr[0]) - - bool_arr.size() - - int_arr[0] - - int_arr.size() - - float_arr[0] - - float_arr.size() - - string_arr[0].c_str() - - string_arr.size() +<<: !include common.yaml diff --git a/tests/components/api/test.esp8266.yaml b/tests/components/api/test.esp8266.yaml index 3c56811b9..dade44d14 100644 --- a/tests/components/api/test.esp8266.yaml +++ b/tests/components/api/test.esp8266.yaml @@ -1,63 +1 @@ -esphome: - on_boot: - then: - - homeassistant.event: - event: esphome.button_pressed - data: - message: Button was pressed - - homeassistant.service: - service: notify.html5 - data: - message: Button was pressed - - homeassistant.tag_scanned: pulse - -wifi: - ssid: MySSID - password: password1 - -api: - port: 8000 - password: pwd - reboot_timeout: 0min - encryption: - key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU= - services: - - service: hello_world - variables: - name: string - then: - - logger.log: - format: Hello World %s! - args: - - name.c_str() - - service: empty_service - then: - - logger.log: Service Called - - service: all_types - variables: - bool_: bool - int_: int - float_: float - string_: string - then: - - logger.log: Something happened - - service: array_types - variables: - bool_arr: bool[] - int_arr: int[] - float_arr: float[] - string_arr: string[] - then: - - logger.log: - # yamllint disable rule:line-length - format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)" - # yamllint enable rule:line-length - args: - - YESNO(bool_arr[0]) - - bool_arr.size() - - int_arr[0] - - int_arr.size() - - float_arr[0] - - float_arr.size() - - string_arr[0].c_str() - - string_arr.size() +<<: !include common.yaml diff --git a/tests/components/api/test.rp2040.yaml b/tests/components/api/test.rp2040.yaml index 3c56811b9..dade44d14 100644 --- a/tests/components/api/test.rp2040.yaml +++ b/tests/components/api/test.rp2040.yaml @@ -1,63 +1 @@ -esphome: - on_boot: - then: - - homeassistant.event: - event: esphome.button_pressed - data: - message: Button was pressed - - homeassistant.service: - service: notify.html5 - data: - message: Button was pressed - - homeassistant.tag_scanned: pulse - -wifi: - ssid: MySSID - password: password1 - -api: - port: 8000 - password: pwd - reboot_timeout: 0min - encryption: - key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU= - services: - - service: hello_world - variables: - name: string - then: - - logger.log: - format: Hello World %s! - args: - - name.c_str() - - service: empty_service - then: - - logger.log: Service Called - - service: all_types - variables: - bool_: bool - int_: int - float_: float - string_: string - then: - - logger.log: Something happened - - service: array_types - variables: - bool_arr: bool[] - int_arr: int[] - float_arr: float[] - string_arr: string[] - then: - - logger.log: - # yamllint disable rule:line-length - format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)" - # yamllint enable rule:line-length - args: - - YESNO(bool_arr[0]) - - bool_arr.size() - - int_arr[0] - - int_arr.size() - - float_arr[0] - - float_arr.size() - - string_arr[0].c_str() - - string_arr.size() +<<: !include common.yaml diff --git a/tests/components/atc_mithermometer/common.yaml b/tests/components/atc_mithermometer/common.yaml new file mode 100644 index 000000000..0248090c2 --- /dev/null +++ b/tests/components/atc_mithermometer/common.yaml @@ -0,0 +1,13 @@ +esp32_ble_tracker: + +sensor: + - platform: atc_mithermometer + mac_address: A4:C1:38:4E:16:78 + temperature: + name: ATC Temperature + humidity: + name: ATC Humidity + battery_level: + name: ATC Battery-Level + battery_voltage: + name: ATC Battery-Voltage diff --git a/tests/components/atc_mithermometer/test.esp32-c3-idf.yaml b/tests/components/atc_mithermometer/test.esp32-c3-idf.yaml index 0248090c2..dade44d14 100644 --- a/tests/components/atc_mithermometer/test.esp32-c3-idf.yaml +++ b/tests/components/atc_mithermometer/test.esp32-c3-idf.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: atc_mithermometer - mac_address: A4:C1:38:4E:16:78 - temperature: - name: ATC Temperature - humidity: - name: ATC Humidity - battery_level: - name: ATC Battery-Level - battery_voltage: - name: ATC Battery-Voltage +<<: !include common.yaml diff --git a/tests/components/atc_mithermometer/test.esp32-c3.yaml b/tests/components/atc_mithermometer/test.esp32-c3.yaml index 0248090c2..dade44d14 100644 --- a/tests/components/atc_mithermometer/test.esp32-c3.yaml +++ b/tests/components/atc_mithermometer/test.esp32-c3.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: atc_mithermometer - mac_address: A4:C1:38:4E:16:78 - temperature: - name: ATC Temperature - humidity: - name: ATC Humidity - battery_level: - name: ATC Battery-Level - battery_voltage: - name: ATC Battery-Voltage +<<: !include common.yaml diff --git a/tests/components/atc_mithermometer/test.esp32-idf.yaml b/tests/components/atc_mithermometer/test.esp32-idf.yaml index 0248090c2..dade44d14 100644 --- a/tests/components/atc_mithermometer/test.esp32-idf.yaml +++ b/tests/components/atc_mithermometer/test.esp32-idf.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: atc_mithermometer - mac_address: A4:C1:38:4E:16:78 - temperature: - name: ATC Temperature - humidity: - name: ATC Humidity - battery_level: - name: ATC Battery-Level - battery_voltage: - name: ATC Battery-Voltage +<<: !include common.yaml diff --git a/tests/components/atc_mithermometer/test.esp32.yaml b/tests/components/atc_mithermometer/test.esp32.yaml index 0248090c2..dade44d14 100644 --- a/tests/components/atc_mithermometer/test.esp32.yaml +++ b/tests/components/atc_mithermometer/test.esp32.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: atc_mithermometer - mac_address: A4:C1:38:4E:16:78 - temperature: - name: ATC Temperature - humidity: - name: ATC Humidity - battery_level: - name: ATC Battery-Level - battery_voltage: - name: ATC Battery-Voltage +<<: !include common.yaml diff --git a/tests/components/b_parasite/common.yaml b/tests/components/b_parasite/common.yaml new file mode 100644 index 000000000..262e891bb --- /dev/null +++ b/tests/components/b_parasite/common.yaml @@ -0,0 +1,15 @@ +esp32_ble_tracker: + +sensor: + - platform: b_parasite + mac_address: F0:CA:F0:CA:01:01 + humidity: + name: b-parasite Air Humidity + temperature: + name: b-parasite Air Temperature + moisture: + name: b-parasite Soil Moisture + battery_voltage: + name: b-parasite Battery Voltage + illuminance: + name: b-parasite Illuminance diff --git a/tests/components/b_parasite/test.esp32-c3-idf.yaml b/tests/components/b_parasite/test.esp32-c3-idf.yaml index 262e891bb..dade44d14 100644 --- a/tests/components/b_parasite/test.esp32-c3-idf.yaml +++ b/tests/components/b_parasite/test.esp32-c3-idf.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: b_parasite - mac_address: F0:CA:F0:CA:01:01 - humidity: - name: b-parasite Air Humidity - temperature: - name: b-parasite Air Temperature - moisture: - name: b-parasite Soil Moisture - battery_voltage: - name: b-parasite Battery Voltage - illuminance: - name: b-parasite Illuminance +<<: !include common.yaml diff --git a/tests/components/b_parasite/test.esp32-c3.yaml b/tests/components/b_parasite/test.esp32-c3.yaml index 262e891bb..dade44d14 100644 --- a/tests/components/b_parasite/test.esp32-c3.yaml +++ b/tests/components/b_parasite/test.esp32-c3.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: b_parasite - mac_address: F0:CA:F0:CA:01:01 - humidity: - name: b-parasite Air Humidity - temperature: - name: b-parasite Air Temperature - moisture: - name: b-parasite Soil Moisture - battery_voltage: - name: b-parasite Battery Voltage - illuminance: - name: b-parasite Illuminance +<<: !include common.yaml diff --git a/tests/components/b_parasite/test.esp32-idf.yaml b/tests/components/b_parasite/test.esp32-idf.yaml index 262e891bb..dade44d14 100644 --- a/tests/components/b_parasite/test.esp32-idf.yaml +++ b/tests/components/b_parasite/test.esp32-idf.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: b_parasite - mac_address: F0:CA:F0:CA:01:01 - humidity: - name: b-parasite Air Humidity - temperature: - name: b-parasite Air Temperature - moisture: - name: b-parasite Soil Moisture - battery_voltage: - name: b-parasite Battery Voltage - illuminance: - name: b-parasite Illuminance +<<: !include common.yaml diff --git a/tests/components/b_parasite/test.esp32.yaml b/tests/components/b_parasite/test.esp32.yaml index 262e891bb..dade44d14 100644 --- a/tests/components/b_parasite/test.esp32.yaml +++ b/tests/components/b_parasite/test.esp32.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: b_parasite - mac_address: F0:CA:F0:CA:01:01 - humidity: - name: b-parasite Air Humidity - temperature: - name: b-parasite Air Temperature - moisture: - name: b-parasite Soil Moisture - battery_voltage: - name: b-parasite Battery Voltage - illuminance: - name: b-parasite Illuminance +<<: !include common.yaml diff --git a/tests/components/bang_bang/common.yaml b/tests/components/bang_bang/common.yaml new file mode 100644 index 000000000..588202519 --- /dev/null +++ b/tests/components/bang_bang/common.yaml @@ -0,0 +1,35 @@ +switch: + - platform: template + id: template_switch1 + optimistic: true + - platform: template + id: template_switch2 + optimistic: true + +sensor: + - platform: template + id: template_sensor1 + lambda: |- + if (millis() > 10000) { + return 42.0; + } else { + return 0.0; + } + update_interval: 60s + +climate: + - platform: bang_bang + name: Bang Bang Climate + sensor: template_sensor1 + humidity_sensor: template_sensor1 + default_target_temperature_low: 18°C + default_target_temperature_high: 24°C + idle_action: + - switch.turn_on: template_switch1 + cool_action: + - switch.turn_on: template_switch2 + heat_action: + - switch.turn_on: template_switch1 + away_config: + default_target_temperature_low: 16°C + default_target_temperature_high: 20°C diff --git a/tests/components/bang_bang/test.esp32-c3-idf.yaml b/tests/components/bang_bang/test.esp32-c3-idf.yaml index 588202519..dade44d14 100644 --- a/tests/components/bang_bang/test.esp32-c3-idf.yaml +++ b/tests/components/bang_bang/test.esp32-c3-idf.yaml @@ -1,35 +1 @@ -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: bang_bang - name: Bang Bang Climate - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - idle_action: - - switch.turn_on: template_switch1 - cool_action: - - switch.turn_on: template_switch2 - heat_action: - - switch.turn_on: template_switch1 - away_config: - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C +<<: !include common.yaml diff --git a/tests/components/bang_bang/test.esp32-c3.yaml b/tests/components/bang_bang/test.esp32-c3.yaml index 588202519..dade44d14 100644 --- a/tests/components/bang_bang/test.esp32-c3.yaml +++ b/tests/components/bang_bang/test.esp32-c3.yaml @@ -1,35 +1 @@ -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: bang_bang - name: Bang Bang Climate - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - idle_action: - - switch.turn_on: template_switch1 - cool_action: - - switch.turn_on: template_switch2 - heat_action: - - switch.turn_on: template_switch1 - away_config: - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C +<<: !include common.yaml diff --git a/tests/components/bang_bang/test.esp32-idf.yaml b/tests/components/bang_bang/test.esp32-idf.yaml index 588202519..dade44d14 100644 --- a/tests/components/bang_bang/test.esp32-idf.yaml +++ b/tests/components/bang_bang/test.esp32-idf.yaml @@ -1,35 +1 @@ -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: bang_bang - name: Bang Bang Climate - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - idle_action: - - switch.turn_on: template_switch1 - cool_action: - - switch.turn_on: template_switch2 - heat_action: - - switch.turn_on: template_switch1 - away_config: - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C +<<: !include common.yaml diff --git a/tests/components/bang_bang/test.esp32.yaml b/tests/components/bang_bang/test.esp32.yaml index 588202519..dade44d14 100644 --- a/tests/components/bang_bang/test.esp32.yaml +++ b/tests/components/bang_bang/test.esp32.yaml @@ -1,35 +1 @@ -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: bang_bang - name: Bang Bang Climate - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - idle_action: - - switch.turn_on: template_switch1 - cool_action: - - switch.turn_on: template_switch2 - heat_action: - - switch.turn_on: template_switch1 - away_config: - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C +<<: !include common.yaml diff --git a/tests/components/bang_bang/test.esp8266.yaml b/tests/components/bang_bang/test.esp8266.yaml index 588202519..dade44d14 100644 --- a/tests/components/bang_bang/test.esp8266.yaml +++ b/tests/components/bang_bang/test.esp8266.yaml @@ -1,35 +1 @@ -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: bang_bang - name: Bang Bang Climate - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - idle_action: - - switch.turn_on: template_switch1 - cool_action: - - switch.turn_on: template_switch2 - heat_action: - - switch.turn_on: template_switch1 - away_config: - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C +<<: !include common.yaml diff --git a/tests/components/bang_bang/test.rp2040.yaml b/tests/components/bang_bang/test.rp2040.yaml index 588202519..dade44d14 100644 --- a/tests/components/bang_bang/test.rp2040.yaml +++ b/tests/components/bang_bang/test.rp2040.yaml @@ -1,35 +1 @@ -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: bang_bang - name: Bang Bang Climate - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - idle_action: - - switch.turn_on: template_switch1 - cool_action: - - switch.turn_on: template_switch2 - heat_action: - - switch.turn_on: template_switch1 - away_config: - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C +<<: !include common.yaml diff --git a/tests/components/bedjet/common.yaml b/tests/components/bedjet/common.yaml new file mode 100644 index 000000000..c2be04a49 --- /dev/null +++ b/tests/components/bedjet/common.yaml @@ -0,0 +1,33 @@ +wifi: + ssid: MySSID + password: password1 + +time: + - platform: sntp + id: sntp_time + servers: + - 0.pool.ntp.org + - 1.pool.ntp.org + - 192.168.178.1 + +esp32_ble_tracker: + +ble_client: + - mac_address: 01:02:03:04:05:06 + id: bedjet_blec + +bedjet: + - id: bedjet_hub + ble_client_id: bedjet_blec + time_id: sntp_time + +climate: + - platform: bedjet + name: My Bedjet + bedjet_id: bedjet_hub + heat_mode: extended + +fan: + - platform: bedjet + name: My Bedjet fan + bedjet_id: bedjet_hub diff --git a/tests/components/bedjet/test.esp32-c3-idf.yaml b/tests/components/bedjet/test.esp32-c3-idf.yaml index c2be04a49..dade44d14 100644 --- a/tests/components/bedjet/test.esp32-c3-idf.yaml +++ b/tests/components/bedjet/test.esp32-c3-idf.yaml @@ -1,33 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org - - 1.pool.ntp.org - - 192.168.178.1 - -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: bedjet_blec - -bedjet: - - id: bedjet_hub - ble_client_id: bedjet_blec - time_id: sntp_time - -climate: - - platform: bedjet - name: My Bedjet - bedjet_id: bedjet_hub - heat_mode: extended - -fan: - - platform: bedjet - name: My Bedjet fan - bedjet_id: bedjet_hub +<<: !include common.yaml diff --git a/tests/components/bedjet/test.esp32-c3.yaml b/tests/components/bedjet/test.esp32-c3.yaml index c2be04a49..dade44d14 100644 --- a/tests/components/bedjet/test.esp32-c3.yaml +++ b/tests/components/bedjet/test.esp32-c3.yaml @@ -1,33 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org - - 1.pool.ntp.org - - 192.168.178.1 - -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: bedjet_blec - -bedjet: - - id: bedjet_hub - ble_client_id: bedjet_blec - time_id: sntp_time - -climate: - - platform: bedjet - name: My Bedjet - bedjet_id: bedjet_hub - heat_mode: extended - -fan: - - platform: bedjet - name: My Bedjet fan - bedjet_id: bedjet_hub +<<: !include common.yaml diff --git a/tests/components/bedjet/test.esp32-idf.yaml b/tests/components/bedjet/test.esp32-idf.yaml index c2be04a49..dade44d14 100644 --- a/tests/components/bedjet/test.esp32-idf.yaml +++ b/tests/components/bedjet/test.esp32-idf.yaml @@ -1,33 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org - - 1.pool.ntp.org - - 192.168.178.1 - -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: bedjet_blec - -bedjet: - - id: bedjet_hub - ble_client_id: bedjet_blec - time_id: sntp_time - -climate: - - platform: bedjet - name: My Bedjet - bedjet_id: bedjet_hub - heat_mode: extended - -fan: - - platform: bedjet - name: My Bedjet fan - bedjet_id: bedjet_hub +<<: !include common.yaml diff --git a/tests/components/bedjet/test.esp32.yaml b/tests/components/bedjet/test.esp32.yaml index c2be04a49..dade44d14 100644 --- a/tests/components/bedjet/test.esp32.yaml +++ b/tests/components/bedjet/test.esp32.yaml @@ -1,33 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org - - 1.pool.ntp.org - - 192.168.178.1 - -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: bedjet_blec - -bedjet: - - id: bedjet_hub - ble_client_id: bedjet_blec - time_id: sntp_time - -climate: - - platform: bedjet - name: My Bedjet - bedjet_id: bedjet_hub - heat_mode: extended - -fan: - - platform: bedjet - name: My Bedjet fan - bedjet_id: bedjet_hub +<<: !include common.yaml diff --git a/tests/components/binary_sensor_map/common.yaml b/tests/components/binary_sensor_map/common.yaml new file mode 100644 index 000000000..8ffdd1f37 --- /dev/null +++ b/tests/components/binary_sensor_map/common.yaml @@ -0,0 +1,61 @@ +binary_sensor: + - platform: template + id: bin1 + lambda: |- + if (millis() > 10000) { + return true; + } else { + return false; + } + - platform: template + id: bin2 + lambda: |- + if (millis() > 20000) { + return true; + } else { + return false; + } + - platform: template + id: bin3 + lambda: |- + if (millis() > 30000) { + return true; + } else { + return false; + } + +sensor: + - platform: binary_sensor_map + name: Binary Sensor Map + type: group + channels: + - binary_sensor: bin1 + value: 10.0 + - binary_sensor: bin2 + value: 15.0 + - binary_sensor: bin3 + value: 100.0 + - platform: binary_sensor_map + name: Binary Sensor Map + type: sum + channels: + - binary_sensor: bin1 + value: 10.0 + - binary_sensor: bin2 + value: 15.0 + - binary_sensor: bin3 + value: 100.0 + - platform: binary_sensor_map + name: Binary Sensor Map + type: bayesian + prior: 0.4 + observations: + - binary_sensor: bin1 + prob_given_true: 0.9 + prob_given_false: 0.4 + - binary_sensor: bin2 + prob_given_true: 0.7 + prob_given_false: 0.05 + - binary_sensor: bin3 + prob_given_true: 0.8 + prob_given_false: 0.2 diff --git a/tests/components/binary_sensor_map/test.esp32-c3-idf.yaml b/tests/components/binary_sensor_map/test.esp32-c3-idf.yaml index 8ffdd1f37..dade44d14 100644 --- a/tests/components/binary_sensor_map/test.esp32-c3-idf.yaml +++ b/tests/components/binary_sensor_map/test.esp32-c3-idf.yaml @@ -1,61 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - - platform: template - id: bin2 - lambda: |- - if (millis() > 20000) { - return true; - } else { - return false; - } - - platform: template - id: bin3 - lambda: |- - if (millis() > 30000) { - return true; - } else { - return false; - } - -sensor: - - platform: binary_sensor_map - name: Binary Sensor Map - type: group - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: sum - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: bayesian - prior: 0.4 - observations: - - binary_sensor: bin1 - prob_given_true: 0.9 - prob_given_false: 0.4 - - binary_sensor: bin2 - prob_given_true: 0.7 - prob_given_false: 0.05 - - binary_sensor: bin3 - prob_given_true: 0.8 - prob_given_false: 0.2 +<<: !include common.yaml diff --git a/tests/components/binary_sensor_map/test.esp32-c3.yaml b/tests/components/binary_sensor_map/test.esp32-c3.yaml index 8ffdd1f37..dade44d14 100644 --- a/tests/components/binary_sensor_map/test.esp32-c3.yaml +++ b/tests/components/binary_sensor_map/test.esp32-c3.yaml @@ -1,61 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - - platform: template - id: bin2 - lambda: |- - if (millis() > 20000) { - return true; - } else { - return false; - } - - platform: template - id: bin3 - lambda: |- - if (millis() > 30000) { - return true; - } else { - return false; - } - -sensor: - - platform: binary_sensor_map - name: Binary Sensor Map - type: group - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: sum - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: bayesian - prior: 0.4 - observations: - - binary_sensor: bin1 - prob_given_true: 0.9 - prob_given_false: 0.4 - - binary_sensor: bin2 - prob_given_true: 0.7 - prob_given_false: 0.05 - - binary_sensor: bin3 - prob_given_true: 0.8 - prob_given_false: 0.2 +<<: !include common.yaml diff --git a/tests/components/binary_sensor_map/test.esp32-idf.yaml b/tests/components/binary_sensor_map/test.esp32-idf.yaml index 8ffdd1f37..dade44d14 100644 --- a/tests/components/binary_sensor_map/test.esp32-idf.yaml +++ b/tests/components/binary_sensor_map/test.esp32-idf.yaml @@ -1,61 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - - platform: template - id: bin2 - lambda: |- - if (millis() > 20000) { - return true; - } else { - return false; - } - - platform: template - id: bin3 - lambda: |- - if (millis() > 30000) { - return true; - } else { - return false; - } - -sensor: - - platform: binary_sensor_map - name: Binary Sensor Map - type: group - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: sum - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: bayesian - prior: 0.4 - observations: - - binary_sensor: bin1 - prob_given_true: 0.9 - prob_given_false: 0.4 - - binary_sensor: bin2 - prob_given_true: 0.7 - prob_given_false: 0.05 - - binary_sensor: bin3 - prob_given_true: 0.8 - prob_given_false: 0.2 +<<: !include common.yaml diff --git a/tests/components/binary_sensor_map/test.esp32.yaml b/tests/components/binary_sensor_map/test.esp32.yaml index 8ffdd1f37..dade44d14 100644 --- a/tests/components/binary_sensor_map/test.esp32.yaml +++ b/tests/components/binary_sensor_map/test.esp32.yaml @@ -1,61 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - - platform: template - id: bin2 - lambda: |- - if (millis() > 20000) { - return true; - } else { - return false; - } - - platform: template - id: bin3 - lambda: |- - if (millis() > 30000) { - return true; - } else { - return false; - } - -sensor: - - platform: binary_sensor_map - name: Binary Sensor Map - type: group - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: sum - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: bayesian - prior: 0.4 - observations: - - binary_sensor: bin1 - prob_given_true: 0.9 - prob_given_false: 0.4 - - binary_sensor: bin2 - prob_given_true: 0.7 - prob_given_false: 0.05 - - binary_sensor: bin3 - prob_given_true: 0.8 - prob_given_false: 0.2 +<<: !include common.yaml diff --git a/tests/components/binary_sensor_map/test.esp8266.yaml b/tests/components/binary_sensor_map/test.esp8266.yaml index 8ffdd1f37..dade44d14 100644 --- a/tests/components/binary_sensor_map/test.esp8266.yaml +++ b/tests/components/binary_sensor_map/test.esp8266.yaml @@ -1,61 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - - platform: template - id: bin2 - lambda: |- - if (millis() > 20000) { - return true; - } else { - return false; - } - - platform: template - id: bin3 - lambda: |- - if (millis() > 30000) { - return true; - } else { - return false; - } - -sensor: - - platform: binary_sensor_map - name: Binary Sensor Map - type: group - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: sum - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: bayesian - prior: 0.4 - observations: - - binary_sensor: bin1 - prob_given_true: 0.9 - prob_given_false: 0.4 - - binary_sensor: bin2 - prob_given_true: 0.7 - prob_given_false: 0.05 - - binary_sensor: bin3 - prob_given_true: 0.8 - prob_given_false: 0.2 +<<: !include common.yaml diff --git a/tests/components/binary_sensor_map/test.rp2040.yaml b/tests/components/binary_sensor_map/test.rp2040.yaml index 8ffdd1f37..dade44d14 100644 --- a/tests/components/binary_sensor_map/test.rp2040.yaml +++ b/tests/components/binary_sensor_map/test.rp2040.yaml @@ -1,61 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - - platform: template - id: bin2 - lambda: |- - if (millis() > 20000) { - return true; - } else { - return false; - } - - platform: template - id: bin3 - lambda: |- - if (millis() > 30000) { - return true; - } else { - return false; - } - -sensor: - - platform: binary_sensor_map - name: Binary Sensor Map - type: group - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: sum - channels: - - binary_sensor: bin1 - value: 10.0 - - binary_sensor: bin2 - value: 15.0 - - binary_sensor: bin3 - value: 100.0 - - platform: binary_sensor_map - name: Binary Sensor Map - type: bayesian - prior: 0.4 - observations: - - binary_sensor: bin1 - prob_given_true: 0.9 - prob_given_false: 0.4 - - binary_sensor: bin2 - prob_given_true: 0.7 - prob_given_false: 0.05 - - binary_sensor: bin3 - prob_given_true: 0.8 - prob_given_false: 0.2 +<<: !include common.yaml diff --git a/tests/components/ble_client/common.yaml b/tests/components/ble_client/common.yaml new file mode 100644 index 000000000..b5272d01f --- /dev/null +++ b/tests/components/ble_client/common.yaml @@ -0,0 +1,5 @@ +esp32_ble_tracker: + +ble_client: + - mac_address: 01:02:03:04:05:06 + id: test_blec diff --git a/tests/components/ble_client/test.esp32-c3-idf.yaml b/tests/components/ble_client/test.esp32-c3-idf.yaml index b5272d01f..dade44d14 100644 --- a/tests/components/ble_client/test.esp32-c3-idf.yaml +++ b/tests/components/ble_client/test.esp32-c3-idf.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: test_blec +<<: !include common.yaml diff --git a/tests/components/ble_client/test.esp32-c3.yaml b/tests/components/ble_client/test.esp32-c3.yaml index b5272d01f..dade44d14 100644 --- a/tests/components/ble_client/test.esp32-c3.yaml +++ b/tests/components/ble_client/test.esp32-c3.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: test_blec +<<: !include common.yaml diff --git a/tests/components/ble_client/test.esp32-idf.yaml b/tests/components/ble_client/test.esp32-idf.yaml index b5272d01f..dade44d14 100644 --- a/tests/components/ble_client/test.esp32-idf.yaml +++ b/tests/components/ble_client/test.esp32-idf.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: test_blec +<<: !include common.yaml diff --git a/tests/components/ble_client/test.esp32.yaml b/tests/components/ble_client/test.esp32.yaml index b5272d01f..dade44d14 100644 --- a/tests/components/ble_client/test.esp32.yaml +++ b/tests/components/ble_client/test.esp32.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: test_blec +<<: !include common.yaml diff --git a/tests/components/ble_presence/common.yaml b/tests/components/ble_presence/common.yaml new file mode 100644 index 000000000..6e5173eed --- /dev/null +++ b/tests/components/ble_presence/common.yaml @@ -0,0 +1,24 @@ +esp32_ble_tracker: + +binary_sensor: + - platform: ble_presence + mac_address: AC:37:43:77:5F:4C + name: ESP32 BLE Tracker Google Home Mini + - platform: ble_presence + service_uuid: 11aa + name: BLE Test Service 16 Presence + - platform: ble_presence + service_uuid: "11223344" + name: BLE Test Service 32 Presence + - platform: ble_presence + service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 + name: BLE Test Service 128 Presence + - platform: ble_presence + ibeacon_uuid: 11223344-5566-7788-99aa-bbccddeeff00 + ibeacon_major: 100 + ibeacon_minor: 1 + name: BLE Test iBeacon Presence + - platform: ble_presence + irk: 1234567890abcdef1234567890abcdef + name: "ESP32 BLE Tracker with Identity Resolving Key" + diff --git a/tests/components/ble_presence/test.esp32-c3-idf.yaml b/tests/components/ble_presence/test.esp32-c3-idf.yaml index 6e5173eed..dade44d14 100644 --- a/tests/components/ble_presence/test.esp32-c3-idf.yaml +++ b/tests/components/ble_presence/test.esp32-c3-idf.yaml @@ -1,24 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: ble_presence - mac_address: AC:37:43:77:5F:4C - name: ESP32 BLE Tracker Google Home Mini - - platform: ble_presence - service_uuid: 11aa - name: BLE Test Service 16 Presence - - platform: ble_presence - service_uuid: "11223344" - name: BLE Test Service 32 Presence - - platform: ble_presence - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test Service 128 Presence - - platform: ble_presence - ibeacon_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - ibeacon_major: 100 - ibeacon_minor: 1 - name: BLE Test iBeacon Presence - - platform: ble_presence - irk: 1234567890abcdef1234567890abcdef - name: "ESP32 BLE Tracker with Identity Resolving Key" - +<<: !include common.yaml diff --git a/tests/components/ble_presence/test.esp32-c3.yaml b/tests/components/ble_presence/test.esp32-c3.yaml index 6e5173eed..dade44d14 100644 --- a/tests/components/ble_presence/test.esp32-c3.yaml +++ b/tests/components/ble_presence/test.esp32-c3.yaml @@ -1,24 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: ble_presence - mac_address: AC:37:43:77:5F:4C - name: ESP32 BLE Tracker Google Home Mini - - platform: ble_presence - service_uuid: 11aa - name: BLE Test Service 16 Presence - - platform: ble_presence - service_uuid: "11223344" - name: BLE Test Service 32 Presence - - platform: ble_presence - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test Service 128 Presence - - platform: ble_presence - ibeacon_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - ibeacon_major: 100 - ibeacon_minor: 1 - name: BLE Test iBeacon Presence - - platform: ble_presence - irk: 1234567890abcdef1234567890abcdef - name: "ESP32 BLE Tracker with Identity Resolving Key" - +<<: !include common.yaml diff --git a/tests/components/ble_presence/test.esp32-idf.yaml b/tests/components/ble_presence/test.esp32-idf.yaml index 6e5173eed..dade44d14 100644 --- a/tests/components/ble_presence/test.esp32-idf.yaml +++ b/tests/components/ble_presence/test.esp32-idf.yaml @@ -1,24 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: ble_presence - mac_address: AC:37:43:77:5F:4C - name: ESP32 BLE Tracker Google Home Mini - - platform: ble_presence - service_uuid: 11aa - name: BLE Test Service 16 Presence - - platform: ble_presence - service_uuid: "11223344" - name: BLE Test Service 32 Presence - - platform: ble_presence - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test Service 128 Presence - - platform: ble_presence - ibeacon_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - ibeacon_major: 100 - ibeacon_minor: 1 - name: BLE Test iBeacon Presence - - platform: ble_presence - irk: 1234567890abcdef1234567890abcdef - name: "ESP32 BLE Tracker with Identity Resolving Key" - +<<: !include common.yaml diff --git a/tests/components/ble_presence/test.esp32.yaml b/tests/components/ble_presence/test.esp32.yaml index 6e5173eed..dade44d14 100644 --- a/tests/components/ble_presence/test.esp32.yaml +++ b/tests/components/ble_presence/test.esp32.yaml @@ -1,24 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: ble_presence - mac_address: AC:37:43:77:5F:4C - name: ESP32 BLE Tracker Google Home Mini - - platform: ble_presence - service_uuid: 11aa - name: BLE Test Service 16 Presence - - platform: ble_presence - service_uuid: "11223344" - name: BLE Test Service 32 Presence - - platform: ble_presence - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test Service 128 Presence - - platform: ble_presence - ibeacon_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - ibeacon_major: 100 - ibeacon_minor: 1 - name: BLE Test iBeacon Presence - - platform: ble_presence - irk: 1234567890abcdef1234567890abcdef - name: "ESP32 BLE Tracker with Identity Resolving Key" - +<<: !include common.yaml diff --git a/tests/components/ble_rssi/common.yaml b/tests/components/ble_rssi/common.yaml new file mode 100644 index 000000000..52e5b865c --- /dev/null +++ b/tests/components/ble_rssi/common.yaml @@ -0,0 +1,18 @@ +esp32_ble_tracker: + +sensor: + - platform: ble_rssi + mac_address: AC:37:43:77:5F:4C + name: BLE Google Home Mini RSSI value + - platform: ble_rssi + service_uuid: 11aa + name: BLE Test Service 16 + - platform: ble_rssi + service_uuid: "11223344" + name: BLE Test Service 32 + - platform: ble_rssi + service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 + name: BLE Test Service 128 + - platform: ble_rssi + service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 + name: BLE Test iBeacon UUID diff --git a/tests/components/ble_rssi/test.esp32-c3-idf.yaml b/tests/components/ble_rssi/test.esp32-c3-idf.yaml index 52e5b865c..dade44d14 100644 --- a/tests/components/ble_rssi/test.esp32-c3-idf.yaml +++ b/tests/components/ble_rssi/test.esp32-c3-idf.yaml @@ -1,18 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: ble_rssi - mac_address: AC:37:43:77:5F:4C - name: BLE Google Home Mini RSSI value - - platform: ble_rssi - service_uuid: 11aa - name: BLE Test Service 16 - - platform: ble_rssi - service_uuid: "11223344" - name: BLE Test Service 32 - - platform: ble_rssi - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test Service 128 - - platform: ble_rssi - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test iBeacon UUID +<<: !include common.yaml diff --git a/tests/components/ble_rssi/test.esp32-c3.yaml b/tests/components/ble_rssi/test.esp32-c3.yaml index 52e5b865c..dade44d14 100644 --- a/tests/components/ble_rssi/test.esp32-c3.yaml +++ b/tests/components/ble_rssi/test.esp32-c3.yaml @@ -1,18 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: ble_rssi - mac_address: AC:37:43:77:5F:4C - name: BLE Google Home Mini RSSI value - - platform: ble_rssi - service_uuid: 11aa - name: BLE Test Service 16 - - platform: ble_rssi - service_uuid: "11223344" - name: BLE Test Service 32 - - platform: ble_rssi - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test Service 128 - - platform: ble_rssi - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test iBeacon UUID +<<: !include common.yaml diff --git a/tests/components/ble_rssi/test.esp32-idf.yaml b/tests/components/ble_rssi/test.esp32-idf.yaml index 52e5b865c..dade44d14 100644 --- a/tests/components/ble_rssi/test.esp32-idf.yaml +++ b/tests/components/ble_rssi/test.esp32-idf.yaml @@ -1,18 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: ble_rssi - mac_address: AC:37:43:77:5F:4C - name: BLE Google Home Mini RSSI value - - platform: ble_rssi - service_uuid: 11aa - name: BLE Test Service 16 - - platform: ble_rssi - service_uuid: "11223344" - name: BLE Test Service 32 - - platform: ble_rssi - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test Service 128 - - platform: ble_rssi - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test iBeacon UUID +<<: !include common.yaml diff --git a/tests/components/ble_rssi/test.esp32.yaml b/tests/components/ble_rssi/test.esp32.yaml index 52e5b865c..dade44d14 100644 --- a/tests/components/ble_rssi/test.esp32.yaml +++ b/tests/components/ble_rssi/test.esp32.yaml @@ -1,18 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: ble_rssi - mac_address: AC:37:43:77:5F:4C - name: BLE Google Home Mini RSSI value - - platform: ble_rssi - service_uuid: 11aa - name: BLE Test Service 16 - - platform: ble_rssi - service_uuid: "11223344" - name: BLE Test Service 32 - - platform: ble_rssi - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test Service 128 - - platform: ble_rssi - service_uuid: 11223344-5566-7788-99aa-bbccddeeff00 - name: BLE Test iBeacon UUID +<<: !include common.yaml diff --git a/tests/components/ble_scanner/common.yaml b/tests/components/ble_scanner/common.yaml new file mode 100644 index 000000000..935a5a5a1 --- /dev/null +++ b/tests/components/ble_scanner/common.yaml @@ -0,0 +1,5 @@ +esp32_ble_tracker: + +text_sensor: + - platform: ble_scanner + name: Scanner diff --git a/tests/components/ble_scanner/test.esp32-c3-idf.yaml b/tests/components/ble_scanner/test.esp32-c3-idf.yaml index 935a5a5a1..dade44d14 100644 --- a/tests/components/ble_scanner/test.esp32-c3-idf.yaml +++ b/tests/components/ble_scanner/test.esp32-c3-idf.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -text_sensor: - - platform: ble_scanner - name: Scanner +<<: !include common.yaml diff --git a/tests/components/ble_scanner/test.esp32-c3.yaml b/tests/components/ble_scanner/test.esp32-c3.yaml index 935a5a5a1..dade44d14 100644 --- a/tests/components/ble_scanner/test.esp32-c3.yaml +++ b/tests/components/ble_scanner/test.esp32-c3.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -text_sensor: - - platform: ble_scanner - name: Scanner +<<: !include common.yaml diff --git a/tests/components/ble_scanner/test.esp32-idf.yaml b/tests/components/ble_scanner/test.esp32-idf.yaml index 935a5a5a1..dade44d14 100644 --- a/tests/components/ble_scanner/test.esp32-idf.yaml +++ b/tests/components/ble_scanner/test.esp32-idf.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -text_sensor: - - platform: ble_scanner - name: Scanner +<<: !include common.yaml diff --git a/tests/components/ble_scanner/test.esp32.yaml b/tests/components/ble_scanner/test.esp32.yaml index 935a5a5a1..dade44d14 100644 --- a/tests/components/ble_scanner/test.esp32.yaml +++ b/tests/components/ble_scanner/test.esp32.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -text_sensor: - - platform: ble_scanner - name: Scanner +<<: !include common.yaml diff --git a/tests/components/button/common.yaml b/tests/components/button/common.yaml new file mode 100644 index 000000000..d5978601f --- /dev/null +++ b/tests/components/button/common.yaml @@ -0,0 +1,6 @@ +button: + - platform: template + name: Button + id: some_button + on_press: + - logger.log: Button pressed diff --git a/tests/components/button/test.esp32-c3-idf.yaml b/tests/components/button/test.esp32-c3-idf.yaml index d5978601f..dade44d14 100644 --- a/tests/components/button/test.esp32-c3-idf.yaml +++ b/tests/components/button/test.esp32-c3-idf.yaml @@ -1,6 +1 @@ -button: - - platform: template - name: Button - id: some_button - on_press: - - logger.log: Button pressed +<<: !include common.yaml diff --git a/tests/components/button/test.esp32-c3.yaml b/tests/components/button/test.esp32-c3.yaml index d5978601f..dade44d14 100644 --- a/tests/components/button/test.esp32-c3.yaml +++ b/tests/components/button/test.esp32-c3.yaml @@ -1,6 +1 @@ -button: - - platform: template - name: Button - id: some_button - on_press: - - logger.log: Button pressed +<<: !include common.yaml diff --git a/tests/components/button/test.esp32-idf.yaml b/tests/components/button/test.esp32-idf.yaml index d5978601f..dade44d14 100644 --- a/tests/components/button/test.esp32-idf.yaml +++ b/tests/components/button/test.esp32-idf.yaml @@ -1,6 +1 @@ -button: - - platform: template - name: Button - id: some_button - on_press: - - logger.log: Button pressed +<<: !include common.yaml diff --git a/tests/components/button/test.esp32.yaml b/tests/components/button/test.esp32.yaml index d5978601f..dade44d14 100644 --- a/tests/components/button/test.esp32.yaml +++ b/tests/components/button/test.esp32.yaml @@ -1,6 +1 @@ -button: - - platform: template - name: Button - id: some_button - on_press: - - logger.log: Button pressed +<<: !include common.yaml diff --git a/tests/components/button/test.esp8266.yaml b/tests/components/button/test.esp8266.yaml index d5978601f..dade44d14 100644 --- a/tests/components/button/test.esp8266.yaml +++ b/tests/components/button/test.esp8266.yaml @@ -1,6 +1 @@ -button: - - platform: template - name: Button - id: some_button - on_press: - - logger.log: Button pressed +<<: !include common.yaml diff --git a/tests/components/button/test.rp2040.yaml b/tests/components/button/test.rp2040.yaml index d5978601f..dade44d14 100644 --- a/tests/components/button/test.rp2040.yaml +++ b/tests/components/button/test.rp2040.yaml @@ -1,6 +1 @@ -button: - - platform: template - name: Button - id: some_button - on_press: - - logger.log: Button pressed +<<: !include common.yaml diff --git a/tests/components/canbus/common.yaml b/tests/components/canbus/common.yaml new file mode 100644 index 000000000..fd146cc3a --- /dev/null +++ b/tests/components/canbus/common.yaml @@ -0,0 +1,46 @@ +canbus: + - platform: esp32_can + id: esp32_internal_can + rx_pin: 4 + tx_pin: 5 + can_id: 4 + bit_rate: 50kbps + on_frame: + - can_id: 500 + then: + - lambda: |- + std::string b(x.begin(), x.end()); + ESP_LOGD("canid 500", "%s", b.c_str()); + - can_id: 23 + then: + - if: + condition: + lambda: "return x[0] == 0x11;" + then: + logger.log: Truth + - can_id: 0b00000000000000000000001000000 + can_id_mask: 0b11111000000000011111111000000 + use_extended_id: true + then: + - lambda: |- + auto pdo_id = can_id >> 14; + switch (pdo_id) + { + case 117: + ESP_LOGD("canbus", "exhaust_fan_duty"); + break; + case 118: + ESP_LOGD("canbus", "supply_fan_duty"); + break; + case 119: + ESP_LOGD("canbus", "supply_fan_flow"); + break; + } + +button: + - platform: template + name: Canbus Actions + on_press: + - canbus.send: "abc" + - canbus.send: [0, 1, 2] + - canbus.send: !lambda return {0, 1, 2}; diff --git a/tests/components/canbus/test.esp32-c3-idf.yaml b/tests/components/canbus/test.esp32-c3-idf.yaml index fd146cc3a..dade44d14 100644 --- a/tests/components/canbus/test.esp32-c3-idf.yaml +++ b/tests/components/canbus/test.esp32-c3-idf.yaml @@ -1,46 +1 @@ -canbus: - - platform: esp32_can - id: esp32_internal_can - rx_pin: 4 - tx_pin: 5 - can_id: 4 - bit_rate: 50kbps - on_frame: - - can_id: 500 - then: - - lambda: |- - std::string b(x.begin(), x.end()); - ESP_LOGD("canid 500", "%s", b.c_str()); - - can_id: 23 - then: - - if: - condition: - lambda: "return x[0] == 0x11;" - then: - logger.log: Truth - - can_id: 0b00000000000000000000001000000 - can_id_mask: 0b11111000000000011111111000000 - use_extended_id: true - then: - - lambda: |- - auto pdo_id = can_id >> 14; - switch (pdo_id) - { - case 117: - ESP_LOGD("canbus", "exhaust_fan_duty"); - break; - case 118: - ESP_LOGD("canbus", "supply_fan_duty"); - break; - case 119: - ESP_LOGD("canbus", "supply_fan_flow"); - break; - } - -button: - - platform: template - name: Canbus Actions - on_press: - - canbus.send: "abc" - - canbus.send: [0, 1, 2] - - canbus.send: !lambda return {0, 1, 2}; +<<: !include common.yaml diff --git a/tests/components/canbus/test.esp32-c3.yaml b/tests/components/canbus/test.esp32-c3.yaml index fd146cc3a..dade44d14 100644 --- a/tests/components/canbus/test.esp32-c3.yaml +++ b/tests/components/canbus/test.esp32-c3.yaml @@ -1,46 +1 @@ -canbus: - - platform: esp32_can - id: esp32_internal_can - rx_pin: 4 - tx_pin: 5 - can_id: 4 - bit_rate: 50kbps - on_frame: - - can_id: 500 - then: - - lambda: |- - std::string b(x.begin(), x.end()); - ESP_LOGD("canid 500", "%s", b.c_str()); - - can_id: 23 - then: - - if: - condition: - lambda: "return x[0] == 0x11;" - then: - logger.log: Truth - - can_id: 0b00000000000000000000001000000 - can_id_mask: 0b11111000000000011111111000000 - use_extended_id: true - then: - - lambda: |- - auto pdo_id = can_id >> 14; - switch (pdo_id) - { - case 117: - ESP_LOGD("canbus", "exhaust_fan_duty"); - break; - case 118: - ESP_LOGD("canbus", "supply_fan_duty"); - break; - case 119: - ESP_LOGD("canbus", "supply_fan_flow"); - break; - } - -button: - - platform: template - name: Canbus Actions - on_press: - - canbus.send: "abc" - - canbus.send: [0, 1, 2] - - canbus.send: !lambda return {0, 1, 2}; +<<: !include common.yaml diff --git a/tests/components/canbus/test.esp32-idf.yaml b/tests/components/canbus/test.esp32-idf.yaml index fd146cc3a..dade44d14 100644 --- a/tests/components/canbus/test.esp32-idf.yaml +++ b/tests/components/canbus/test.esp32-idf.yaml @@ -1,46 +1 @@ -canbus: - - platform: esp32_can - id: esp32_internal_can - rx_pin: 4 - tx_pin: 5 - can_id: 4 - bit_rate: 50kbps - on_frame: - - can_id: 500 - then: - - lambda: |- - std::string b(x.begin(), x.end()); - ESP_LOGD("canid 500", "%s", b.c_str()); - - can_id: 23 - then: - - if: - condition: - lambda: "return x[0] == 0x11;" - then: - logger.log: Truth - - can_id: 0b00000000000000000000001000000 - can_id_mask: 0b11111000000000011111111000000 - use_extended_id: true - then: - - lambda: |- - auto pdo_id = can_id >> 14; - switch (pdo_id) - { - case 117: - ESP_LOGD("canbus", "exhaust_fan_duty"); - break; - case 118: - ESP_LOGD("canbus", "supply_fan_duty"); - break; - case 119: - ESP_LOGD("canbus", "supply_fan_flow"); - break; - } - -button: - - platform: template - name: Canbus Actions - on_press: - - canbus.send: "abc" - - canbus.send: [0, 1, 2] - - canbus.send: !lambda return {0, 1, 2}; +<<: !include common.yaml diff --git a/tests/components/canbus/test.esp32.yaml b/tests/components/canbus/test.esp32.yaml index fd146cc3a..dade44d14 100644 --- a/tests/components/canbus/test.esp32.yaml +++ b/tests/components/canbus/test.esp32.yaml @@ -1,46 +1 @@ -canbus: - - platform: esp32_can - id: esp32_internal_can - rx_pin: 4 - tx_pin: 5 - can_id: 4 - bit_rate: 50kbps - on_frame: - - can_id: 500 - then: - - lambda: |- - std::string b(x.begin(), x.end()); - ESP_LOGD("canid 500", "%s", b.c_str()); - - can_id: 23 - then: - - if: - condition: - lambda: "return x[0] == 0x11;" - then: - logger.log: Truth - - can_id: 0b00000000000000000000001000000 - can_id_mask: 0b11111000000000011111111000000 - use_extended_id: true - then: - - lambda: |- - auto pdo_id = can_id >> 14; - switch (pdo_id) - { - case 117: - ESP_LOGD("canbus", "exhaust_fan_duty"); - break; - case 118: - ESP_LOGD("canbus", "supply_fan_duty"); - break; - case 119: - ESP_LOGD("canbus", "supply_fan_flow"); - break; - } - -button: - - platform: template - name: Canbus Actions - on_press: - - canbus.send: "abc" - - canbus.send: [0, 1, 2] - - canbus.send: !lambda return {0, 1, 2}; +<<: !include common.yaml diff --git a/tests/components/captive_portal/common.yaml b/tests/components/captive_portal/common.yaml new file mode 100644 index 000000000..25bc4a887 --- /dev/null +++ b/tests/components/captive_portal/common.yaml @@ -0,0 +1,5 @@ +wifi: + ssid: MySSID + password: password1 + +captive_portal: diff --git a/tests/components/captive_portal/test.esp32-c3-idf.yaml b/tests/components/captive_portal/test.esp32-c3-idf.yaml index 25bc4a887..dade44d14 100644 --- a/tests/components/captive_portal/test.esp32-c3-idf.yaml +++ b/tests/components/captive_portal/test.esp32-c3-idf.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -captive_portal: +<<: !include common.yaml diff --git a/tests/components/captive_portal/test.esp32-c3.yaml b/tests/components/captive_portal/test.esp32-c3.yaml index 25bc4a887..dade44d14 100644 --- a/tests/components/captive_portal/test.esp32-c3.yaml +++ b/tests/components/captive_portal/test.esp32-c3.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -captive_portal: +<<: !include common.yaml diff --git a/tests/components/captive_portal/test.esp32-idf.yaml b/tests/components/captive_portal/test.esp32-idf.yaml index 25bc4a887..dade44d14 100644 --- a/tests/components/captive_portal/test.esp32-idf.yaml +++ b/tests/components/captive_portal/test.esp32-idf.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -captive_portal: +<<: !include common.yaml diff --git a/tests/components/captive_portal/test.esp32.yaml b/tests/components/captive_portal/test.esp32.yaml index 25bc4a887..dade44d14 100644 --- a/tests/components/captive_portal/test.esp32.yaml +++ b/tests/components/captive_portal/test.esp32.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -captive_portal: +<<: !include common.yaml diff --git a/tests/components/captive_portal/test.esp8266.yaml b/tests/components/captive_portal/test.esp8266.yaml index 25bc4a887..dade44d14 100644 --- a/tests/components/captive_portal/test.esp8266.yaml +++ b/tests/components/captive_portal/test.esp8266.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -captive_portal: +<<: !include common.yaml diff --git a/tests/components/color/common.yaml b/tests/components/color/common.yaml new file mode 100644 index 000000000..7aa308bb6 --- /dev/null +++ b/tests/components/color/common.yaml @@ -0,0 +1,11 @@ +color: + - id: kbx_red + red: 100% + green_int: 123 + blue: 2% + - id: kbx_blue + red: 0% + green: 1% + blue: 100% + - id: kbx_green + hex: "3DEC55" diff --git a/tests/components/color/test.esp32-c3-idf.yaml b/tests/components/color/test.esp32-c3-idf.yaml index 7aa308bb6..dade44d14 100644 --- a/tests/components/color/test.esp32-c3-idf.yaml +++ b/tests/components/color/test.esp32-c3-idf.yaml @@ -1,11 +1 @@ -color: - - id: kbx_red - red: 100% - green_int: 123 - blue: 2% - - id: kbx_blue - red: 0% - green: 1% - blue: 100% - - id: kbx_green - hex: "3DEC55" +<<: !include common.yaml diff --git a/tests/components/color/test.esp32-c3.yaml b/tests/components/color/test.esp32-c3.yaml index 7aa308bb6..dade44d14 100644 --- a/tests/components/color/test.esp32-c3.yaml +++ b/tests/components/color/test.esp32-c3.yaml @@ -1,11 +1 @@ -color: - - id: kbx_red - red: 100% - green_int: 123 - blue: 2% - - id: kbx_blue - red: 0% - green: 1% - blue: 100% - - id: kbx_green - hex: "3DEC55" +<<: !include common.yaml diff --git a/tests/components/color/test.esp32-idf.yaml b/tests/components/color/test.esp32-idf.yaml index 7aa308bb6..dade44d14 100644 --- a/tests/components/color/test.esp32-idf.yaml +++ b/tests/components/color/test.esp32-idf.yaml @@ -1,11 +1 @@ -color: - - id: kbx_red - red: 100% - green_int: 123 - blue: 2% - - id: kbx_blue - red: 0% - green: 1% - blue: 100% - - id: kbx_green - hex: "3DEC55" +<<: !include common.yaml diff --git a/tests/components/color/test.esp32.yaml b/tests/components/color/test.esp32.yaml index 7aa308bb6..dade44d14 100644 --- a/tests/components/color/test.esp32.yaml +++ b/tests/components/color/test.esp32.yaml @@ -1,11 +1 @@ -color: - - id: kbx_red - red: 100% - green_int: 123 - blue: 2% - - id: kbx_blue - red: 0% - green: 1% - blue: 100% - - id: kbx_green - hex: "3DEC55" +<<: !include common.yaml diff --git a/tests/components/color/test.esp8266.yaml b/tests/components/color/test.esp8266.yaml index 7aa308bb6..dade44d14 100644 --- a/tests/components/color/test.esp8266.yaml +++ b/tests/components/color/test.esp8266.yaml @@ -1,11 +1 @@ -color: - - id: kbx_red - red: 100% - green_int: 123 - blue: 2% - - id: kbx_blue - red: 0% - green: 1% - blue: 100% - - id: kbx_green - hex: "3DEC55" +<<: !include common.yaml diff --git a/tests/components/color/test.rp2040.yaml b/tests/components/color/test.rp2040.yaml index 7aa308bb6..dade44d14 100644 --- a/tests/components/color/test.rp2040.yaml +++ b/tests/components/color/test.rp2040.yaml @@ -1,11 +1 @@ -color: - - id: kbx_red - red: 100% - green_int: 123 - blue: 2% - - id: kbx_blue - red: 0% - green: 1% - blue: 100% - - id: kbx_green - hex: "3DEC55" +<<: !include common.yaml diff --git a/tests/components/combination/common.yaml b/tests/components/combination/common.yaml new file mode 100644 index 000000000..62246190a --- /dev/null +++ b/tests/components/combination/common.yaml @@ -0,0 +1,76 @@ +sensor: + - platform: template + id: template_temperature1 + lambda: |- + if (millis() > 10000) { + return 0.6; + } else { + return 0.0; + } + - platform: template + id: template_temperature2 + lambda: |- + if (millis() > 20000) { + return 0.8; + } else { + return 0.0; + } + - platform: combination + type: kalman + name: Kalman-filtered temperature + process_std_dev: 0.00139 + sources: + - source: template_temperature1 + error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" + - source: template_temperature2 + error: 1.5 + - platform: combination + type: linear + name: Linearly combined temperatures + sources: + - source: template_temperature1 + coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" + - source: template_temperature2 + coeffecient: 1.5 + - platform: combination + type: max + name: Max of combined temperatures + sources: + - source: template_temperature1 + - source: template_temperature2 + - platform: combination + type: mean + name: Mean of combined temperatures + sources: + - source: template_temperature1 + - source: template_temperature2 + - platform: combination + type: median + name: Median of combined temperatures + sources: + - source: template_temperature1 + - source: template_temperature2 + - platform: combination + type: min + name: Min of combined temperatures + sources: + - source: template_temperature1 + - source: template_temperature2 + - platform: combination + type: most_recently_updated + name: Most recently updated of combined temperatures + sources: + - source: template_temperature1 + - source: template_temperature2 + - platform: combination + type: range + name: Range of combined temperatures + sources: + - source: template_temperature1 + - source: template_temperature2 + - platform: combination + type: sum + name: Sum of combined temperatures + sources: + - source: template_temperature1 + - source: template_temperature2 diff --git a/tests/components/combination/test.esp32-c3-idf.yaml b/tests/components/combination/test.esp32-c3-idf.yaml index 62246190a..dade44d14 100644 --- a/tests/components/combination/test.esp32-c3-idf.yaml +++ b/tests/components/combination/test.esp32-c3-idf.yaml @@ -1,76 +1 @@ -sensor: - - platform: template - id: template_temperature1 - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature2 - lambda: |- - if (millis() > 20000) { - return 0.8; - } else { - return 0.0; - } - - platform: combination - type: kalman - name: Kalman-filtered temperature - process_std_dev: 0.00139 - sources: - - source: template_temperature1 - error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - error: 1.5 - - platform: combination - type: linear - name: Linearly combined temperatures - sources: - - source: template_temperature1 - coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - coeffecient: 1.5 - - platform: combination - type: max - name: Max of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: mean - name: Mean of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: median - name: Median of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: min - name: Min of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: most_recently_updated - name: Most recently updated of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: range - name: Range of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: sum - name: Sum of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 +<<: !include common.yaml diff --git a/tests/components/combination/test.esp32-c3.yaml b/tests/components/combination/test.esp32-c3.yaml index 62246190a..dade44d14 100644 --- a/tests/components/combination/test.esp32-c3.yaml +++ b/tests/components/combination/test.esp32-c3.yaml @@ -1,76 +1 @@ -sensor: - - platform: template - id: template_temperature1 - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature2 - lambda: |- - if (millis() > 20000) { - return 0.8; - } else { - return 0.0; - } - - platform: combination - type: kalman - name: Kalman-filtered temperature - process_std_dev: 0.00139 - sources: - - source: template_temperature1 - error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - error: 1.5 - - platform: combination - type: linear - name: Linearly combined temperatures - sources: - - source: template_temperature1 - coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - coeffecient: 1.5 - - platform: combination - type: max - name: Max of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: mean - name: Mean of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: median - name: Median of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: min - name: Min of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: most_recently_updated - name: Most recently updated of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: range - name: Range of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: sum - name: Sum of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 +<<: !include common.yaml diff --git a/tests/components/combination/test.esp32-idf.yaml b/tests/components/combination/test.esp32-idf.yaml index 62246190a..dade44d14 100644 --- a/tests/components/combination/test.esp32-idf.yaml +++ b/tests/components/combination/test.esp32-idf.yaml @@ -1,76 +1 @@ -sensor: - - platform: template - id: template_temperature1 - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature2 - lambda: |- - if (millis() > 20000) { - return 0.8; - } else { - return 0.0; - } - - platform: combination - type: kalman - name: Kalman-filtered temperature - process_std_dev: 0.00139 - sources: - - source: template_temperature1 - error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - error: 1.5 - - platform: combination - type: linear - name: Linearly combined temperatures - sources: - - source: template_temperature1 - coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - coeffecient: 1.5 - - platform: combination - type: max - name: Max of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: mean - name: Mean of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: median - name: Median of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: min - name: Min of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: most_recently_updated - name: Most recently updated of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: range - name: Range of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: sum - name: Sum of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 +<<: !include common.yaml diff --git a/tests/components/combination/test.esp32.yaml b/tests/components/combination/test.esp32.yaml index 62246190a..dade44d14 100644 --- a/tests/components/combination/test.esp32.yaml +++ b/tests/components/combination/test.esp32.yaml @@ -1,76 +1 @@ -sensor: - - platform: template - id: template_temperature1 - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature2 - lambda: |- - if (millis() > 20000) { - return 0.8; - } else { - return 0.0; - } - - platform: combination - type: kalman - name: Kalman-filtered temperature - process_std_dev: 0.00139 - sources: - - source: template_temperature1 - error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - error: 1.5 - - platform: combination - type: linear - name: Linearly combined temperatures - sources: - - source: template_temperature1 - coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - coeffecient: 1.5 - - platform: combination - type: max - name: Max of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: mean - name: Mean of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: median - name: Median of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: min - name: Min of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: most_recently_updated - name: Most recently updated of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: range - name: Range of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: sum - name: Sum of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 +<<: !include common.yaml diff --git a/tests/components/combination/test.esp8266.yaml b/tests/components/combination/test.esp8266.yaml index 62246190a..dade44d14 100644 --- a/tests/components/combination/test.esp8266.yaml +++ b/tests/components/combination/test.esp8266.yaml @@ -1,76 +1 @@ -sensor: - - platform: template - id: template_temperature1 - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature2 - lambda: |- - if (millis() > 20000) { - return 0.8; - } else { - return 0.0; - } - - platform: combination - type: kalman - name: Kalman-filtered temperature - process_std_dev: 0.00139 - sources: - - source: template_temperature1 - error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - error: 1.5 - - platform: combination - type: linear - name: Linearly combined temperatures - sources: - - source: template_temperature1 - coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - coeffecient: 1.5 - - platform: combination - type: max - name: Max of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: mean - name: Mean of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: median - name: Median of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: min - name: Min of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: most_recently_updated - name: Most recently updated of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: range - name: Range of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: sum - name: Sum of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 +<<: !include common.yaml diff --git a/tests/components/combination/test.rp2040.yaml b/tests/components/combination/test.rp2040.yaml index 62246190a..dade44d14 100644 --- a/tests/components/combination/test.rp2040.yaml +++ b/tests/components/combination/test.rp2040.yaml @@ -1,76 +1 @@ -sensor: - - platform: template - id: template_temperature1 - lambda: |- - if (millis() > 10000) { - return 0.6; - } else { - return 0.0; - } - - platform: template - id: template_temperature2 - lambda: |- - if (millis() > 20000) { - return 0.8; - } else { - return 0.0; - } - - platform: combination - type: kalman - name: Kalman-filtered temperature - process_std_dev: 0.00139 - sources: - - source: template_temperature1 - error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - error: 1.5 - - platform: combination - type: linear - name: Linearly combined temperatures - sources: - - source: template_temperature1 - coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;" - - source: template_temperature2 - coeffecient: 1.5 - - platform: combination - type: max - name: Max of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: mean - name: Mean of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: median - name: Median of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: min - name: Min of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: most_recently_updated - name: Most recently updated of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: range - name: Range of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 - - platform: combination - type: sum - name: Sum of combined temperatures - sources: - - source: template_temperature1 - - source: template_temperature2 +<<: !include common.yaml diff --git a/tests/components/cst226/common.yaml b/tests/components/cst226/common.yaml new file mode 100644 index 000000000..4cbf38ef5 --- /dev/null +++ b/tests/components/cst226/common.yaml @@ -0,0 +1,24 @@ +spi: + - id: spi_id_1 + clk_pin: GPIO7 + mosi_pin: GPIO6 + interface: any + +display: + - platform: ili9xxx + id: displ8 + model: ili9342 + cs_pin: GPIO5 + dc_pin: GPIO4 + reset_pin: + number: GPIO21 + +i2c: + scl: GPIO18 + sda: GPIO8 + +touchscreen: + - platform: cst226 + interrupt_pin: GPIO3 + reset_pin: GPIO20 + diff --git a/tests/components/cst226/test.esp32-c3.yaml b/tests/components/cst226/test.esp32-c3.yaml index 4cbf38ef5..dade44d14 100644 --- a/tests/components/cst226/test.esp32-c3.yaml +++ b/tests/components/cst226/test.esp32-c3.yaml @@ -1,24 +1 @@ -spi: - - id: spi_id_1 - clk_pin: GPIO7 - mosi_pin: GPIO6 - interface: any - -display: - - platform: ili9xxx - id: displ8 - model: ili9342 - cs_pin: GPIO5 - dc_pin: GPIO4 - reset_pin: - number: GPIO21 - -i2c: - scl: GPIO18 - sda: GPIO8 - -touchscreen: - - platform: cst226 - interrupt_pin: GPIO3 - reset_pin: GPIO20 - +<<: !include common.yaml diff --git a/tests/components/cst816/common.yaml b/tests/components/cst816/common.yaml new file mode 100644 index 000000000..f8deea6e9 --- /dev/null +++ b/tests/components/cst816/common.yaml @@ -0,0 +1,36 @@ +touchscreen: + - platform: cst816 + id: my_touchscreen + interrupt_pin: + number: 21 + reset_pin: GPIO16 + transform: + mirror_x: false + mirror_y: false + swap_xy: false + +i2c: + sda: 3 + scl: 2 + +display: + - id: my_display + platform: ili9xxx + dimensions: 480x320 + model: ST7796 + cs_pin: 15 + dc_pin: 20 + reset_pin: 22 + transform: + swap_xy: true + mirror_x: true + mirror_y: true + auto_clear_enabled: false + +spi: + clk_pin: 14 + mosi_pin: 13 + +binary_sensor: + - platform: cst816 + name: Home Button diff --git a/tests/components/cst816/test.esp32.yaml b/tests/components/cst816/test.esp32.yaml index f8deea6e9..dade44d14 100644 --- a/tests/components/cst816/test.esp32.yaml +++ b/tests/components/cst816/test.esp32.yaml @@ -1,36 +1 @@ -touchscreen: - - platform: cst816 - id: my_touchscreen - interrupt_pin: - number: 21 - reset_pin: GPIO16 - transform: - mirror_x: false - mirror_y: false - swap_xy: false - -i2c: - sda: 3 - scl: 2 - -display: - - id: my_display - platform: ili9xxx - dimensions: 480x320 - model: ST7796 - cs_pin: 15 - dc_pin: 20 - reset_pin: 22 - transform: - swap_xy: true - mirror_x: true - mirror_y: true - auto_clear_enabled: false - -spi: - clk_pin: 14 - mosi_pin: 13 - -binary_sensor: - - platform: cst816 - name: Home Button +<<: !include common.yaml diff --git a/tests/components/dallas/common.yaml b/tests/components/dallas/common.yaml new file mode 100644 index 000000000..797597710 --- /dev/null +++ b/tests/components/dallas/common.yaml @@ -0,0 +1,11 @@ +dallas: + pin: 4 + +sensor: + - platform: dallas + address: 0x1C0000031EDD2A28 + name: Dallas Temperature + resolution: 9 + - platform: dallas + index: 1 + name: Dallas Temperature diff --git a/tests/components/dallas/test.esp32-c3-idf.yaml b/tests/components/dallas/test.esp32-c3-idf.yaml index 797597710..dade44d14 100644 --- a/tests/components/dallas/test.esp32-c3-idf.yaml +++ b/tests/components/dallas/test.esp32-c3-idf.yaml @@ -1,11 +1 @@ -dallas: - pin: 4 - -sensor: - - platform: dallas - address: 0x1C0000031EDD2A28 - name: Dallas Temperature - resolution: 9 - - platform: dallas - index: 1 - name: Dallas Temperature +<<: !include common.yaml diff --git a/tests/components/dallas/test.esp32-c3.yaml b/tests/components/dallas/test.esp32-c3.yaml index 797597710..dade44d14 100644 --- a/tests/components/dallas/test.esp32-c3.yaml +++ b/tests/components/dallas/test.esp32-c3.yaml @@ -1,11 +1 @@ -dallas: - pin: 4 - -sensor: - - platform: dallas - address: 0x1C0000031EDD2A28 - name: Dallas Temperature - resolution: 9 - - platform: dallas - index: 1 - name: Dallas Temperature +<<: !include common.yaml diff --git a/tests/components/dallas/test.esp32-idf.yaml b/tests/components/dallas/test.esp32-idf.yaml index 797597710..dade44d14 100644 --- a/tests/components/dallas/test.esp32-idf.yaml +++ b/tests/components/dallas/test.esp32-idf.yaml @@ -1,11 +1 @@ -dallas: - pin: 4 - -sensor: - - platform: dallas - address: 0x1C0000031EDD2A28 - name: Dallas Temperature - resolution: 9 - - platform: dallas - index: 1 - name: Dallas Temperature +<<: !include common.yaml diff --git a/tests/components/dallas/test.esp32.yaml b/tests/components/dallas/test.esp32.yaml index 797597710..dade44d14 100644 --- a/tests/components/dallas/test.esp32.yaml +++ b/tests/components/dallas/test.esp32.yaml @@ -1,11 +1 @@ -dallas: - pin: 4 - -sensor: - - platform: dallas - address: 0x1C0000031EDD2A28 - name: Dallas Temperature - resolution: 9 - - platform: dallas - index: 1 - name: Dallas Temperature +<<: !include common.yaml diff --git a/tests/components/dallas/test.esp8266.yaml b/tests/components/dallas/test.esp8266.yaml index 797597710..dade44d14 100644 --- a/tests/components/dallas/test.esp8266.yaml +++ b/tests/components/dallas/test.esp8266.yaml @@ -1,11 +1 @@ -dallas: - pin: 4 - -sensor: - - platform: dallas - address: 0x1C0000031EDD2A28 - name: Dallas Temperature - resolution: 9 - - platform: dallas - index: 1 - name: Dallas Temperature +<<: !include common.yaml diff --git a/tests/components/dallas/test.rp2040.yaml b/tests/components/dallas/test.rp2040.yaml index 797597710..dade44d14 100644 --- a/tests/components/dallas/test.rp2040.yaml +++ b/tests/components/dallas/test.rp2040.yaml @@ -1,11 +1 @@ -dallas: - pin: 4 - -sensor: - - platform: dallas - address: 0x1C0000031EDD2A28 - name: Dallas Temperature - resolution: 9 - - platform: dallas - index: 1 - name: Dallas Temperature +<<: !include common.yaml diff --git a/tests/components/datetime/common.yaml b/tests/components/datetime/common.yaml new file mode 100644 index 000000000..4e26b6812 --- /dev/null +++ b/tests/components/datetime/common.yaml @@ -0,0 +1,3 @@ +datetime: + +time: diff --git a/tests/components/datetime/test.all.yaml b/tests/components/datetime/test.all.yaml index 4e26b6812..dade44d14 100644 --- a/tests/components/datetime/test.all.yaml +++ b/tests/components/datetime/test.all.yaml @@ -1,3 +1 @@ -datetime: - -time: +<<: !include common.yaml diff --git a/tests/components/debug/common.yaml b/tests/components/debug/common.yaml new file mode 100644 index 000000000..5845beaa8 --- /dev/null +++ b/tests/components/debug/common.yaml @@ -0,0 +1 @@ +debug: diff --git a/tests/components/debug/test.esp32-c3-idf.yaml b/tests/components/debug/test.esp32-c3-idf.yaml index 5845beaa8..dade44d14 100644 --- a/tests/components/debug/test.esp32-c3-idf.yaml +++ b/tests/components/debug/test.esp32-c3-idf.yaml @@ -1 +1 @@ -debug: +<<: !include common.yaml diff --git a/tests/components/debug/test.esp32-c3.yaml b/tests/components/debug/test.esp32-c3.yaml index 5845beaa8..dade44d14 100644 --- a/tests/components/debug/test.esp32-c3.yaml +++ b/tests/components/debug/test.esp32-c3.yaml @@ -1 +1 @@ -debug: +<<: !include common.yaml diff --git a/tests/components/debug/test.esp32-idf.yaml b/tests/components/debug/test.esp32-idf.yaml index 5845beaa8..dade44d14 100644 --- a/tests/components/debug/test.esp32-idf.yaml +++ b/tests/components/debug/test.esp32-idf.yaml @@ -1 +1 @@ -debug: +<<: !include common.yaml diff --git a/tests/components/debug/test.esp32.yaml b/tests/components/debug/test.esp32.yaml index 5845beaa8..dade44d14 100644 --- a/tests/components/debug/test.esp32.yaml +++ b/tests/components/debug/test.esp32.yaml @@ -1 +1 @@ -debug: +<<: !include common.yaml diff --git a/tests/components/debug/test.esp8266.yaml b/tests/components/debug/test.esp8266.yaml index 5845beaa8..dade44d14 100644 --- a/tests/components/debug/test.esp8266.yaml +++ b/tests/components/debug/test.esp8266.yaml @@ -1 +1 @@ -debug: +<<: !include common.yaml diff --git a/tests/components/debug/test.host.yaml b/tests/components/debug/test.host.yaml index 5845beaa8..dade44d14 100644 --- a/tests/components/debug/test.host.yaml +++ b/tests/components/debug/test.host.yaml @@ -1 +1 @@ -debug: +<<: !include common.yaml diff --git a/tests/components/debug/test.rp2040.yaml b/tests/components/debug/test.rp2040.yaml index 5845beaa8..dade44d14 100644 --- a/tests/components/debug/test.rp2040.yaml +++ b/tests/components/debug/test.rp2040.yaml @@ -1 +1 @@ -debug: +<<: !include common.yaml diff --git a/tests/components/dht/common.yaml b/tests/components/dht/common.yaml new file mode 100644 index 000000000..f134a324c --- /dev/null +++ b/tests/components/dht/common.yaml @@ -0,0 +1,11 @@ +sensor: + - platform: dht + pin: 4 + model: AM2302 + update_interval: 15s + temperature: + id: dht_temperature + name: DHT Temperature + humidity: + id: dht_humidity + name: DHT Humidity diff --git a/tests/components/dht/test.esp32-c3-idf.yaml b/tests/components/dht/test.esp32-c3-idf.yaml index f134a324c..dade44d14 100644 --- a/tests/components/dht/test.esp32-c3-idf.yaml +++ b/tests/components/dht/test.esp32-c3-idf.yaml @@ -1,11 +1 @@ -sensor: - - platform: dht - pin: 4 - model: AM2302 - update_interval: 15s - temperature: - id: dht_temperature - name: DHT Temperature - humidity: - id: dht_humidity - name: DHT Humidity +<<: !include common.yaml diff --git a/tests/components/dht/test.esp32-c3.yaml b/tests/components/dht/test.esp32-c3.yaml index f134a324c..dade44d14 100644 --- a/tests/components/dht/test.esp32-c3.yaml +++ b/tests/components/dht/test.esp32-c3.yaml @@ -1,11 +1 @@ -sensor: - - platform: dht - pin: 4 - model: AM2302 - update_interval: 15s - temperature: - id: dht_temperature - name: DHT Temperature - humidity: - id: dht_humidity - name: DHT Humidity +<<: !include common.yaml diff --git a/tests/components/dht/test.esp32-idf.yaml b/tests/components/dht/test.esp32-idf.yaml index f134a324c..dade44d14 100644 --- a/tests/components/dht/test.esp32-idf.yaml +++ b/tests/components/dht/test.esp32-idf.yaml @@ -1,11 +1 @@ -sensor: - - platform: dht - pin: 4 - model: AM2302 - update_interval: 15s - temperature: - id: dht_temperature - name: DHT Temperature - humidity: - id: dht_humidity - name: DHT Humidity +<<: !include common.yaml diff --git a/tests/components/dht/test.esp32.yaml b/tests/components/dht/test.esp32.yaml index f134a324c..dade44d14 100644 --- a/tests/components/dht/test.esp32.yaml +++ b/tests/components/dht/test.esp32.yaml @@ -1,11 +1 @@ -sensor: - - platform: dht - pin: 4 - model: AM2302 - update_interval: 15s - temperature: - id: dht_temperature - name: DHT Temperature - humidity: - id: dht_humidity - name: DHT Humidity +<<: !include common.yaml diff --git a/tests/components/dht/test.esp8266.yaml b/tests/components/dht/test.esp8266.yaml index f134a324c..dade44d14 100644 --- a/tests/components/dht/test.esp8266.yaml +++ b/tests/components/dht/test.esp8266.yaml @@ -1,11 +1 @@ -sensor: - - platform: dht - pin: 4 - model: AM2302 - update_interval: 15s - temperature: - id: dht_temperature - name: DHT Temperature - humidity: - id: dht_humidity - name: DHT Humidity +<<: !include common.yaml diff --git a/tests/components/dht/test.rp2040.yaml b/tests/components/dht/test.rp2040.yaml index f134a324c..dade44d14 100644 --- a/tests/components/dht/test.rp2040.yaml +++ b/tests/components/dht/test.rp2040.yaml @@ -1,11 +1 @@ -sensor: - - platform: dht - pin: 4 - model: AM2302 - update_interval: 15s - temperature: - id: dht_temperature - name: DHT Temperature - humidity: - id: dht_humidity - name: DHT Humidity +<<: !include common.yaml diff --git a/tests/components/display/common.yaml b/tests/components/display/common.yaml new file mode 100644 index 000000000..a22aa7678 --- /dev/null +++ b/tests/components/display/common.yaml @@ -0,0 +1,35 @@ +spi: + - id: spi_main_lcd + clk_pin: 16 + mosi_pin: 17 + miso_pin: 15 + +display: + - platform: ili9xxx + id: main_lcd + model: ili9342 + cs_pin: 12 + dc_pin: 13 + reset_pin: 21 + lambda: |- + // Draw an analog clock in the center of the screen + int centerX = it.get_width() / 2; + int centerY = it.get_height() / 2; + int radius = min(it.get_width(), it.get_height()) / 4; + + // Draw border + it.circle(centerX, centerY, radius); + + // Draw hour ticks + for(int h = 0; h < 12; h++) { + int hourAngle = (h * 30) - 90; + + it.line_at_angle(centerX, centerY, hourAngle, radius - 10, radius); + } + + // Draw minute ticks + for(int m = 0; m < 60; m++) { + int minuteAngle = (m * 6) - 90; + + it.line_at_angle(centerX, centerY, minuteAngle, radius - 5, radius); + } diff --git a/tests/components/display/test.esp32.yaml b/tests/components/display/test.esp32.yaml index a22aa7678..dade44d14 100644 --- a/tests/components/display/test.esp32.yaml +++ b/tests/components/display/test.esp32.yaml @@ -1,35 +1 @@ -spi: - - id: spi_main_lcd - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 - -display: - - platform: ili9xxx - id: main_lcd - model: ili9342 - cs_pin: 12 - dc_pin: 13 - reset_pin: 21 - lambda: |- - // Draw an analog clock in the center of the screen - int centerX = it.get_width() / 2; - int centerY = it.get_height() / 2; - int radius = min(it.get_width(), it.get_height()) / 4; - - // Draw border - it.circle(centerX, centerY, radius); - - // Draw hour ticks - for(int h = 0; h < 12; h++) { - int hourAngle = (h * 30) - 90; - - it.line_at_angle(centerX, centerY, hourAngle, radius - 10, radius); - } - - // Draw minute ticks - for(int m = 0; m < 60; m++) { - int minuteAngle = (m * 6) - 90; - - it.line_at_angle(centerX, centerY, minuteAngle, radius - 5, radius); - } +<<: !include common.yaml diff --git a/tests/components/duty_cycle/common.yaml b/tests/components/duty_cycle/common.yaml new file mode 100644 index 000000000..2b7f31efb --- /dev/null +++ b/tests/components/duty_cycle/common.yaml @@ -0,0 +1,4 @@ +sensor: + - platform: duty_cycle + pin: 4 + name: Duty Cycle Sensor diff --git a/tests/components/duty_cycle/test.esp32-c3-idf.yaml b/tests/components/duty_cycle/test.esp32-c3-idf.yaml index 2b7f31efb..dade44d14 100644 --- a/tests/components/duty_cycle/test.esp32-c3-idf.yaml +++ b/tests/components/duty_cycle/test.esp32-c3-idf.yaml @@ -1,4 +1 @@ -sensor: - - platform: duty_cycle - pin: 4 - name: Duty Cycle Sensor +<<: !include common.yaml diff --git a/tests/components/duty_cycle/test.esp32-c3.yaml b/tests/components/duty_cycle/test.esp32-c3.yaml index 2b7f31efb..dade44d14 100644 --- a/tests/components/duty_cycle/test.esp32-c3.yaml +++ b/tests/components/duty_cycle/test.esp32-c3.yaml @@ -1,4 +1 @@ -sensor: - - platform: duty_cycle - pin: 4 - name: Duty Cycle Sensor +<<: !include common.yaml diff --git a/tests/components/duty_cycle/test.esp32-idf.yaml b/tests/components/duty_cycle/test.esp32-idf.yaml index 2b7f31efb..dade44d14 100644 --- a/tests/components/duty_cycle/test.esp32-idf.yaml +++ b/tests/components/duty_cycle/test.esp32-idf.yaml @@ -1,4 +1 @@ -sensor: - - platform: duty_cycle - pin: 4 - name: Duty Cycle Sensor +<<: !include common.yaml diff --git a/tests/components/duty_cycle/test.esp32.yaml b/tests/components/duty_cycle/test.esp32.yaml index 2b7f31efb..dade44d14 100644 --- a/tests/components/duty_cycle/test.esp32.yaml +++ b/tests/components/duty_cycle/test.esp32.yaml @@ -1,4 +1 @@ -sensor: - - platform: duty_cycle - pin: 4 - name: Duty Cycle Sensor +<<: !include common.yaml diff --git a/tests/components/duty_cycle/test.esp8266.yaml b/tests/components/duty_cycle/test.esp8266.yaml index 2b7f31efb..dade44d14 100644 --- a/tests/components/duty_cycle/test.esp8266.yaml +++ b/tests/components/duty_cycle/test.esp8266.yaml @@ -1,4 +1 @@ -sensor: - - platform: duty_cycle - pin: 4 - name: Duty Cycle Sensor +<<: !include common.yaml diff --git a/tests/components/duty_cycle/test.rp2040.yaml b/tests/components/duty_cycle/test.rp2040.yaml index 2b7f31efb..dade44d14 100644 --- a/tests/components/duty_cycle/test.rp2040.yaml +++ b/tests/components/duty_cycle/test.rp2040.yaml @@ -1,4 +1 @@ -sensor: - - platform: duty_cycle - pin: 4 - name: Duty Cycle Sensor +<<: !include common.yaml diff --git a/tests/components/duty_time/common.yaml b/tests/components/duty_time/common.yaml new file mode 100644 index 000000000..28fa4afd1 --- /dev/null +++ b/tests/components/duty_time/common.yaml @@ -0,0 +1,14 @@ +binary_sensor: + - platform: template + id: bin1 + lambda: |- + if (millis() > 10000) { + return true; + } else { + return false; + } + +sensor: + - platform: duty_time + name: Duty Time + sensor: bin1 diff --git a/tests/components/duty_time/test.esp32-c3-idf.yaml b/tests/components/duty_time/test.esp32-c3-idf.yaml index 28fa4afd1..dade44d14 100644 --- a/tests/components/duty_time/test.esp32-c3-idf.yaml +++ b/tests/components/duty_time/test.esp32-c3-idf.yaml @@ -1,14 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -sensor: - - platform: duty_time - name: Duty Time - sensor: bin1 +<<: !include common.yaml diff --git a/tests/components/duty_time/test.esp32-c3.yaml b/tests/components/duty_time/test.esp32-c3.yaml index 28fa4afd1..dade44d14 100644 --- a/tests/components/duty_time/test.esp32-c3.yaml +++ b/tests/components/duty_time/test.esp32-c3.yaml @@ -1,14 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -sensor: - - platform: duty_time - name: Duty Time - sensor: bin1 +<<: !include common.yaml diff --git a/tests/components/duty_time/test.esp32-idf.yaml b/tests/components/duty_time/test.esp32-idf.yaml index 28fa4afd1..dade44d14 100644 --- a/tests/components/duty_time/test.esp32-idf.yaml +++ b/tests/components/duty_time/test.esp32-idf.yaml @@ -1,14 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -sensor: - - platform: duty_time - name: Duty Time - sensor: bin1 +<<: !include common.yaml diff --git a/tests/components/duty_time/test.esp32.yaml b/tests/components/duty_time/test.esp32.yaml index 28fa4afd1..dade44d14 100644 --- a/tests/components/duty_time/test.esp32.yaml +++ b/tests/components/duty_time/test.esp32.yaml @@ -1,14 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -sensor: - - platform: duty_time - name: Duty Time - sensor: bin1 +<<: !include common.yaml diff --git a/tests/components/duty_time/test.esp8266.yaml b/tests/components/duty_time/test.esp8266.yaml index 28fa4afd1..dade44d14 100644 --- a/tests/components/duty_time/test.esp8266.yaml +++ b/tests/components/duty_time/test.esp8266.yaml @@ -1,14 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -sensor: - - platform: duty_time - name: Duty Time - sensor: bin1 +<<: !include common.yaml diff --git a/tests/components/duty_time/test.rp2040.yaml b/tests/components/duty_time/test.rp2040.yaml index 28fa4afd1..dade44d14 100644 --- a/tests/components/duty_time/test.rp2040.yaml +++ b/tests/components/duty_time/test.rp2040.yaml @@ -1,14 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -sensor: - - platform: duty_time - name: Duty Time - sensor: bin1 +<<: !include common.yaml diff --git a/tests/components/endstop/common.yaml b/tests/components/endstop/common.yaml new file mode 100644 index 000000000..341fbf726 --- /dev/null +++ b/tests/components/endstop/common.yaml @@ -0,0 +1,33 @@ +binary_sensor: + - platform: template + id: bin1 + lambda: |- + if (millis() > 10000) { + return true; + } else { + return false; + } + +switch: + - platform: template + id: template_switch1 + optimistic: true + - platform: template + id: template_switch2 + optimistic: true + +cover: + - platform: endstop + id: endstop_cover + name: Endstop Cover + stop_action: + - switch.turn_on: template_switch1 + open_endstop: bin1 + open_action: + - switch.turn_on: template_switch1 + open_duration: 5min + close_endstop: bin1 + close_action: + - switch.turn_on: template_switch2 + close_duration: 4.5min + max_duration: 10min diff --git a/tests/components/endstop/test.esp32-c3-idf.yaml b/tests/components/endstop/test.esp32-c3-idf.yaml index 341fbf726..dade44d14 100644 --- a/tests/components/endstop/test.esp32-c3-idf.yaml +++ b/tests/components/endstop/test.esp32-c3-idf.yaml @@ -1,33 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -cover: - - platform: endstop - id: endstop_cover - name: Endstop Cover - stop_action: - - switch.turn_on: template_switch1 - open_endstop: bin1 - open_action: - - switch.turn_on: template_switch1 - open_duration: 5min - close_endstop: bin1 - close_action: - - switch.turn_on: template_switch2 - close_duration: 4.5min - max_duration: 10min +<<: !include common.yaml diff --git a/tests/components/endstop/test.esp32-c3.yaml b/tests/components/endstop/test.esp32-c3.yaml index 341fbf726..dade44d14 100644 --- a/tests/components/endstop/test.esp32-c3.yaml +++ b/tests/components/endstop/test.esp32-c3.yaml @@ -1,33 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -cover: - - platform: endstop - id: endstop_cover - name: Endstop Cover - stop_action: - - switch.turn_on: template_switch1 - open_endstop: bin1 - open_action: - - switch.turn_on: template_switch1 - open_duration: 5min - close_endstop: bin1 - close_action: - - switch.turn_on: template_switch2 - close_duration: 4.5min - max_duration: 10min +<<: !include common.yaml diff --git a/tests/components/endstop/test.esp32-idf.yaml b/tests/components/endstop/test.esp32-idf.yaml index 341fbf726..dade44d14 100644 --- a/tests/components/endstop/test.esp32-idf.yaml +++ b/tests/components/endstop/test.esp32-idf.yaml @@ -1,33 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -cover: - - platform: endstop - id: endstop_cover - name: Endstop Cover - stop_action: - - switch.turn_on: template_switch1 - open_endstop: bin1 - open_action: - - switch.turn_on: template_switch1 - open_duration: 5min - close_endstop: bin1 - close_action: - - switch.turn_on: template_switch2 - close_duration: 4.5min - max_duration: 10min +<<: !include common.yaml diff --git a/tests/components/endstop/test.esp32.yaml b/tests/components/endstop/test.esp32.yaml index 341fbf726..dade44d14 100644 --- a/tests/components/endstop/test.esp32.yaml +++ b/tests/components/endstop/test.esp32.yaml @@ -1,33 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -cover: - - platform: endstop - id: endstop_cover - name: Endstop Cover - stop_action: - - switch.turn_on: template_switch1 - open_endstop: bin1 - open_action: - - switch.turn_on: template_switch1 - open_duration: 5min - close_endstop: bin1 - close_action: - - switch.turn_on: template_switch2 - close_duration: 4.5min - max_duration: 10min +<<: !include common.yaml diff --git a/tests/components/endstop/test.esp8266.yaml b/tests/components/endstop/test.esp8266.yaml index 341fbf726..dade44d14 100644 --- a/tests/components/endstop/test.esp8266.yaml +++ b/tests/components/endstop/test.esp8266.yaml @@ -1,33 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -cover: - - platform: endstop - id: endstop_cover - name: Endstop Cover - stop_action: - - switch.turn_on: template_switch1 - open_endstop: bin1 - open_action: - - switch.turn_on: template_switch1 - open_duration: 5min - close_endstop: bin1 - close_action: - - switch.turn_on: template_switch2 - close_duration: 4.5min - max_duration: 10min +<<: !include common.yaml diff --git a/tests/components/endstop/test.rp2040.yaml b/tests/components/endstop/test.rp2040.yaml index 341fbf726..dade44d14 100644 --- a/tests/components/endstop/test.rp2040.yaml +++ b/tests/components/endstop/test.rp2040.yaml @@ -1,33 +1 @@ -binary_sensor: - - platform: template - id: bin1 - lambda: |- - if (millis() > 10000) { - return true; - } else { - return false; - } - -switch: - - platform: template - id: template_switch1 - optimistic: true - - platform: template - id: template_switch2 - optimistic: true - -cover: - - platform: endstop - id: endstop_cover - name: Endstop Cover - stop_action: - - switch.turn_on: template_switch1 - open_endstop: bin1 - open_action: - - switch.turn_on: template_switch1 - open_duration: 5min - close_endstop: bin1 - close_action: - - switch.turn_on: template_switch2 - close_duration: 4.5min - max_duration: 10min +<<: !include common.yaml diff --git a/tests/components/esp32_ble/common.yaml b/tests/components/esp32_ble/common.yaml new file mode 100644 index 000000000..76b35fc8f --- /dev/null +++ b/tests/components/esp32_ble/common.yaml @@ -0,0 +1,2 @@ +esp32_ble: + io_capability: keyboard_only diff --git a/tests/components/esp32_ble/test.esp32-c3-idf.yaml b/tests/components/esp32_ble/test.esp32-c3-idf.yaml index 76b35fc8f..dade44d14 100644 --- a/tests/components/esp32_ble/test.esp32-c3-idf.yaml +++ b/tests/components/esp32_ble/test.esp32-c3-idf.yaml @@ -1,2 +1 @@ -esp32_ble: - io_capability: keyboard_only +<<: !include common.yaml diff --git a/tests/components/esp32_ble/test.esp32-c3.yaml b/tests/components/esp32_ble/test.esp32-c3.yaml index 76b35fc8f..dade44d14 100644 --- a/tests/components/esp32_ble/test.esp32-c3.yaml +++ b/tests/components/esp32_ble/test.esp32-c3.yaml @@ -1,2 +1 @@ -esp32_ble: - io_capability: keyboard_only +<<: !include common.yaml diff --git a/tests/components/esp32_ble/test.esp32-idf.yaml b/tests/components/esp32_ble/test.esp32-idf.yaml index 76b35fc8f..dade44d14 100644 --- a/tests/components/esp32_ble/test.esp32-idf.yaml +++ b/tests/components/esp32_ble/test.esp32-idf.yaml @@ -1,2 +1 @@ -esp32_ble: - io_capability: keyboard_only +<<: !include common.yaml diff --git a/tests/components/esp32_ble/test.esp32.yaml b/tests/components/esp32_ble/test.esp32.yaml index 76b35fc8f..dade44d14 100644 --- a/tests/components/esp32_ble/test.esp32.yaml +++ b/tests/components/esp32_ble/test.esp32.yaml @@ -1,2 +1 @@ -esp32_ble: - io_capability: keyboard_only +<<: !include common.yaml diff --git a/tests/components/esp32_ble_beacon/common.yaml b/tests/components/esp32_ble_beacon/common.yaml new file mode 100644 index 000000000..aafb0341d --- /dev/null +++ b/tests/components/esp32_ble_beacon/common.yaml @@ -0,0 +1,3 @@ +esp32_ble_beacon: + type: iBeacon + uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98' diff --git a/tests/components/esp32_ble_beacon/test.esp32-c3-idf.yaml b/tests/components/esp32_ble_beacon/test.esp32-c3-idf.yaml index aafb0341d..dade44d14 100644 --- a/tests/components/esp32_ble_beacon/test.esp32-c3-idf.yaml +++ b/tests/components/esp32_ble_beacon/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -esp32_ble_beacon: - type: iBeacon - uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98' +<<: !include common.yaml diff --git a/tests/components/esp32_ble_beacon/test.esp32-c3.yaml b/tests/components/esp32_ble_beacon/test.esp32-c3.yaml index aafb0341d..dade44d14 100644 --- a/tests/components/esp32_ble_beacon/test.esp32-c3.yaml +++ b/tests/components/esp32_ble_beacon/test.esp32-c3.yaml @@ -1,3 +1 @@ -esp32_ble_beacon: - type: iBeacon - uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98' +<<: !include common.yaml diff --git a/tests/components/esp32_ble_beacon/test.esp32-idf.yaml b/tests/components/esp32_ble_beacon/test.esp32-idf.yaml index aafb0341d..dade44d14 100644 --- a/tests/components/esp32_ble_beacon/test.esp32-idf.yaml +++ b/tests/components/esp32_ble_beacon/test.esp32-idf.yaml @@ -1,3 +1 @@ -esp32_ble_beacon: - type: iBeacon - uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98' +<<: !include common.yaml diff --git a/tests/components/esp32_ble_beacon/test.esp32.yaml b/tests/components/esp32_ble_beacon/test.esp32.yaml index aafb0341d..dade44d14 100644 --- a/tests/components/esp32_ble_beacon/test.esp32.yaml +++ b/tests/components/esp32_ble_beacon/test.esp32.yaml @@ -1,3 +1 @@ -esp32_ble_beacon: - type: iBeacon - uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98' +<<: !include common.yaml diff --git a/tests/components/esp32_ble_client/common.yaml b/tests/components/esp32_ble_client/common.yaml new file mode 100644 index 000000000..33b7205bf --- /dev/null +++ b/tests/components/esp32_ble_client/common.yaml @@ -0,0 +1,5 @@ +esp32_ble_tracker: + +ble_client: + - mac_address: 01:02:03:04:05:06 + id: blec diff --git a/tests/components/esp32_ble_client/test.esp32-c3-idf.yaml b/tests/components/esp32_ble_client/test.esp32-c3-idf.yaml index 33b7205bf..dade44d14 100644 --- a/tests/components/esp32_ble_client/test.esp32-c3-idf.yaml +++ b/tests/components/esp32_ble_client/test.esp32-c3-idf.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: blec +<<: !include common.yaml diff --git a/tests/components/esp32_ble_client/test.esp32-c3.yaml b/tests/components/esp32_ble_client/test.esp32-c3.yaml index 33b7205bf..dade44d14 100644 --- a/tests/components/esp32_ble_client/test.esp32-c3.yaml +++ b/tests/components/esp32_ble_client/test.esp32-c3.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: blec +<<: !include common.yaml diff --git a/tests/components/esp32_ble_client/test.esp32-idf.yaml b/tests/components/esp32_ble_client/test.esp32-idf.yaml index 33b7205bf..dade44d14 100644 --- a/tests/components/esp32_ble_client/test.esp32-idf.yaml +++ b/tests/components/esp32_ble_client/test.esp32-idf.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: blec +<<: !include common.yaml diff --git a/tests/components/esp32_ble_client/test.esp32.yaml b/tests/components/esp32_ble_client/test.esp32.yaml index 33b7205bf..dade44d14 100644 --- a/tests/components/esp32_ble_client/test.esp32.yaml +++ b/tests/components/esp32_ble_client/test.esp32.yaml @@ -1,5 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: blec +<<: !include common.yaml diff --git a/tests/components/esp32_ble_server/common.yaml b/tests/components/esp32_ble_server/common.yaml new file mode 100644 index 000000000..29a5407f8 --- /dev/null +++ b/tests/components/esp32_ble_server/common.yaml @@ -0,0 +1,3 @@ +esp32_ble_server: + id: ble + manufacturer_data: [0x72, 0x4, 0x00, 0x23] diff --git a/tests/components/esp32_ble_server/test.esp32-c3-idf.yaml b/tests/components/esp32_ble_server/test.esp32-c3-idf.yaml index 29a5407f8..dade44d14 100644 --- a/tests/components/esp32_ble_server/test.esp32-c3-idf.yaml +++ b/tests/components/esp32_ble_server/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -esp32_ble_server: - id: ble - manufacturer_data: [0x72, 0x4, 0x00, 0x23] +<<: !include common.yaml diff --git a/tests/components/esp32_ble_server/test.esp32-c3.yaml b/tests/components/esp32_ble_server/test.esp32-c3.yaml index 29a5407f8..dade44d14 100644 --- a/tests/components/esp32_ble_server/test.esp32-c3.yaml +++ b/tests/components/esp32_ble_server/test.esp32-c3.yaml @@ -1,3 +1 @@ -esp32_ble_server: - id: ble - manufacturer_data: [0x72, 0x4, 0x00, 0x23] +<<: !include common.yaml diff --git a/tests/components/esp32_ble_server/test.esp32-idf.yaml b/tests/components/esp32_ble_server/test.esp32-idf.yaml index 29a5407f8..dade44d14 100644 --- a/tests/components/esp32_ble_server/test.esp32-idf.yaml +++ b/tests/components/esp32_ble_server/test.esp32-idf.yaml @@ -1,3 +1 @@ -esp32_ble_server: - id: ble - manufacturer_data: [0x72, 0x4, 0x00, 0x23] +<<: !include common.yaml diff --git a/tests/components/esp32_ble_server/test.esp32.yaml b/tests/components/esp32_ble_server/test.esp32.yaml index 29a5407f8..dade44d14 100644 --- a/tests/components/esp32_ble_server/test.esp32.yaml +++ b/tests/components/esp32_ble_server/test.esp32.yaml @@ -1,3 +1 @@ -esp32_ble_server: - id: ble - manufacturer_data: [0x72, 0x4, 0x00, 0x23] +<<: !include common.yaml diff --git a/tests/components/esp32_ble_tracker/common.yaml b/tests/components/esp32_ble_tracker/common.yaml new file mode 100644 index 000000000..ef23635c9 --- /dev/null +++ b/tests/components/esp32_ble_tracker/common.yaml @@ -0,0 +1,41 @@ +esphome: + on_boot: + then: + - esp32_ble_tracker.start_scan + - esp32_ble_tracker.stop_scan + +esp32_ble_tracker: + on_ble_advertise: + - mac_address: + - AA:BB:CC:DD:EE:FF + - FF:EE:DD:CC:BB:AA + then: + # yamllint disable rule:line-length + - lambda: !lambda |- + ESP_LOGD("main", "The device address (%s) exists in list", x.address_str().c_str()); + # yamllint enable rule:line-length + - mac_address: AC:37:43:77:5F:4C + then: + # yamllint disable rule:line-length + - lambda: !lambda |- + ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); + # yamllint enable rule:line-length + - then: + # yamllint disable rule:line-length + - lambda: !lambda |- + ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); + # yamllint enable rule:line-length + on_ble_service_data_advertise: + - service_uuid: ABCD + then: + - lambda: !lambda |- + ESP_LOGD("main", "Length of service data is %i", x.size()); + on_ble_manufacturer_data_advertise: + - manufacturer_id: ABCD + then: + - lambda: !lambda |- + ESP_LOGD("main", "Length of manufacturer data is %i", x.size()); + on_scan_end: + - then: + - lambda: |- + ESP_LOGD("ble_auto", "The scan has ended!"); diff --git a/tests/components/esp32_ble_tracker/test.esp32-c3-idf.yaml b/tests/components/esp32_ble_tracker/test.esp32-c3-idf.yaml index ef23635c9..dade44d14 100644 --- a/tests/components/esp32_ble_tracker/test.esp32-c3-idf.yaml +++ b/tests/components/esp32_ble_tracker/test.esp32-c3-idf.yaml @@ -1,41 +1 @@ -esphome: - on_boot: - then: - - esp32_ble_tracker.start_scan - - esp32_ble_tracker.stop_scan - -esp32_ble_tracker: - on_ble_advertise: - - mac_address: - - AA:BB:CC:DD:EE:FF - - FF:EE:DD:CC:BB:AA - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address (%s) exists in list", x.address_str().c_str()); - # yamllint enable rule:line-length - - mac_address: AC:37:43:77:5F:4C - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); - # yamllint enable rule:line-length - - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); - # yamllint enable rule:line-length - on_ble_service_data_advertise: - - service_uuid: ABCD - then: - - lambda: !lambda |- - ESP_LOGD("main", "Length of service data is %i", x.size()); - on_ble_manufacturer_data_advertise: - - manufacturer_id: ABCD - then: - - lambda: !lambda |- - ESP_LOGD("main", "Length of manufacturer data is %i", x.size()); - on_scan_end: - - then: - - lambda: |- - ESP_LOGD("ble_auto", "The scan has ended!"); +<<: !include common.yaml diff --git a/tests/components/esp32_ble_tracker/test.esp32-c3.yaml b/tests/components/esp32_ble_tracker/test.esp32-c3.yaml index ef23635c9..dade44d14 100644 --- a/tests/components/esp32_ble_tracker/test.esp32-c3.yaml +++ b/tests/components/esp32_ble_tracker/test.esp32-c3.yaml @@ -1,41 +1 @@ -esphome: - on_boot: - then: - - esp32_ble_tracker.start_scan - - esp32_ble_tracker.stop_scan - -esp32_ble_tracker: - on_ble_advertise: - - mac_address: - - AA:BB:CC:DD:EE:FF - - FF:EE:DD:CC:BB:AA - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address (%s) exists in list", x.address_str().c_str()); - # yamllint enable rule:line-length - - mac_address: AC:37:43:77:5F:4C - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); - # yamllint enable rule:line-length - - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); - # yamllint enable rule:line-length - on_ble_service_data_advertise: - - service_uuid: ABCD - then: - - lambda: !lambda |- - ESP_LOGD("main", "Length of service data is %i", x.size()); - on_ble_manufacturer_data_advertise: - - manufacturer_id: ABCD - then: - - lambda: !lambda |- - ESP_LOGD("main", "Length of manufacturer data is %i", x.size()); - on_scan_end: - - then: - - lambda: |- - ESP_LOGD("ble_auto", "The scan has ended!"); +<<: !include common.yaml diff --git a/tests/components/esp32_ble_tracker/test.esp32-idf.yaml b/tests/components/esp32_ble_tracker/test.esp32-idf.yaml index ef23635c9..dade44d14 100644 --- a/tests/components/esp32_ble_tracker/test.esp32-idf.yaml +++ b/tests/components/esp32_ble_tracker/test.esp32-idf.yaml @@ -1,41 +1 @@ -esphome: - on_boot: - then: - - esp32_ble_tracker.start_scan - - esp32_ble_tracker.stop_scan - -esp32_ble_tracker: - on_ble_advertise: - - mac_address: - - AA:BB:CC:DD:EE:FF - - FF:EE:DD:CC:BB:AA - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address (%s) exists in list", x.address_str().c_str()); - # yamllint enable rule:line-length - - mac_address: AC:37:43:77:5F:4C - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); - # yamllint enable rule:line-length - - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); - # yamllint enable rule:line-length - on_ble_service_data_advertise: - - service_uuid: ABCD - then: - - lambda: !lambda |- - ESP_LOGD("main", "Length of service data is %i", x.size()); - on_ble_manufacturer_data_advertise: - - manufacturer_id: ABCD - then: - - lambda: !lambda |- - ESP_LOGD("main", "Length of manufacturer data is %i", x.size()); - on_scan_end: - - then: - - lambda: |- - ESP_LOGD("ble_auto", "The scan has ended!"); +<<: !include common.yaml diff --git a/tests/components/esp32_ble_tracker/test.esp32.yaml b/tests/components/esp32_ble_tracker/test.esp32.yaml index ef23635c9..dade44d14 100644 --- a/tests/components/esp32_ble_tracker/test.esp32.yaml +++ b/tests/components/esp32_ble_tracker/test.esp32.yaml @@ -1,41 +1 @@ -esphome: - on_boot: - then: - - esp32_ble_tracker.start_scan - - esp32_ble_tracker.stop_scan - -esp32_ble_tracker: - on_ble_advertise: - - mac_address: - - AA:BB:CC:DD:EE:FF - - FF:EE:DD:CC:BB:AA - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address (%s) exists in list", x.address_str().c_str()); - # yamllint enable rule:line-length - - mac_address: AC:37:43:77:5F:4C - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); - # yamllint enable rule:line-length - - then: - # yamllint disable rule:line-length - - lambda: !lambda |- - ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); - # yamllint enable rule:line-length - on_ble_service_data_advertise: - - service_uuid: ABCD - then: - - lambda: !lambda |- - ESP_LOGD("main", "Length of service data is %i", x.size()); - on_ble_manufacturer_data_advertise: - - manufacturer_id: ABCD - then: - - lambda: !lambda |- - ESP_LOGD("main", "Length of manufacturer data is %i", x.size()); - on_scan_end: - - then: - - lambda: |- - ESP_LOGD("ble_auto", "The scan has ended!"); +<<: !include common.yaml diff --git a/tests/components/esp32_camera/common.yaml b/tests/components/esp32_camera/common.yaml new file mode 100644 index 000000000..2f5f792f1 --- /dev/null +++ b/tests/components/esp32_camera/common.yaml @@ -0,0 +1,28 @@ +esp32_camera: + name: ESP32 Camera + data_pins: + - number: 17 + - number: 35 + - number: 34 + - number: 5 + - number: 39 + - number: 18 + - number: 36 + - number: 19 + vsync_pin: 22 + href_pin: 26 + pixel_clock_pin: 21 + external_clock: + pin: 27 + frequency: 20MHz + i2c_pins: + sda: 25 + scl: 23 + reset_pin: 15 + power_down_pin: 1 + resolution: 640x480 + jpeg_quality: 10 + on_image: + then: + - lambda: |- + ESP_LOGD("main", "image len=%d, data=%c", image.length, image.data[0]); diff --git a/tests/components/esp32_camera/test.esp32-idf.yaml b/tests/components/esp32_camera/test.esp32-idf.yaml index 2f5f792f1..dade44d14 100644 --- a/tests/components/esp32_camera/test.esp32-idf.yaml +++ b/tests/components/esp32_camera/test.esp32-idf.yaml @@ -1,28 +1 @@ -esp32_camera: - name: ESP32 Camera - data_pins: - - number: 17 - - number: 35 - - number: 34 - - number: 5 - - number: 39 - - number: 18 - - number: 36 - - number: 19 - vsync_pin: 22 - href_pin: 26 - pixel_clock_pin: 21 - external_clock: - pin: 27 - frequency: 20MHz - i2c_pins: - sda: 25 - scl: 23 - reset_pin: 15 - power_down_pin: 1 - resolution: 640x480 - jpeg_quality: 10 - on_image: - then: - - lambda: |- - ESP_LOGD("main", "image len=%d, data=%c", image.length, image.data[0]); +<<: !include common.yaml diff --git a/tests/components/esp32_camera/test.esp32.yaml b/tests/components/esp32_camera/test.esp32.yaml index 2f5f792f1..dade44d14 100644 --- a/tests/components/esp32_camera/test.esp32.yaml +++ b/tests/components/esp32_camera/test.esp32.yaml @@ -1,28 +1 @@ -esp32_camera: - name: ESP32 Camera - data_pins: - - number: 17 - - number: 35 - - number: 34 - - number: 5 - - number: 39 - - number: 18 - - number: 36 - - number: 19 - vsync_pin: 22 - href_pin: 26 - pixel_clock_pin: 21 - external_clock: - pin: 27 - frequency: 20MHz - i2c_pins: - sda: 25 - scl: 23 - reset_pin: 15 - power_down_pin: 1 - resolution: 640x480 - jpeg_quality: 10 - on_image: - then: - - lambda: |- - ESP_LOGD("main", "image len=%d, data=%c", image.length, image.data[0]); +<<: !include common.yaml diff --git a/tests/components/esp32_camera_web_server/common.yaml b/tests/components/esp32_camera_web_server/common.yaml new file mode 100644 index 000000000..5edefdf0a --- /dev/null +++ b/tests/components/esp32_camera_web_server/common.yaml @@ -0,0 +1,34 @@ +esp32_camera: + name: ESP32 Camera + data_pins: + - number: 17 + - number: 35 + - number: 34 + - number: 5 + - number: 39 + - number: 18 + - number: 36 + - number: 19 + vsync_pin: 22 + href_pin: 26 + pixel_clock_pin: 21 + external_clock: + pin: 27 + frequency: 20MHz + i2c_pins: + sda: 25 + scl: 23 + reset_pin: 15 + power_down_pin: 1 + resolution: 640x480 + jpeg_quality: 10 + on_image: + then: + - lambda: |- + ESP_LOGD("main", "image len=%d, data=%c", image.length, image.data[0]); + +esp32_camera_web_server: + - port: 8080 + mode: stream + - port: 8081 + mode: snapshot diff --git a/tests/components/esp32_camera_web_server/test.esp32-idf.yaml b/tests/components/esp32_camera_web_server/test.esp32-idf.yaml index 5edefdf0a..dade44d14 100644 --- a/tests/components/esp32_camera_web_server/test.esp32-idf.yaml +++ b/tests/components/esp32_camera_web_server/test.esp32-idf.yaml @@ -1,34 +1 @@ -esp32_camera: - name: ESP32 Camera - data_pins: - - number: 17 - - number: 35 - - number: 34 - - number: 5 - - number: 39 - - number: 18 - - number: 36 - - number: 19 - vsync_pin: 22 - href_pin: 26 - pixel_clock_pin: 21 - external_clock: - pin: 27 - frequency: 20MHz - i2c_pins: - sda: 25 - scl: 23 - reset_pin: 15 - power_down_pin: 1 - resolution: 640x480 - jpeg_quality: 10 - on_image: - then: - - lambda: |- - ESP_LOGD("main", "image len=%d, data=%c", image.length, image.data[0]); - -esp32_camera_web_server: - - port: 8080 - mode: stream - - port: 8081 - mode: snapshot +<<: !include common.yaml diff --git a/tests/components/esp32_camera_web_server/test.esp32.yaml b/tests/components/esp32_camera_web_server/test.esp32.yaml index 5edefdf0a..dade44d14 100644 --- a/tests/components/esp32_camera_web_server/test.esp32.yaml +++ b/tests/components/esp32_camera_web_server/test.esp32.yaml @@ -1,34 +1 @@ -esp32_camera: - name: ESP32 Camera - data_pins: - - number: 17 - - number: 35 - - number: 34 - - number: 5 - - number: 39 - - number: 18 - - number: 36 - - number: 19 - vsync_pin: 22 - href_pin: 26 - pixel_clock_pin: 21 - external_clock: - pin: 27 - frequency: 20MHz - i2c_pins: - sda: 25 - scl: 23 - reset_pin: 15 - power_down_pin: 1 - resolution: 640x480 - jpeg_quality: 10 - on_image: - then: - - lambda: |- - ESP_LOGD("main", "image len=%d, data=%c", image.length, image.data[0]); - -esp32_camera_web_server: - - port: 8080 - mode: stream - - port: 8081 - mode: snapshot +<<: !include common.yaml diff --git a/tests/components/esp32_dac/common.yaml b/tests/components/esp32_dac/common.yaml new file mode 100644 index 000000000..225627f5a --- /dev/null +++ b/tests/components/esp32_dac/common.yaml @@ -0,0 +1,4 @@ +output: + - platform: esp32_dac + id: dac_output + pin: 25 diff --git a/tests/components/esp32_dac/test.esp32-idf.yaml b/tests/components/esp32_dac/test.esp32-idf.yaml index 225627f5a..dade44d14 100644 --- a/tests/components/esp32_dac/test.esp32-idf.yaml +++ b/tests/components/esp32_dac/test.esp32-idf.yaml @@ -1,4 +1 @@ -output: - - platform: esp32_dac - id: dac_output - pin: 25 +<<: !include common.yaml diff --git a/tests/components/esp32_dac/test.esp32.yaml b/tests/components/esp32_dac/test.esp32.yaml index 225627f5a..dade44d14 100644 --- a/tests/components/esp32_dac/test.esp32.yaml +++ b/tests/components/esp32_dac/test.esp32.yaml @@ -1,4 +1 @@ -output: - - platform: esp32_dac - id: dac_output - pin: 25 +<<: !include common.yaml diff --git a/tests/components/esp32_hall/common.yaml b/tests/components/esp32_hall/common.yaml new file mode 100644 index 000000000..f8429f5aa --- /dev/null +++ b/tests/components/esp32_hall/common.yaml @@ -0,0 +1,3 @@ +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 index f8429f5aa..dade44d14 100644 --- a/tests/components/esp32_hall/test.esp32-idf.yaml +++ b/tests/components/esp32_hall/test.esp32-idf.yaml @@ -1,3 +1 @@ -sensor: - - platform: esp32_hall - name: ESP32 Hall Sensor +<<: !include common.yaml diff --git a/tests/components/esp32_hall/test.esp32.yaml b/tests/components/esp32_hall/test.esp32.yaml index f8429f5aa..dade44d14 100644 --- a/tests/components/esp32_hall/test.esp32.yaml +++ b/tests/components/esp32_hall/test.esp32.yaml @@ -1,3 +1 @@ -sensor: - - platform: esp32_hall - name: ESP32 Hall Sensor +<<: !include common.yaml diff --git a/tests/components/esp32_improv/common.yaml b/tests/components/esp32_improv/common.yaml new file mode 100644 index 000000000..7eb3f9c0b --- /dev/null +++ b/tests/components/esp32_improv/common.yaml @@ -0,0 +1,18 @@ +wifi: + ssid: MySSID + password: password1 + +binary_sensor: + - platform: gpio + pin: 0 + id: io0_button + +output: + - platform: gpio + pin: 2 + id: built_in_led + +esp32_improv: + authorizer: io0_button + authorized_duration: 1min + status_indicator: built_in_led diff --git a/tests/components/esp32_improv/test.esp32-c3-idf.yaml b/tests/components/esp32_improv/test.esp32-c3-idf.yaml index 7eb3f9c0b..dade44d14 100644 --- a/tests/components/esp32_improv/test.esp32-c3-idf.yaml +++ b/tests/components/esp32_improv/test.esp32-c3-idf.yaml @@ -1,18 +1 @@ -wifi: - ssid: MySSID - password: password1 - -binary_sensor: - - platform: gpio - pin: 0 - id: io0_button - -output: - - platform: gpio - pin: 2 - id: built_in_led - -esp32_improv: - authorizer: io0_button - authorized_duration: 1min - status_indicator: built_in_led +<<: !include common.yaml diff --git a/tests/components/esp32_improv/test.esp32-c3.yaml b/tests/components/esp32_improv/test.esp32-c3.yaml index 7eb3f9c0b..dade44d14 100644 --- a/tests/components/esp32_improv/test.esp32-c3.yaml +++ b/tests/components/esp32_improv/test.esp32-c3.yaml @@ -1,18 +1 @@ -wifi: - ssid: MySSID - password: password1 - -binary_sensor: - - platform: gpio - pin: 0 - id: io0_button - -output: - - platform: gpio - pin: 2 - id: built_in_led - -esp32_improv: - authorizer: io0_button - authorized_duration: 1min - status_indicator: built_in_led +<<: !include common.yaml diff --git a/tests/components/esp32_improv/test.esp32-idf.yaml b/tests/components/esp32_improv/test.esp32-idf.yaml index 7eb3f9c0b..dade44d14 100644 --- a/tests/components/esp32_improv/test.esp32-idf.yaml +++ b/tests/components/esp32_improv/test.esp32-idf.yaml @@ -1,18 +1 @@ -wifi: - ssid: MySSID - password: password1 - -binary_sensor: - - platform: gpio - pin: 0 - id: io0_button - -output: - - platform: gpio - pin: 2 - id: built_in_led - -esp32_improv: - authorizer: io0_button - authorized_duration: 1min - status_indicator: built_in_led +<<: !include common.yaml diff --git a/tests/components/esp32_improv/test.esp32.yaml b/tests/components/esp32_improv/test.esp32.yaml index 7eb3f9c0b..dade44d14 100644 --- a/tests/components/esp32_improv/test.esp32.yaml +++ b/tests/components/esp32_improv/test.esp32.yaml @@ -1,18 +1 @@ -wifi: - ssid: MySSID - password: password1 - -binary_sensor: - - platform: gpio - pin: 0 - id: io0_button - -output: - - platform: gpio - pin: 2 - id: built_in_led - -esp32_improv: - authorizer: io0_button - authorized_duration: 1min - status_indicator: built_in_led +<<: !include common.yaml diff --git a/tests/components/esp32_touch/common.yaml b/tests/components/esp32_touch/common.yaml new file mode 100644 index 000000000..691cce8d8 --- /dev/null +++ b/tests/components/esp32_touch/common.yaml @@ -0,0 +1,16 @@ +esp32_touch: + setup_mode: false + iir_filter: 10ms + sleep_duration: 27ms + measurement_duration: 8ms + low_voltage_reference: 0.5V + high_voltage_reference: 2.7V + voltage_attenuation: 1.5V + +binary_sensor: + - platform: esp32_touch + name: ESP32 Touch Pad + pin: 27 + threshold: 1000 + on_press: + - logger.log: "I'm touched!" diff --git a/tests/components/esp32_touch/test.esp32-idf.yaml b/tests/components/esp32_touch/test.esp32-idf.yaml index 691cce8d8..dade44d14 100644 --- a/tests/components/esp32_touch/test.esp32-idf.yaml +++ b/tests/components/esp32_touch/test.esp32-idf.yaml @@ -1,16 +1 @@ -esp32_touch: - setup_mode: false - iir_filter: 10ms - sleep_duration: 27ms - measurement_duration: 8ms - low_voltage_reference: 0.5V - high_voltage_reference: 2.7V - voltage_attenuation: 1.5V - -binary_sensor: - - platform: esp32_touch - name: ESP32 Touch Pad - pin: 27 - threshold: 1000 - on_press: - - logger.log: "I'm touched!" +<<: !include common.yaml diff --git a/tests/components/esp32_touch/test.esp32.yaml b/tests/components/esp32_touch/test.esp32.yaml index 691cce8d8..dade44d14 100644 --- a/tests/components/esp32_touch/test.esp32.yaml +++ b/tests/components/esp32_touch/test.esp32.yaml @@ -1,16 +1 @@ -esp32_touch: - setup_mode: false - iir_filter: 10ms - sleep_duration: 27ms - measurement_duration: 8ms - low_voltage_reference: 0.5V - high_voltage_reference: 2.7V - voltage_attenuation: 1.5V - -binary_sensor: - - platform: esp32_touch - name: ESP32 Touch Pad - pin: 27 - threshold: 1000 - on_press: - - logger.log: "I'm touched!" +<<: !include common.yaml diff --git a/tests/components/esp8266_pwm/common.yaml b/tests/components/esp8266_pwm/common.yaml new file mode 100644 index 000000000..52b290f91 --- /dev/null +++ b/tests/components/esp8266_pwm/common.yaml @@ -0,0 +1,8 @@ +output: + - platform: esp8266_pwm + id: out + pin: 4 + frequency: 50Hz + - platform: esp8266_pwm + id: out2 + pin: 5 diff --git a/tests/components/esp8266_pwm/test.esp8266.yaml b/tests/components/esp8266_pwm/test.esp8266.yaml index 52b290f91..dade44d14 100644 --- a/tests/components/esp8266_pwm/test.esp8266.yaml +++ b/tests/components/esp8266_pwm/test.esp8266.yaml @@ -1,8 +1 @@ -output: - - platform: esp8266_pwm - id: out - pin: 4 - frequency: 50Hz - - platform: esp8266_pwm - id: out2 - pin: 5 +<<: !include common.yaml diff --git a/tests/components/ethernet/common.yaml b/tests/components/ethernet/common.yaml new file mode 100644 index 000000000..b9ed9cb03 --- /dev/null +++ b/tests/components/ethernet/common.yaml @@ -0,0 +1,12 @@ +ethernet: + type: LAN8720 + 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/test.esp32-idf.yaml b/tests/components/ethernet/test.esp32-idf.yaml index b9ed9cb03..dade44d14 100644 --- a/tests/components/ethernet/test.esp32-idf.yaml +++ b/tests/components/ethernet/test.esp32-idf.yaml @@ -1,12 +1 @@ -ethernet: - type: LAN8720 - 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 +<<: !include common.yaml diff --git a/tests/components/ethernet/test.esp32.yaml b/tests/components/ethernet/test.esp32.yaml index b9ed9cb03..dade44d14 100644 --- a/tests/components/ethernet/test.esp32.yaml +++ b/tests/components/ethernet/test.esp32.yaml @@ -1,12 +1 @@ -ethernet: - type: LAN8720 - 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 +<<: !include common.yaml diff --git a/tests/components/ethernet_info/common.yaml b/tests/components/ethernet_info/common.yaml new file mode 100644 index 000000000..dade4d7ca --- /dev/null +++ b/tests/components/ethernet_info/common.yaml @@ -0,0 +1,19 @@ +ethernet: + type: LAN8720 + 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 + +text_sensor: + - platform: ethernet_info + ip_address: + name: IP Address + dns_address: + name: DNS Address diff --git a/tests/components/ethernet_info/test.esp32-idf.yaml b/tests/components/ethernet_info/test.esp32-idf.yaml index dade4d7ca..dade44d14 100644 --- a/tests/components/ethernet_info/test.esp32-idf.yaml +++ b/tests/components/ethernet_info/test.esp32-idf.yaml @@ -1,19 +1 @@ -ethernet: - type: LAN8720 - 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 - -text_sensor: - - platform: ethernet_info - ip_address: - name: IP Address - dns_address: - name: DNS Address +<<: !include common.yaml diff --git a/tests/components/ethernet_info/test.esp32.yaml b/tests/components/ethernet_info/test.esp32.yaml index dade4d7ca..dade44d14 100644 --- a/tests/components/ethernet_info/test.esp32.yaml +++ b/tests/components/ethernet_info/test.esp32.yaml @@ -1,19 +1 @@ -ethernet: - type: LAN8720 - 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 - -text_sensor: - - platform: ethernet_info - ip_address: - name: IP Address - dns_address: - name: DNS Address +<<: !include common.yaml diff --git a/tests/components/event/common.yaml b/tests/components/event/common.yaml new file mode 100644 index 000000000..71cc19a6b --- /dev/null +++ b/tests/components/event/common.yaml @@ -0,0 +1,9 @@ +event: + - platform: template + name: Event + id: some_event + event_types: + - template_event_type1 + - template_event_type2 + on_event: + - logger.log: Event fired diff --git a/tests/components/event/test.esp32-c3-idf.yaml b/tests/components/event/test.esp32-c3-idf.yaml index 71cc19a6b..dade44d14 100644 --- a/tests/components/event/test.esp32-c3-idf.yaml +++ b/tests/components/event/test.esp32-c3-idf.yaml @@ -1,9 +1 @@ -event: - - platform: template - name: Event - id: some_event - event_types: - - template_event_type1 - - template_event_type2 - on_event: - - logger.log: Event fired +<<: !include common.yaml diff --git a/tests/components/event/test.esp32-c3.yaml b/tests/components/event/test.esp32-c3.yaml index 71cc19a6b..dade44d14 100644 --- a/tests/components/event/test.esp32-c3.yaml +++ b/tests/components/event/test.esp32-c3.yaml @@ -1,9 +1 @@ -event: - - platform: template - name: Event - id: some_event - event_types: - - template_event_type1 - - template_event_type2 - on_event: - - logger.log: Event fired +<<: !include common.yaml diff --git a/tests/components/event/test.esp32-idf.yaml b/tests/components/event/test.esp32-idf.yaml index 71cc19a6b..dade44d14 100644 --- a/tests/components/event/test.esp32-idf.yaml +++ b/tests/components/event/test.esp32-idf.yaml @@ -1,9 +1 @@ -event: - - platform: template - name: Event - id: some_event - event_types: - - template_event_type1 - - template_event_type2 - on_event: - - logger.log: Event fired +<<: !include common.yaml diff --git a/tests/components/event/test.esp32.yaml b/tests/components/event/test.esp32.yaml index 71cc19a6b..dade44d14 100644 --- a/tests/components/event/test.esp32.yaml +++ b/tests/components/event/test.esp32.yaml @@ -1,9 +1 @@ -event: - - platform: template - name: Event - id: some_event - event_types: - - template_event_type1 - - template_event_type2 - on_event: - - logger.log: Event fired +<<: !include common.yaml diff --git a/tests/components/event/test.esp8266.yaml b/tests/components/event/test.esp8266.yaml index 71cc19a6b..dade44d14 100644 --- a/tests/components/event/test.esp8266.yaml +++ b/tests/components/event/test.esp8266.yaml @@ -1,9 +1 @@ -event: - - platform: template - name: Event - id: some_event - event_types: - - template_event_type1 - - template_event_type2 - on_event: - - logger.log: Event fired +<<: !include common.yaml diff --git a/tests/components/event/test.rp2040.yaml b/tests/components/event/test.rp2040.yaml index 71cc19a6b..dade44d14 100644 --- a/tests/components/event/test.rp2040.yaml +++ b/tests/components/event/test.rp2040.yaml @@ -1,9 +1 @@ -event: - - platform: template - name: Event - id: some_event - event_types: - - template_event_type1 - - template_event_type2 - on_event: - - logger.log: Event fired +<<: !include common.yaml diff --git a/tests/components/exposure_notifications/common.yaml b/tests/components/exposure_notifications/common.yaml new file mode 100644 index 000000000..faba5bb2d --- /dev/null +++ b/tests/components/exposure_notifications/common.yaml @@ -0,0 +1,9 @@ +esp32_ble_tracker: + +exposure_notifications: + on_exposure_notification: + then: + - lambda: | + ESP_LOGD("main", "Got notification:"); + ESP_LOGD("main", " RPI: %s", format_hex(x.rolling_proximity_identifier).c_str()); + ESP_LOGD("main", " RSSI: %d", x.rssi); diff --git a/tests/components/exposure_notifications/test.esp32-c3-idf.yaml b/tests/components/exposure_notifications/test.esp32-c3-idf.yaml index faba5bb2d..dade44d14 100644 --- a/tests/components/exposure_notifications/test.esp32-c3-idf.yaml +++ b/tests/components/exposure_notifications/test.esp32-c3-idf.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -exposure_notifications: - on_exposure_notification: - then: - - lambda: | - ESP_LOGD("main", "Got notification:"); - ESP_LOGD("main", " RPI: %s", format_hex(x.rolling_proximity_identifier).c_str()); - ESP_LOGD("main", " RSSI: %d", x.rssi); +<<: !include common.yaml diff --git a/tests/components/exposure_notifications/test.esp32-c3.yaml b/tests/components/exposure_notifications/test.esp32-c3.yaml index faba5bb2d..dade44d14 100644 --- a/tests/components/exposure_notifications/test.esp32-c3.yaml +++ b/tests/components/exposure_notifications/test.esp32-c3.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -exposure_notifications: - on_exposure_notification: - then: - - lambda: | - ESP_LOGD("main", "Got notification:"); - ESP_LOGD("main", " RPI: %s", format_hex(x.rolling_proximity_identifier).c_str()); - ESP_LOGD("main", " RSSI: %d", x.rssi); +<<: !include common.yaml diff --git a/tests/components/exposure_notifications/test.esp32-idf.yaml b/tests/components/exposure_notifications/test.esp32-idf.yaml index faba5bb2d..dade44d14 100644 --- a/tests/components/exposure_notifications/test.esp32-idf.yaml +++ b/tests/components/exposure_notifications/test.esp32-idf.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -exposure_notifications: - on_exposure_notification: - then: - - lambda: | - ESP_LOGD("main", "Got notification:"); - ESP_LOGD("main", " RPI: %s", format_hex(x.rolling_proximity_identifier).c_str()); - ESP_LOGD("main", " RSSI: %d", x.rssi); +<<: !include common.yaml diff --git a/tests/components/exposure_notifications/test.esp32.yaml b/tests/components/exposure_notifications/test.esp32.yaml index faba5bb2d..dade44d14 100644 --- a/tests/components/exposure_notifications/test.esp32.yaml +++ b/tests/components/exposure_notifications/test.esp32.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -exposure_notifications: - on_exposure_notification: - then: - - lambda: | - ESP_LOGD("main", "Got notification:"); - ESP_LOGD("main", " RPI: %s", format_hex(x.rolling_proximity_identifier).c_str()); - ESP_LOGD("main", " RSSI: %d", x.rssi); +<<: !include common.yaml diff --git a/tests/components/external_components/common.yaml b/tests/components/external_components/common.yaml new file mode 100644 index 000000000..2b51267ec --- /dev/null +++ b/tests/components/external_components/common.yaml @@ -0,0 +1,6 @@ +external_components: + - source: github://esphome/esphome@dev + refresh: 1d + components: [bh1750] + - source: ../../../esphome/components + components: [sntp] diff --git a/tests/components/external_components/test.esp32-c3-idf.yaml b/tests/components/external_components/test.esp32-c3-idf.yaml index 2b51267ec..dade44d14 100644 --- a/tests/components/external_components/test.esp32-c3-idf.yaml +++ b/tests/components/external_components/test.esp32-c3-idf.yaml @@ -1,6 +1 @@ -external_components: - - source: github://esphome/esphome@dev - refresh: 1d - components: [bh1750] - - source: ../../../esphome/components - components: [sntp] +<<: !include common.yaml diff --git a/tests/components/external_components/test.esp32-c3.yaml b/tests/components/external_components/test.esp32-c3.yaml index 2b51267ec..dade44d14 100644 --- a/tests/components/external_components/test.esp32-c3.yaml +++ b/tests/components/external_components/test.esp32-c3.yaml @@ -1,6 +1 @@ -external_components: - - source: github://esphome/esphome@dev - refresh: 1d - components: [bh1750] - - source: ../../../esphome/components - components: [sntp] +<<: !include common.yaml diff --git a/tests/components/external_components/test.esp32-idf.yaml b/tests/components/external_components/test.esp32-idf.yaml index 2b51267ec..dade44d14 100644 --- a/tests/components/external_components/test.esp32-idf.yaml +++ b/tests/components/external_components/test.esp32-idf.yaml @@ -1,6 +1 @@ -external_components: - - source: github://esphome/esphome@dev - refresh: 1d - components: [bh1750] - - source: ../../../esphome/components - components: [sntp] +<<: !include common.yaml diff --git a/tests/components/external_components/test.esp32.yaml b/tests/components/external_components/test.esp32.yaml index 2b51267ec..dade44d14 100644 --- a/tests/components/external_components/test.esp32.yaml +++ b/tests/components/external_components/test.esp32.yaml @@ -1,6 +1 @@ -external_components: - - source: github://esphome/esphome@dev - refresh: 1d - components: [bh1750] - - source: ../../../esphome/components - components: [sntp] +<<: !include common.yaml diff --git a/tests/components/external_components/test.esp8266.yaml b/tests/components/external_components/test.esp8266.yaml index 2b51267ec..dade44d14 100644 --- a/tests/components/external_components/test.esp8266.yaml +++ b/tests/components/external_components/test.esp8266.yaml @@ -1,6 +1 @@ -external_components: - - source: github://esphome/esphome@dev - refresh: 1d - components: [bh1750] - - source: ../../../esphome/components - components: [sntp] +<<: !include common.yaml diff --git a/tests/components/external_components/test.rp2040.yaml b/tests/components/external_components/test.rp2040.yaml index 2b51267ec..dade44d14 100644 --- a/tests/components/external_components/test.rp2040.yaml +++ b/tests/components/external_components/test.rp2040.yaml @@ -1,6 +1 @@ -external_components: - - source: github://esphome/esphome@dev - refresh: 1d - components: [bh1750] - - source: ../../../esphome/components - components: [sntp] +<<: !include common.yaml diff --git a/tests/components/factory_reset/common.yaml b/tests/components/factory_reset/common.yaml new file mode 100644 index 000000000..ad3abd603 --- /dev/null +++ b/tests/components/factory_reset/common.yaml @@ -0,0 +1,3 @@ +button: + - platform: factory_reset + name: Reset to Factory Default Settings diff --git a/tests/components/factory_reset/test.esp32-c3-idf.yaml b/tests/components/factory_reset/test.esp32-c3-idf.yaml index ad3abd603..dade44d14 100644 --- a/tests/components/factory_reset/test.esp32-c3-idf.yaml +++ b/tests/components/factory_reset/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -button: - - platform: factory_reset - name: Reset to Factory Default Settings +<<: !include common.yaml diff --git a/tests/components/factory_reset/test.esp32-c3.yaml b/tests/components/factory_reset/test.esp32-c3.yaml index ad3abd603..dade44d14 100644 --- a/tests/components/factory_reset/test.esp32-c3.yaml +++ b/tests/components/factory_reset/test.esp32-c3.yaml @@ -1,3 +1 @@ -button: - - platform: factory_reset - name: Reset to Factory Default Settings +<<: !include common.yaml diff --git a/tests/components/factory_reset/test.esp32-idf.yaml b/tests/components/factory_reset/test.esp32-idf.yaml index ad3abd603..dade44d14 100644 --- a/tests/components/factory_reset/test.esp32-idf.yaml +++ b/tests/components/factory_reset/test.esp32-idf.yaml @@ -1,3 +1 @@ -button: - - platform: factory_reset - name: Reset to Factory Default Settings +<<: !include common.yaml diff --git a/tests/components/factory_reset/test.esp32.yaml b/tests/components/factory_reset/test.esp32.yaml index ad3abd603..dade44d14 100644 --- a/tests/components/factory_reset/test.esp32.yaml +++ b/tests/components/factory_reset/test.esp32.yaml @@ -1,3 +1 @@ -button: - - platform: factory_reset - name: Reset to Factory Default Settings +<<: !include common.yaml diff --git a/tests/components/factory_reset/test.esp8266.yaml b/tests/components/factory_reset/test.esp8266.yaml index ad3abd603..dade44d14 100644 --- a/tests/components/factory_reset/test.esp8266.yaml +++ b/tests/components/factory_reset/test.esp8266.yaml @@ -1,3 +1 @@ -button: - - platform: factory_reset - name: Reset to Factory Default Settings +<<: !include common.yaml diff --git a/tests/components/factory_reset/test.rp2040.yaml b/tests/components/factory_reset/test.rp2040.yaml index ad3abd603..dade44d14 100644 --- a/tests/components/factory_reset/test.rp2040.yaml +++ b/tests/components/factory_reset/test.rp2040.yaml @@ -1,3 +1 @@ -button: - - platform: factory_reset - name: Reset to Factory Default Settings +<<: !include common.yaml diff --git a/tests/components/fastled_clockless/common.yaml b/tests/components/fastled_clockless/common.yaml new file mode 100644 index 000000000..8b1447a17 --- /dev/null +++ b/tests/components/fastled_clockless/common.yaml @@ -0,0 +1,71 @@ +light: + - platform: fastled_clockless + id: addr1 + chipset: WS2811 + pin: 13 + num_leds: 100 + rgb_order: BRG + max_refresh_rate: 20ms + color_correct: [75%, 100%, 50%] + name: FastLED WS2811 Light + effects: + - addressable_color_wipe: + - addressable_color_wipe: + name: Color Wipe Effect With Custom Values + colors: + - red: 100% + green: 100% + blue: 100% + num_leds: 1 + - red: 0% + green: 0% + blue: 0% + num_leds: 1 + add_led_interval: 100ms + reverse: false + - addressable_scan: + - addressable_scan: + name: Scan Effect With Custom Values + move_interval: 100ms + - addressable_twinkle: + - addressable_twinkle: + name: Twinkle Effect With Custom Values + twinkle_probability: 5% + progress_interval: 4ms + - addressable_random_twinkle: + - addressable_random_twinkle: + name: Random Twinkle Effect With Custom Values + twinkle_probability: 5% + progress_interval: 32ms + - addressable_fireworks: + - addressable_fireworks: + name: Fireworks Effect With Custom Values + update_interval: 32ms + spark_probability: 10% + use_random_color: false + fade_out_rate: 120 + - addressable_flicker: + - addressable_flicker: + name: Flicker Effect With Custom Values + update_interval: 16ms + intensity: 5% + - addressable_lambda: + name: Test For Custom Lambda Effect + lambda: |- + if (initial_run) { + it[0] = current_color; + } + - automation: + name: Custom Effect + sequence: + - light.addressable_set: + id: addr1 + red: 100% + green: 100% + blue: 0% + - delay: 100ms + - light.addressable_set: + id: addr1 + red: 0% + green: 100% + blue: 0% diff --git a/tests/components/fastled_clockless/test.esp32.yaml b/tests/components/fastled_clockless/test.esp32.yaml index 8b1447a17..dade44d14 100644 --- a/tests/components/fastled_clockless/test.esp32.yaml +++ b/tests/components/fastled_clockless/test.esp32.yaml @@ -1,71 +1 @@ -light: - - platform: fastled_clockless - id: addr1 - chipset: WS2811 - pin: 13 - num_leds: 100 - rgb_order: BRG - max_refresh_rate: 20ms - color_correct: [75%, 100%, 50%] - name: FastLED WS2811 Light - effects: - - addressable_color_wipe: - - addressable_color_wipe: - name: Color Wipe Effect With Custom Values - colors: - - red: 100% - green: 100% - blue: 100% - num_leds: 1 - - red: 0% - green: 0% - blue: 0% - num_leds: 1 - add_led_interval: 100ms - reverse: false - - addressable_scan: - - addressable_scan: - name: Scan Effect With Custom Values - move_interval: 100ms - - addressable_twinkle: - - addressable_twinkle: - name: Twinkle Effect With Custom Values - twinkle_probability: 5% - progress_interval: 4ms - - addressable_random_twinkle: - - addressable_random_twinkle: - name: Random Twinkle Effect With Custom Values - twinkle_probability: 5% - progress_interval: 32ms - - addressable_fireworks: - - addressable_fireworks: - name: Fireworks Effect With Custom Values - update_interval: 32ms - spark_probability: 10% - use_random_color: false - fade_out_rate: 120 - - addressable_flicker: - - addressable_flicker: - name: Flicker Effect With Custom Values - update_interval: 16ms - intensity: 5% - - addressable_lambda: - name: Test For Custom Lambda Effect - lambda: |- - if (initial_run) { - it[0] = current_color; - } - - automation: - name: Custom Effect - sequence: - - light.addressable_set: - id: addr1 - red: 100% - green: 100% - blue: 0% - - delay: 100ms - - light.addressable_set: - id: addr1 - red: 0% - green: 100% - blue: 0% +<<: !include common.yaml diff --git a/tests/components/fastled_spi/common.yaml b/tests/components/fastled_spi/common.yaml new file mode 100644 index 000000000..f6f7c5553 --- /dev/null +++ b/tests/components/fastled_spi/common.yaml @@ -0,0 +1,71 @@ +light: + - platform: fastled_spi + id: addr1 + chipset: WS2801 + clock_pin: 22 + data_pin: 23 + data_rate: 2MHz + num_leds: 60 + rgb_order: BRG + name: FastLED SPI Light + effects: + - addressable_color_wipe: + - addressable_color_wipe: + name: Color Wipe Effect With Custom Values + colors: + - red: 100% + green: 100% + blue: 100% + num_leds: 1 + - red: 0% + green: 0% + blue: 0% + num_leds: 1 + add_led_interval: 100ms + reverse: false + - addressable_scan: + - addressable_scan: + name: Scan Effect With Custom Values + move_interval: 100ms + - addressable_twinkle: + - addressable_twinkle: + name: Twinkle Effect With Custom Values + twinkle_probability: 5% + progress_interval: 4ms + - addressable_random_twinkle: + - addressable_random_twinkle: + name: Random Twinkle Effect With Custom Values + twinkle_probability: 5% + progress_interval: 32ms + - addressable_fireworks: + - addressable_fireworks: + name: Fireworks Effect With Custom Values + update_interval: 32ms + spark_probability: 10% + use_random_color: false + fade_out_rate: 120 + - addressable_flicker: + - addressable_flicker: + name: Flicker Effect With Custom Values + update_interval: 16ms + intensity: 5% + - addressable_lambda: + name: Test For Custom Lambda Effect + lambda: |- + if (initial_run) { + it[0] = current_color; + } + - automation: + name: Custom Effect + sequence: + - light.addressable_set: + id: addr1 + red: 100% + green: 100% + blue: 0% + - delay: 100ms + - light.addressable_set: + id: addr1 + red: 0% + green: 100% + blue: 0% diff --git a/tests/components/fastled_spi/test.esp32.yaml b/tests/components/fastled_spi/test.esp32.yaml index f6f7c5553..dade44d14 100644 --- a/tests/components/fastled_spi/test.esp32.yaml +++ b/tests/components/fastled_spi/test.esp32.yaml @@ -1,71 +1 @@ -light: - - platform: fastled_spi - id: addr1 - chipset: WS2801 - clock_pin: 22 - data_pin: 23 - data_rate: 2MHz - num_leds: 60 - rgb_order: BRG - name: FastLED SPI Light - effects: - - addressable_color_wipe: - - addressable_color_wipe: - name: Color Wipe Effect With Custom Values - colors: - - red: 100% - green: 100% - blue: 100% - num_leds: 1 - - red: 0% - green: 0% - blue: 0% - num_leds: 1 - add_led_interval: 100ms - reverse: false - - addressable_scan: - - addressable_scan: - name: Scan Effect With Custom Values - move_interval: 100ms - - addressable_twinkle: - - addressable_twinkle: - name: Twinkle Effect With Custom Values - twinkle_probability: 5% - progress_interval: 4ms - - addressable_random_twinkle: - - addressable_random_twinkle: - name: Random Twinkle Effect With Custom Values - twinkle_probability: 5% - progress_interval: 32ms - - addressable_fireworks: - - addressable_fireworks: - name: Fireworks Effect With Custom Values - update_interval: 32ms - spark_probability: 10% - use_random_color: false - fade_out_rate: 120 - - addressable_flicker: - - addressable_flicker: - name: Flicker Effect With Custom Values - update_interval: 16ms - intensity: 5% - - addressable_lambda: - name: Test For Custom Lambda Effect - lambda: |- - if (initial_run) { - it[0] = current_color; - } - - automation: - name: Custom Effect - sequence: - - light.addressable_set: - id: addr1 - red: 100% - green: 100% - blue: 0% - - delay: 100ms - - light.addressable_set: - id: addr1 - red: 0% - green: 100% - blue: 0% +<<: !include common.yaml diff --git a/tests/components/feedback/common.yaml b/tests/components/feedback/common.yaml new file mode 100644 index 000000000..f93d54e8b --- /dev/null +++ b/tests/components/feedback/common.yaml @@ -0,0 +1,39 @@ +binary_sensor: + - platform: template + id: open_endstop_sensor + - platform: template + id: open_sensor + - platform: template + id: open_obstacle_sensor + - platform: template + id: close_endstop_sensor + - platform: template + id: close_sensor + - platform: template + id: close_obstacle_sensor + +cover: + - platform: feedback + name: Feedback Cover + id: gate + device_class: gate + infer_endstop_from_movement: false + has_built_in_endstop: false + max_duration: 30s + direction_change_wait_time: 300ms + acceleration_wait_time: 150ms + obstacle_rollback: 10% + open_duration: 22.1s + open_endstop: open_endstop_sensor + open_sensor: open_sensor + open_obstacle_sensor: open_obstacle_sensor + close_duration: 22.4s + close_endstop: close_endstop_sensor + close_sensor: close_sensor + close_obstacle_sensor: close_obstacle_sensor + open_action: + - logger.log: Open Action + close_action: + - logger.log: Close Action + stop_action: + - logger.log: Stop Action diff --git a/tests/components/feedback/test.esp32-c3-idf.yaml b/tests/components/feedback/test.esp32-c3-idf.yaml index f93d54e8b..dade44d14 100644 --- a/tests/components/feedback/test.esp32-c3-idf.yaml +++ b/tests/components/feedback/test.esp32-c3-idf.yaml @@ -1,39 +1 @@ -binary_sensor: - - platform: template - id: open_endstop_sensor - - platform: template - id: open_sensor - - platform: template - id: open_obstacle_sensor - - platform: template - id: close_endstop_sensor - - platform: template - id: close_sensor - - platform: template - id: close_obstacle_sensor - -cover: - - platform: feedback - name: Feedback Cover - id: gate - device_class: gate - infer_endstop_from_movement: false - has_built_in_endstop: false - max_duration: 30s - direction_change_wait_time: 300ms - acceleration_wait_time: 150ms - obstacle_rollback: 10% - open_duration: 22.1s - open_endstop: open_endstop_sensor - open_sensor: open_sensor - open_obstacle_sensor: open_obstacle_sensor - close_duration: 22.4s - close_endstop: close_endstop_sensor - close_sensor: close_sensor - close_obstacle_sensor: close_obstacle_sensor - open_action: - - logger.log: Open Action - close_action: - - logger.log: Close Action - stop_action: - - logger.log: Stop Action +<<: !include common.yaml diff --git a/tests/components/feedback/test.esp32-c3.yaml b/tests/components/feedback/test.esp32-c3.yaml index f93d54e8b..dade44d14 100644 --- a/tests/components/feedback/test.esp32-c3.yaml +++ b/tests/components/feedback/test.esp32-c3.yaml @@ -1,39 +1 @@ -binary_sensor: - - platform: template - id: open_endstop_sensor - - platform: template - id: open_sensor - - platform: template - id: open_obstacle_sensor - - platform: template - id: close_endstop_sensor - - platform: template - id: close_sensor - - platform: template - id: close_obstacle_sensor - -cover: - - platform: feedback - name: Feedback Cover - id: gate - device_class: gate - infer_endstop_from_movement: false - has_built_in_endstop: false - max_duration: 30s - direction_change_wait_time: 300ms - acceleration_wait_time: 150ms - obstacle_rollback: 10% - open_duration: 22.1s - open_endstop: open_endstop_sensor - open_sensor: open_sensor - open_obstacle_sensor: open_obstacle_sensor - close_duration: 22.4s - close_endstop: close_endstop_sensor - close_sensor: close_sensor - close_obstacle_sensor: close_obstacle_sensor - open_action: - - logger.log: Open Action - close_action: - - logger.log: Close Action - stop_action: - - logger.log: Stop Action +<<: !include common.yaml diff --git a/tests/components/feedback/test.esp32-idf.yaml b/tests/components/feedback/test.esp32-idf.yaml index f93d54e8b..dade44d14 100644 --- a/tests/components/feedback/test.esp32-idf.yaml +++ b/tests/components/feedback/test.esp32-idf.yaml @@ -1,39 +1 @@ -binary_sensor: - - platform: template - id: open_endstop_sensor - - platform: template - id: open_sensor - - platform: template - id: open_obstacle_sensor - - platform: template - id: close_endstop_sensor - - platform: template - id: close_sensor - - platform: template - id: close_obstacle_sensor - -cover: - - platform: feedback - name: Feedback Cover - id: gate - device_class: gate - infer_endstop_from_movement: false - has_built_in_endstop: false - max_duration: 30s - direction_change_wait_time: 300ms - acceleration_wait_time: 150ms - obstacle_rollback: 10% - open_duration: 22.1s - open_endstop: open_endstop_sensor - open_sensor: open_sensor - open_obstacle_sensor: open_obstacle_sensor - close_duration: 22.4s - close_endstop: close_endstop_sensor - close_sensor: close_sensor - close_obstacle_sensor: close_obstacle_sensor - open_action: - - logger.log: Open Action - close_action: - - logger.log: Close Action - stop_action: - - logger.log: Stop Action +<<: !include common.yaml diff --git a/tests/components/feedback/test.esp32.yaml b/tests/components/feedback/test.esp32.yaml index f93d54e8b..dade44d14 100644 --- a/tests/components/feedback/test.esp32.yaml +++ b/tests/components/feedback/test.esp32.yaml @@ -1,39 +1 @@ -binary_sensor: - - platform: template - id: open_endstop_sensor - - platform: template - id: open_sensor - - platform: template - id: open_obstacle_sensor - - platform: template - id: close_endstop_sensor - - platform: template - id: close_sensor - - platform: template - id: close_obstacle_sensor - -cover: - - platform: feedback - name: Feedback Cover - id: gate - device_class: gate - infer_endstop_from_movement: false - has_built_in_endstop: false - max_duration: 30s - direction_change_wait_time: 300ms - acceleration_wait_time: 150ms - obstacle_rollback: 10% - open_duration: 22.1s - open_endstop: open_endstop_sensor - open_sensor: open_sensor - open_obstacle_sensor: open_obstacle_sensor - close_duration: 22.4s - close_endstop: close_endstop_sensor - close_sensor: close_sensor - close_obstacle_sensor: close_obstacle_sensor - open_action: - - logger.log: Open Action - close_action: - - logger.log: Close Action - stop_action: - - logger.log: Stop Action +<<: !include common.yaml diff --git a/tests/components/feedback/test.esp8266.yaml b/tests/components/feedback/test.esp8266.yaml index f93d54e8b..dade44d14 100644 --- a/tests/components/feedback/test.esp8266.yaml +++ b/tests/components/feedback/test.esp8266.yaml @@ -1,39 +1 @@ -binary_sensor: - - platform: template - id: open_endstop_sensor - - platform: template - id: open_sensor - - platform: template - id: open_obstacle_sensor - - platform: template - id: close_endstop_sensor - - platform: template - id: close_sensor - - platform: template - id: close_obstacle_sensor - -cover: - - platform: feedback - name: Feedback Cover - id: gate - device_class: gate - infer_endstop_from_movement: false - has_built_in_endstop: false - max_duration: 30s - direction_change_wait_time: 300ms - acceleration_wait_time: 150ms - obstacle_rollback: 10% - open_duration: 22.1s - open_endstop: open_endstop_sensor - open_sensor: open_sensor - open_obstacle_sensor: open_obstacle_sensor - close_duration: 22.4s - close_endstop: close_endstop_sensor - close_sensor: close_sensor - close_obstacle_sensor: close_obstacle_sensor - open_action: - - logger.log: Open Action - close_action: - - logger.log: Close Action - stop_action: - - logger.log: Stop Action +<<: !include common.yaml diff --git a/tests/components/feedback/test.rp2040.yaml b/tests/components/feedback/test.rp2040.yaml index f93d54e8b..dade44d14 100644 --- a/tests/components/feedback/test.rp2040.yaml +++ b/tests/components/feedback/test.rp2040.yaml @@ -1,39 +1 @@ -binary_sensor: - - platform: template - id: open_endstop_sensor - - platform: template - id: open_sensor - - platform: template - id: open_obstacle_sensor - - platform: template - id: close_endstop_sensor - - platform: template - id: close_sensor - - platform: template - id: close_obstacle_sensor - -cover: - - platform: feedback - name: Feedback Cover - id: gate - device_class: gate - infer_endstop_from_movement: false - has_built_in_endstop: false - max_duration: 30s - direction_change_wait_time: 300ms - acceleration_wait_time: 150ms - obstacle_rollback: 10% - open_duration: 22.1s - open_endstop: open_endstop_sensor - open_sensor: open_sensor - open_obstacle_sensor: open_obstacle_sensor - close_duration: 22.4s - close_endstop: close_endstop_sensor - close_sensor: close_sensor - close_obstacle_sensor: close_obstacle_sensor - open_action: - - logger.log: Open Action - close_action: - - logger.log: Close Action - stop_action: - - logger.log: Stop Action +<<: !include common.yaml diff --git a/tests/components/globals/common.yaml b/tests/components/globals/common.yaml new file mode 100644 index 000000000..224a91a27 --- /dev/null +++ b/tests/components/globals/common.yaml @@ -0,0 +1,28 @@ +esphome: + on_boot: + then: + - globals.set: + id: glob_int + value: "10" + +globals: + - id: glob_int + type: int + restore_value: true + initial_value: "0" + - id: glob_float + type: float + restore_value: true + initial_value: "0.0f" + - id: glob_bool + type: bool + restore_value: false + initial_value: "true" + - id: glob_string + type: std::string + restore_value: false + # initial_value: "" + - id: glob_bool_processed + type: bool + restore_value: false + initial_value: "false" diff --git a/tests/components/globals/test.esp32-c3-idf.yaml b/tests/components/globals/test.esp32-c3-idf.yaml index 224a91a27..dade44d14 100644 --- a/tests/components/globals/test.esp32-c3-idf.yaml +++ b/tests/components/globals/test.esp32-c3-idf.yaml @@ -1,28 +1 @@ -esphome: - on_boot: - then: - - globals.set: - id: glob_int - value: "10" - -globals: - - id: glob_int - type: int - restore_value: true - initial_value: "0" - - id: glob_float - type: float - restore_value: true - initial_value: "0.0f" - - id: glob_bool - type: bool - restore_value: false - initial_value: "true" - - id: glob_string - type: std::string - restore_value: false - # initial_value: "" - - id: glob_bool_processed - type: bool - restore_value: false - initial_value: "false" +<<: !include common.yaml diff --git a/tests/components/globals/test.esp32-c3.yaml b/tests/components/globals/test.esp32-c3.yaml index 224a91a27..dade44d14 100644 --- a/tests/components/globals/test.esp32-c3.yaml +++ b/tests/components/globals/test.esp32-c3.yaml @@ -1,28 +1 @@ -esphome: - on_boot: - then: - - globals.set: - id: glob_int - value: "10" - -globals: - - id: glob_int - type: int - restore_value: true - initial_value: "0" - - id: glob_float - type: float - restore_value: true - initial_value: "0.0f" - - id: glob_bool - type: bool - restore_value: false - initial_value: "true" - - id: glob_string - type: std::string - restore_value: false - # initial_value: "" - - id: glob_bool_processed - type: bool - restore_value: false - initial_value: "false" +<<: !include common.yaml diff --git a/tests/components/globals/test.esp32-idf.yaml b/tests/components/globals/test.esp32-idf.yaml index 224a91a27..dade44d14 100644 --- a/tests/components/globals/test.esp32-idf.yaml +++ b/tests/components/globals/test.esp32-idf.yaml @@ -1,28 +1 @@ -esphome: - on_boot: - then: - - globals.set: - id: glob_int - value: "10" - -globals: - - id: glob_int - type: int - restore_value: true - initial_value: "0" - - id: glob_float - type: float - restore_value: true - initial_value: "0.0f" - - id: glob_bool - type: bool - restore_value: false - initial_value: "true" - - id: glob_string - type: std::string - restore_value: false - # initial_value: "" - - id: glob_bool_processed - type: bool - restore_value: false - initial_value: "false" +<<: !include common.yaml diff --git a/tests/components/globals/test.esp32.yaml b/tests/components/globals/test.esp32.yaml index 224a91a27..dade44d14 100644 --- a/tests/components/globals/test.esp32.yaml +++ b/tests/components/globals/test.esp32.yaml @@ -1,28 +1 @@ -esphome: - on_boot: - then: - - globals.set: - id: glob_int - value: "10" - -globals: - - id: glob_int - type: int - restore_value: true - initial_value: "0" - - id: glob_float - type: float - restore_value: true - initial_value: "0.0f" - - id: glob_bool - type: bool - restore_value: false - initial_value: "true" - - id: glob_string - type: std::string - restore_value: false - # initial_value: "" - - id: glob_bool_processed - type: bool - restore_value: false - initial_value: "false" +<<: !include common.yaml diff --git a/tests/components/globals/test.esp8266.yaml b/tests/components/globals/test.esp8266.yaml index 224a91a27..dade44d14 100644 --- a/tests/components/globals/test.esp8266.yaml +++ b/tests/components/globals/test.esp8266.yaml @@ -1,28 +1 @@ -esphome: - on_boot: - then: - - globals.set: - id: glob_int - value: "10" - -globals: - - id: glob_int - type: int - restore_value: true - initial_value: "0" - - id: glob_float - type: float - restore_value: true - initial_value: "0.0f" - - id: glob_bool - type: bool - restore_value: false - initial_value: "true" - - id: glob_string - type: std::string - restore_value: false - # initial_value: "" - - id: glob_bool_processed - type: bool - restore_value: false - initial_value: "false" +<<: !include common.yaml diff --git a/tests/components/globals/test.rp2040.yaml b/tests/components/globals/test.rp2040.yaml index 224a91a27..dade44d14 100644 --- a/tests/components/globals/test.rp2040.yaml +++ b/tests/components/globals/test.rp2040.yaml @@ -1,28 +1 @@ -esphome: - on_boot: - then: - - globals.set: - id: glob_int - value: "10" - -globals: - - id: glob_int - type: int - restore_value: true - initial_value: "0" - - id: glob_float - type: float - restore_value: true - initial_value: "0.0f" - - id: glob_bool - type: bool - restore_value: false - initial_value: "true" - - id: glob_string - type: std::string - restore_value: false - # initial_value: "" - - id: glob_bool_processed - type: bool - restore_value: false - initial_value: "false" +<<: !include common.yaml diff --git a/tests/components/host/common.yaml b/tests/components/host/common.yaml new file mode 100644 index 000000000..3d14c190a --- /dev/null +++ b/tests/components/host/common.yaml @@ -0,0 +1,15 @@ +time: + - platform: sntp + id: esptime + timezone: Australia/Sydney + +logger: + level: VERBOSE + logs: + lvgl: INFO + display: DEBUG + sensor: INFO + vnc: DEBUG + +host: + mac_address: "62:23:45:AF:B3:DD" diff --git a/tests/components/host/test.host.yaml b/tests/components/host/test.host.yaml index 3d14c190a..dade44d14 100644 --- a/tests/components/host/test.host.yaml +++ b/tests/components/host/test.host.yaml @@ -1,15 +1 @@ -time: - - platform: sntp - id: esptime - timezone: Australia/Sydney - -logger: - level: VERBOSE - logs: - lvgl: INFO - display: DEBUG - sensor: INFO - vnc: DEBUG - -host: - mac_address: "62:23:45:AF:B3:DD" +<<: !include common.yaml diff --git a/tests/components/improv_serial/common.yaml b/tests/components/improv_serial/common.yaml new file mode 100644 index 000000000..b36fe5a4a --- /dev/null +++ b/tests/components/improv_serial/common.yaml @@ -0,0 +1,5 @@ +wifi: + ssid: MySSID + password: password1 + +improv_serial: diff --git a/tests/components/improv_serial/test.esp32-c3-idf.yaml b/tests/components/improv_serial/test.esp32-c3-idf.yaml index b36fe5a4a..dade44d14 100644 --- a/tests/components/improv_serial/test.esp32-c3-idf.yaml +++ b/tests/components/improv_serial/test.esp32-c3-idf.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -improv_serial: +<<: !include common.yaml diff --git a/tests/components/improv_serial/test.esp32-c3.yaml b/tests/components/improv_serial/test.esp32-c3.yaml index b36fe5a4a..dade44d14 100644 --- a/tests/components/improv_serial/test.esp32-c3.yaml +++ b/tests/components/improv_serial/test.esp32-c3.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -improv_serial: +<<: !include common.yaml diff --git a/tests/components/improv_serial/test.esp32-idf.yaml b/tests/components/improv_serial/test.esp32-idf.yaml index b36fe5a4a..dade44d14 100644 --- a/tests/components/improv_serial/test.esp32-idf.yaml +++ b/tests/components/improv_serial/test.esp32-idf.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -improv_serial: +<<: !include common.yaml diff --git a/tests/components/improv_serial/test.esp32.yaml b/tests/components/improv_serial/test.esp32.yaml index b36fe5a4a..dade44d14 100644 --- a/tests/components/improv_serial/test.esp32.yaml +++ b/tests/components/improv_serial/test.esp32.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -improv_serial: +<<: !include common.yaml diff --git a/tests/components/improv_serial/test.esp8266.yaml b/tests/components/improv_serial/test.esp8266.yaml index b36fe5a4a..dade44d14 100644 --- a/tests/components/improv_serial/test.esp8266.yaml +++ b/tests/components/improv_serial/test.esp8266.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -improv_serial: +<<: !include common.yaml diff --git a/tests/components/improv_serial/test.rp2040.yaml b/tests/components/improv_serial/test.rp2040.yaml index b36fe5a4a..dade44d14 100644 --- a/tests/components/improv_serial/test.rp2040.yaml +++ b/tests/components/improv_serial/test.rp2040.yaml @@ -1,5 +1 @@ -wifi: - ssid: MySSID - password: password1 - -improv_serial: +<<: !include common.yaml diff --git a/tests/components/inkbird_ibsth1_mini/common.yaml b/tests/components/inkbird_ibsth1_mini/common.yaml new file mode 100644 index 000000000..ba46b7dbf --- /dev/null +++ b/tests/components/inkbird_ibsth1_mini/common.yaml @@ -0,0 +1,11 @@ +esp32_ble_tracker: + +sensor: + - platform: inkbird_ibsth1_mini + mac_address: 38:81:D7:0A:9C:11 + temperature: + name: Inkbird IBS-TH1 Temperature + humidity: + name: Inkbird IBS-TH1 Humidity + battery_level: + name: Inkbird IBS-TH1 Battery Level diff --git a/tests/components/inkbird_ibsth1_mini/test.esp32-c3-idf.yaml b/tests/components/inkbird_ibsth1_mini/test.esp32-c3-idf.yaml index ba46b7dbf..dade44d14 100644 --- a/tests/components/inkbird_ibsth1_mini/test.esp32-c3-idf.yaml +++ b/tests/components/inkbird_ibsth1_mini/test.esp32-c3-idf.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: inkbird_ibsth1_mini - mac_address: 38:81:D7:0A:9C:11 - temperature: - name: Inkbird IBS-TH1 Temperature - humidity: - name: Inkbird IBS-TH1 Humidity - battery_level: - name: Inkbird IBS-TH1 Battery Level +<<: !include common.yaml diff --git a/tests/components/inkbird_ibsth1_mini/test.esp32-c3.yaml b/tests/components/inkbird_ibsth1_mini/test.esp32-c3.yaml index ba46b7dbf..dade44d14 100644 --- a/tests/components/inkbird_ibsth1_mini/test.esp32-c3.yaml +++ b/tests/components/inkbird_ibsth1_mini/test.esp32-c3.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: inkbird_ibsth1_mini - mac_address: 38:81:D7:0A:9C:11 - temperature: - name: Inkbird IBS-TH1 Temperature - humidity: - name: Inkbird IBS-TH1 Humidity - battery_level: - name: Inkbird IBS-TH1 Battery Level +<<: !include common.yaml diff --git a/tests/components/inkbird_ibsth1_mini/test.esp32-idf.yaml b/tests/components/inkbird_ibsth1_mini/test.esp32-idf.yaml index ba46b7dbf..dade44d14 100644 --- a/tests/components/inkbird_ibsth1_mini/test.esp32-idf.yaml +++ b/tests/components/inkbird_ibsth1_mini/test.esp32-idf.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: inkbird_ibsth1_mini - mac_address: 38:81:D7:0A:9C:11 - temperature: - name: Inkbird IBS-TH1 Temperature - humidity: - name: Inkbird IBS-TH1 Humidity - battery_level: - name: Inkbird IBS-TH1 Battery Level +<<: !include common.yaml diff --git a/tests/components/inkbird_ibsth1_mini/test.esp32.yaml b/tests/components/inkbird_ibsth1_mini/test.esp32.yaml index ba46b7dbf..dade44d14 100644 --- a/tests/components/inkbird_ibsth1_mini/test.esp32.yaml +++ b/tests/components/inkbird_ibsth1_mini/test.esp32.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: inkbird_ibsth1_mini - mac_address: 38:81:D7:0A:9C:11 - temperature: - name: Inkbird IBS-TH1 Temperature - humidity: - name: Inkbird IBS-TH1 Humidity - battery_level: - name: Inkbird IBS-TH1 Battery Level +<<: !include common.yaml diff --git a/tests/components/inkplate6/common.yaml b/tests/components/inkplate6/common.yaml new file mode 100644 index 000000000..31b14e6c7 --- /dev/null +++ b/tests/components/inkplate6/common.yaml @@ -0,0 +1,62 @@ +i2c: + - id: i2c_inkplate6 + scl: 16 + sda: 17 + +display: + - platform: inkplate6 + id: inkplate_display + greyscale: false + partial_updating: false + update_interval: 60s + display_data_0_pin: + number: 1 + allow_other_uses: true + display_data_1_pin: + number: 1 + allow_other_uses: true + display_data_2_pin: + number: 1 + allow_other_uses: true + display_data_3_pin: + number: 1 + allow_other_uses: true + display_data_5_pin: + number: 1 + allow_other_uses: true + display_data_4_pin: + number: 1 + allow_other_uses: true + display_data_6_pin: + number: 1 + allow_other_uses: true + display_data_7_pin: + number: 1 + allow_other_uses: true + ckv_pin: + number: 1 + allow_other_uses: true + sph_pin: + number: 1 + allow_other_uses: true + gmod_pin: + number: 1 + allow_other_uses: true + gpio0_enable_pin: + number: 1 + allow_other_uses: true + oe_pin: + number: 1 + allow_other_uses: true + spv_pin: + number: 1 + allow_other_uses: true + powerup_pin: + number: 1 + allow_other_uses: true + wakeup_pin: + number: 1 + allow_other_uses: true + vcom_pin: + number: 1 + allow_other_uses: true diff --git a/tests/components/inkplate6/test.esp32.yaml b/tests/components/inkplate6/test.esp32.yaml index 31b14e6c7..dade44d14 100644 --- a/tests/components/inkplate6/test.esp32.yaml +++ b/tests/components/inkplate6/test.esp32.yaml @@ -1,62 +1 @@ -i2c: - - id: i2c_inkplate6 - scl: 16 - sda: 17 - -display: - - platform: inkplate6 - id: inkplate_display - greyscale: false - partial_updating: false - update_interval: 60s - display_data_0_pin: - number: 1 - allow_other_uses: true - display_data_1_pin: - number: 1 - allow_other_uses: true - display_data_2_pin: - number: 1 - allow_other_uses: true - display_data_3_pin: - number: 1 - allow_other_uses: true - display_data_5_pin: - number: 1 - allow_other_uses: true - display_data_4_pin: - number: 1 - allow_other_uses: true - display_data_6_pin: - number: 1 - allow_other_uses: true - display_data_7_pin: - number: 1 - allow_other_uses: true - ckv_pin: - number: 1 - allow_other_uses: true - sph_pin: - number: 1 - allow_other_uses: true - gmod_pin: - number: 1 - allow_other_uses: true - gpio0_enable_pin: - number: 1 - allow_other_uses: true - oe_pin: - number: 1 - allow_other_uses: true - spv_pin: - number: 1 - allow_other_uses: true - powerup_pin: - number: 1 - allow_other_uses: true - wakeup_pin: - number: 1 - allow_other_uses: true - vcom_pin: - number: 1 - allow_other_uses: true +<<: !include common.yaml diff --git a/tests/components/interval/common.yaml b/tests/components/interval/common.yaml new file mode 100644 index 000000000..2a3c979ae --- /dev/null +++ b/tests/components/interval/common.yaml @@ -0,0 +1,4 @@ +interval: + - interval: 1s + then: + - logger.log: Tick diff --git a/tests/components/interval/test.esp32-c3-idf.yaml b/tests/components/interval/test.esp32-c3-idf.yaml index 2a3c979ae..dade44d14 100644 --- a/tests/components/interval/test.esp32-c3-idf.yaml +++ b/tests/components/interval/test.esp32-c3-idf.yaml @@ -1,4 +1 @@ -interval: - - interval: 1s - then: - - logger.log: Tick +<<: !include common.yaml diff --git a/tests/components/interval/test.esp32-c3.yaml b/tests/components/interval/test.esp32-c3.yaml index 2a3c979ae..dade44d14 100644 --- a/tests/components/interval/test.esp32-c3.yaml +++ b/tests/components/interval/test.esp32-c3.yaml @@ -1,4 +1 @@ -interval: - - interval: 1s - then: - - logger.log: Tick +<<: !include common.yaml diff --git a/tests/components/interval/test.esp32-idf.yaml b/tests/components/interval/test.esp32-idf.yaml index 2a3c979ae..dade44d14 100644 --- a/tests/components/interval/test.esp32-idf.yaml +++ b/tests/components/interval/test.esp32-idf.yaml @@ -1,4 +1 @@ -interval: - - interval: 1s - then: - - logger.log: Tick +<<: !include common.yaml diff --git a/tests/components/interval/test.esp32.yaml b/tests/components/interval/test.esp32.yaml index 2a3c979ae..dade44d14 100644 --- a/tests/components/interval/test.esp32.yaml +++ b/tests/components/interval/test.esp32.yaml @@ -1,4 +1 @@ -interval: - - interval: 1s - then: - - logger.log: Tick +<<: !include common.yaml diff --git a/tests/components/interval/test.esp8266.yaml b/tests/components/interval/test.esp8266.yaml index 2a3c979ae..dade44d14 100644 --- a/tests/components/interval/test.esp8266.yaml +++ b/tests/components/interval/test.esp8266.yaml @@ -1,4 +1 @@ -interval: - - interval: 1s - then: - - logger.log: Tick +<<: !include common.yaml diff --git a/tests/components/interval/test.rp2040.yaml b/tests/components/interval/test.rp2040.yaml index 2a3c979ae..dade44d14 100644 --- a/tests/components/interval/test.rp2040.yaml +++ b/tests/components/interval/test.rp2040.yaml @@ -1,4 +1 @@ -interval: - - interval: 1s - then: - - logger.log: Tick +<<: !include common.yaml diff --git a/tests/components/ledc/common.yaml b/tests/components/ledc/common.yaml new file mode 100644 index 000000000..70352b451 --- /dev/null +++ b/tests/components/ledc/common.yaml @@ -0,0 +1,11 @@ +esphome: + on_boot: + then: + - output.ledc.set_frequency: + id: test_ledc + frequency: 100Hz + +output: + - platform: ledc + id: test_ledc + pin: 4 diff --git a/tests/components/ledc/test.esp32-c3-idf.yaml b/tests/components/ledc/test.esp32-c3-idf.yaml index 70352b451..dade44d14 100644 --- a/tests/components/ledc/test.esp32-c3-idf.yaml +++ b/tests/components/ledc/test.esp32-c3-idf.yaml @@ -1,11 +1 @@ -esphome: - on_boot: - then: - - output.ledc.set_frequency: - id: test_ledc - frequency: 100Hz - -output: - - platform: ledc - id: test_ledc - pin: 4 +<<: !include common.yaml diff --git a/tests/components/ledc/test.esp32-c3.yaml b/tests/components/ledc/test.esp32-c3.yaml index 70352b451..dade44d14 100644 --- a/tests/components/ledc/test.esp32-c3.yaml +++ b/tests/components/ledc/test.esp32-c3.yaml @@ -1,11 +1 @@ -esphome: - on_boot: - then: - - output.ledc.set_frequency: - id: test_ledc - frequency: 100Hz - -output: - - platform: ledc - id: test_ledc - pin: 4 +<<: !include common.yaml diff --git a/tests/components/ledc/test.esp32-idf.yaml b/tests/components/ledc/test.esp32-idf.yaml index 70352b451..dade44d14 100644 --- a/tests/components/ledc/test.esp32-idf.yaml +++ b/tests/components/ledc/test.esp32-idf.yaml @@ -1,11 +1 @@ -esphome: - on_boot: - then: - - output.ledc.set_frequency: - id: test_ledc - frequency: 100Hz - -output: - - platform: ledc - id: test_ledc - pin: 4 +<<: !include common.yaml diff --git a/tests/components/ledc/test.esp32.yaml b/tests/components/ledc/test.esp32.yaml index 70352b451..dade44d14 100644 --- a/tests/components/ledc/test.esp32.yaml +++ b/tests/components/ledc/test.esp32.yaml @@ -1,11 +1 @@ -esphome: - on_boot: - then: - - output.ledc.set_frequency: - id: test_ledc - frequency: 100Hz - -output: - - platform: ledc - id: test_ledc - pin: 4 +<<: !include common.yaml diff --git a/tests/components/lightwaverf/common.yaml b/tests/components/lightwaverf/common.yaml new file mode 100644 index 000000000..7ed800027 --- /dev/null +++ b/tests/components/lightwaverf/common.yaml @@ -0,0 +1,13 @@ +lightwaverf: + read_pin: 5 + write_pin: 4 + +button: + - platform: template + name: "Turn off sofa" + id: light_off_ceiling_sofa + on_press: + lightwaverf.send_raw: + code: [0x04, 0x00, 0x00, 0x00, 0x0f, 0x03, 0x0d, 0x09, 0x08, 0x08] + name: "Sofa" + repeat: 1 diff --git a/tests/components/lightwaverf/test.esp8266.yaml b/tests/components/lightwaverf/test.esp8266.yaml index 7ed800027..dade44d14 100644 --- a/tests/components/lightwaverf/test.esp8266.yaml +++ b/tests/components/lightwaverf/test.esp8266.yaml @@ -1,13 +1 @@ -lightwaverf: - read_pin: 5 - write_pin: 4 - -button: - - platform: template - name: "Turn off sofa" - id: light_off_ceiling_sofa - on_press: - lightwaverf.send_raw: - code: [0x04, 0x00, 0x00, 0x00, 0x0f, 0x03, 0x0d, 0x09, 0x08, 0x08] - name: "Sofa" - repeat: 1 +<<: !include common.yaml diff --git a/tests/components/lock/common.yaml b/tests/components/lock/common.yaml new file mode 100644 index 000000000..82297a3da --- /dev/null +++ b/tests/components/lock/common.yaml @@ -0,0 +1,36 @@ +esphome: + on_boot: + then: + - lock.lock: test_lock1 + - lock.unlock: test_lock1 + - lock.open: test_lock1 + +output: + - platform: gpio + id: test_binary + pin: 4 + +lock: + - platform: template + id: test_lock1 + name: Template Lock + lambda: |- + if (millis() > 10000) { + return LOCK_STATE_LOCKED; + } else { + return LOCK_STATE_UNLOCKED; + } + optimistic: true + assumed_state: false + on_unlock: + - lock.template.publish: + id: test_lock1 + state: !lambda "return LOCK_STATE_UNLOCKED;" + on_lock: + - lock.template.publish: + id: test_lock1 + state: !lambda "return LOCK_STATE_LOCKED;" + - platform: output + name: Generic Output Lock + id: test_lock2 + output: test_binary diff --git a/tests/components/lock/test.esp32-c3-idf.yaml b/tests/components/lock/test.esp32-c3-idf.yaml index 82297a3da..dade44d14 100644 --- a/tests/components/lock/test.esp32-c3-idf.yaml +++ b/tests/components/lock/test.esp32-c3-idf.yaml @@ -1,36 +1 @@ -esphome: - on_boot: - then: - - lock.lock: test_lock1 - - lock.unlock: test_lock1 - - lock.open: test_lock1 - -output: - - platform: gpio - id: test_binary - pin: 4 - -lock: - - platform: template - id: test_lock1 - name: Template Lock - lambda: |- - if (millis() > 10000) { - return LOCK_STATE_LOCKED; - } else { - return LOCK_STATE_UNLOCKED; - } - optimistic: true - assumed_state: false - on_unlock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_UNLOCKED;" - on_lock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_LOCKED;" - - platform: output - name: Generic Output Lock - id: test_lock2 - output: test_binary +<<: !include common.yaml diff --git a/tests/components/lock/test.esp32-c3.yaml b/tests/components/lock/test.esp32-c3.yaml index 82297a3da..dade44d14 100644 --- a/tests/components/lock/test.esp32-c3.yaml +++ b/tests/components/lock/test.esp32-c3.yaml @@ -1,36 +1 @@ -esphome: - on_boot: - then: - - lock.lock: test_lock1 - - lock.unlock: test_lock1 - - lock.open: test_lock1 - -output: - - platform: gpio - id: test_binary - pin: 4 - -lock: - - platform: template - id: test_lock1 - name: Template Lock - lambda: |- - if (millis() > 10000) { - return LOCK_STATE_LOCKED; - } else { - return LOCK_STATE_UNLOCKED; - } - optimistic: true - assumed_state: false - on_unlock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_UNLOCKED;" - on_lock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_LOCKED;" - - platform: output - name: Generic Output Lock - id: test_lock2 - output: test_binary +<<: !include common.yaml diff --git a/tests/components/lock/test.esp32-idf.yaml b/tests/components/lock/test.esp32-idf.yaml index 82297a3da..dade44d14 100644 --- a/tests/components/lock/test.esp32-idf.yaml +++ b/tests/components/lock/test.esp32-idf.yaml @@ -1,36 +1 @@ -esphome: - on_boot: - then: - - lock.lock: test_lock1 - - lock.unlock: test_lock1 - - lock.open: test_lock1 - -output: - - platform: gpio - id: test_binary - pin: 4 - -lock: - - platform: template - id: test_lock1 - name: Template Lock - lambda: |- - if (millis() > 10000) { - return LOCK_STATE_LOCKED; - } else { - return LOCK_STATE_UNLOCKED; - } - optimistic: true - assumed_state: false - on_unlock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_UNLOCKED;" - on_lock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_LOCKED;" - - platform: output - name: Generic Output Lock - id: test_lock2 - output: test_binary +<<: !include common.yaml diff --git a/tests/components/lock/test.esp32.yaml b/tests/components/lock/test.esp32.yaml index 82297a3da..dade44d14 100644 --- a/tests/components/lock/test.esp32.yaml +++ b/tests/components/lock/test.esp32.yaml @@ -1,36 +1 @@ -esphome: - on_boot: - then: - - lock.lock: test_lock1 - - lock.unlock: test_lock1 - - lock.open: test_lock1 - -output: - - platform: gpio - id: test_binary - pin: 4 - -lock: - - platform: template - id: test_lock1 - name: Template Lock - lambda: |- - if (millis() > 10000) { - return LOCK_STATE_LOCKED; - } else { - return LOCK_STATE_UNLOCKED; - } - optimistic: true - assumed_state: false - on_unlock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_UNLOCKED;" - on_lock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_LOCKED;" - - platform: output - name: Generic Output Lock - id: test_lock2 - output: test_binary +<<: !include common.yaml diff --git a/tests/components/lock/test.esp8266.yaml b/tests/components/lock/test.esp8266.yaml index 82297a3da..dade44d14 100644 --- a/tests/components/lock/test.esp8266.yaml +++ b/tests/components/lock/test.esp8266.yaml @@ -1,36 +1 @@ -esphome: - on_boot: - then: - - lock.lock: test_lock1 - - lock.unlock: test_lock1 - - lock.open: test_lock1 - -output: - - platform: gpio - id: test_binary - pin: 4 - -lock: - - platform: template - id: test_lock1 - name: Template Lock - lambda: |- - if (millis() > 10000) { - return LOCK_STATE_LOCKED; - } else { - return LOCK_STATE_UNLOCKED; - } - optimistic: true - assumed_state: false - on_unlock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_UNLOCKED;" - on_lock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_LOCKED;" - - platform: output - name: Generic Output Lock - id: test_lock2 - output: test_binary +<<: !include common.yaml diff --git a/tests/components/lock/test.rp2040.yaml b/tests/components/lock/test.rp2040.yaml index 82297a3da..dade44d14 100644 --- a/tests/components/lock/test.rp2040.yaml +++ b/tests/components/lock/test.rp2040.yaml @@ -1,36 +1 @@ -esphome: - on_boot: - then: - - lock.lock: test_lock1 - - lock.unlock: test_lock1 - - lock.open: test_lock1 - -output: - - platform: gpio - id: test_binary - pin: 4 - -lock: - - platform: template - id: test_lock1 - name: Template Lock - lambda: |- - if (millis() > 10000) { - return LOCK_STATE_LOCKED; - } else { - return LOCK_STATE_UNLOCKED; - } - optimistic: true - assumed_state: false - on_unlock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_UNLOCKED;" - on_lock: - - lock.template.publish: - id: test_lock1 - state: !lambda "return LOCK_STATE_LOCKED;" - - platform: output - name: Generic Output Lock - id: test_lock2 - output: test_binary +<<: !include common.yaml diff --git a/tests/components/logger/common.yaml b/tests/components/logger/common.yaml new file mode 100644 index 000000000..70b485daa --- /dev/null +++ b/tests/components/logger/common.yaml @@ -0,0 +1,7 @@ +esphome: + on_boot: + then: + - logger.log: Hello world + +logger: + level: DEBUG diff --git a/tests/components/logger/test.esp32-c3-idf.yaml b/tests/components/logger/test.esp32-c3-idf.yaml index 70b485daa..dade44d14 100644 --- a/tests/components/logger/test.esp32-c3-idf.yaml +++ b/tests/components/logger/test.esp32-c3-idf.yaml @@ -1,7 +1 @@ -esphome: - on_boot: - then: - - logger.log: Hello world - -logger: - level: DEBUG +<<: !include common.yaml diff --git a/tests/components/logger/test.esp32-c3.yaml b/tests/components/logger/test.esp32-c3.yaml index 70b485daa..dade44d14 100644 --- a/tests/components/logger/test.esp32-c3.yaml +++ b/tests/components/logger/test.esp32-c3.yaml @@ -1,7 +1 @@ -esphome: - on_boot: - then: - - logger.log: Hello world - -logger: - level: DEBUG +<<: !include common.yaml diff --git a/tests/components/logger/test.esp32-idf.yaml b/tests/components/logger/test.esp32-idf.yaml index 70b485daa..dade44d14 100644 --- a/tests/components/logger/test.esp32-idf.yaml +++ b/tests/components/logger/test.esp32-idf.yaml @@ -1,7 +1 @@ -esphome: - on_boot: - then: - - logger.log: Hello world - -logger: - level: DEBUG +<<: !include common.yaml diff --git a/tests/components/logger/test.esp32.yaml b/tests/components/logger/test.esp32.yaml index 70b485daa..dade44d14 100644 --- a/tests/components/logger/test.esp32.yaml +++ b/tests/components/logger/test.esp32.yaml @@ -1,7 +1 @@ -esphome: - on_boot: - then: - - logger.log: Hello world - -logger: - level: DEBUG +<<: !include common.yaml diff --git a/tests/components/logger/test.esp8266.yaml b/tests/components/logger/test.esp8266.yaml index 70b485daa..dade44d14 100644 --- a/tests/components/logger/test.esp8266.yaml +++ b/tests/components/logger/test.esp8266.yaml @@ -1,7 +1 @@ -esphome: - on_boot: - then: - - logger.log: Hello world - -logger: - level: DEBUG +<<: !include common.yaml diff --git a/tests/components/logger/test.rp2040.yaml b/tests/components/logger/test.rp2040.yaml index 70b485daa..dade44d14 100644 --- a/tests/components/logger/test.rp2040.yaml +++ b/tests/components/logger/test.rp2040.yaml @@ -1,7 +1 @@ -esphome: - on_boot: - then: - - logger.log: Hello world - -logger: - level: DEBUG +<<: !include common.yaml diff --git a/tests/components/mdns/common.yaml b/tests/components/mdns/common.yaml new file mode 100644 index 000000000..bc31e3278 --- /dev/null +++ b/tests/components/mdns/common.yaml @@ -0,0 +1,6 @@ +wifi: + ssid: MySSID + password: password1 + +mdns: + disabled: false diff --git a/tests/components/mdns/test.esp32-c3-idf.yaml b/tests/components/mdns/test.esp32-c3-idf.yaml index bc31e3278..dade44d14 100644 --- a/tests/components/mdns/test.esp32-c3-idf.yaml +++ b/tests/components/mdns/test.esp32-c3-idf.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -mdns: - disabled: false +<<: !include common.yaml diff --git a/tests/components/mdns/test.esp32-c3.yaml b/tests/components/mdns/test.esp32-c3.yaml index bc31e3278..dade44d14 100644 --- a/tests/components/mdns/test.esp32-c3.yaml +++ b/tests/components/mdns/test.esp32-c3.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -mdns: - disabled: false +<<: !include common.yaml diff --git a/tests/components/mdns/test.esp32-idf.yaml b/tests/components/mdns/test.esp32-idf.yaml index bc31e3278..dade44d14 100644 --- a/tests/components/mdns/test.esp32-idf.yaml +++ b/tests/components/mdns/test.esp32-idf.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -mdns: - disabled: false +<<: !include common.yaml diff --git a/tests/components/mdns/test.esp32.yaml b/tests/components/mdns/test.esp32.yaml index bc31e3278..dade44d14 100644 --- a/tests/components/mdns/test.esp32.yaml +++ b/tests/components/mdns/test.esp32.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -mdns: - disabled: false +<<: !include common.yaml diff --git a/tests/components/mdns/test.esp8266.yaml b/tests/components/mdns/test.esp8266.yaml index bc31e3278..dade44d14 100644 --- a/tests/components/mdns/test.esp8266.yaml +++ b/tests/components/mdns/test.esp8266.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -mdns: - disabled: false +<<: !include common.yaml diff --git a/tests/components/mdns/test.rp2040.yaml b/tests/components/mdns/test.rp2040.yaml index bc31e3278..dade44d14 100644 --- a/tests/components/mdns/test.rp2040.yaml +++ b/tests/components/mdns/test.rp2040.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -mdns: - disabled: false +<<: !include common.yaml diff --git a/tests/components/media_player/common.yaml b/tests/components/media_player/common.yaml new file mode 100644 index 000000000..24b85cd47 --- /dev/null +++ b/tests/components/media_player/common.yaml @@ -0,0 +1,32 @@ +wifi: + ssid: MySSID + password: password1 + +i2s_audio: + i2s_lrclk_pin: 13 + i2s_bclk_pin: 14 + i2s_mclk_pin: 15 + +media_player: + - platform: i2s_audio + name: None + dac_type: external + i2s_dout_pin: 18 + mute_pin: 19 + on_state: + - media_player.play: + - media_player.play_media: http://localhost/media.mp3 + - media_player.play_media: !lambda 'return "http://localhost/media.mp3";' + on_idle: + - media_player.pause: + on_play: + - media_player.stop: + on_pause: + - media_player.toggle: + - wait_until: + media_player.is_idle: + - wait_until: + media_player.is_playing: + - media_player.volume_up: + - media_player.volume_down: + - media_player.volume_set: 50% diff --git a/tests/components/media_player/test.esp32.yaml b/tests/components/media_player/test.esp32.yaml index 24b85cd47..dade44d14 100644 --- a/tests/components/media_player/test.esp32.yaml +++ b/tests/components/media_player/test.esp32.yaml @@ -1,32 +1 @@ -wifi: - ssid: MySSID - password: password1 - -i2s_audio: - i2s_lrclk_pin: 13 - i2s_bclk_pin: 14 - i2s_mclk_pin: 15 - -media_player: - - platform: i2s_audio - name: None - dac_type: external - i2s_dout_pin: 18 - mute_pin: 19 - on_state: - - media_player.play: - - media_player.play_media: http://localhost/media.mp3 - - media_player.play_media: !lambda 'return "http://localhost/media.mp3";' - on_idle: - - media_player.pause: - on_play: - - media_player.stop: - on_pause: - - media_player.toggle: - - wait_until: - media_player.is_idle: - - wait_until: - media_player.is_playing: - - media_player.volume_up: - - media_player.volume_down: - - media_player.volume_set: 50% +<<: !include common.yaml diff --git a/tests/components/micro_wake_word/common.yaml b/tests/components/micro_wake_word/common.yaml new file mode 100644 index 000000000..c0f3593cc --- /dev/null +++ b/tests/components/micro_wake_word/common.yaml @@ -0,0 +1,15 @@ +i2s_audio: + i2s_lrclk_pin: GPIO18 + i2s_bclk_pin: GPIO19 + +microphone: + - platform: i2s_audio + id: echo_microphone + i2s_din_pin: GPIO17 + adc_type: external + pdm: true + +micro_wake_word: + model: hey_jarvis + on_wake_word_detected: + - logger.log: "Wake word detected" diff --git a/tests/components/micro_wake_word/test.esp32-s3-idf.yaml b/tests/components/micro_wake_word/test.esp32-s3-idf.yaml index c0f3593cc..dade44d14 100644 --- a/tests/components/micro_wake_word/test.esp32-s3-idf.yaml +++ b/tests/components/micro_wake_word/test.esp32-s3-idf.yaml @@ -1,15 +1 @@ -i2s_audio: - i2s_lrclk_pin: GPIO18 - i2s_bclk_pin: GPIO19 - -microphone: - - platform: i2s_audio - id: echo_microphone - i2s_din_pin: GPIO17 - adc_type: external - pdm: true - -micro_wake_word: - model: hey_jarvis - on_wake_word_detected: - - logger.log: "Wake word detected" +<<: !include common.yaml diff --git a/tests/components/midea_ir/common.yaml b/tests/components/midea_ir/common.yaml new file mode 100644 index 000000000..e8d89cecc --- /dev/null +++ b/tests/components/midea_ir/common.yaml @@ -0,0 +1,8 @@ +remote_transmitter: + pin: 4 + carrier_duty_percent: 50% + +climate: + - platform: midea_ir + name: Midea IR + use_fahrenheit: true diff --git a/tests/components/midea_ir/test.esp32-c3-idf.yaml b/tests/components/midea_ir/test.esp32-c3-idf.yaml index e8d89cecc..dade44d14 100644 --- a/tests/components/midea_ir/test.esp32-c3-idf.yaml +++ b/tests/components/midea_ir/test.esp32-c3-idf.yaml @@ -1,8 +1 @@ -remote_transmitter: - pin: 4 - carrier_duty_percent: 50% - -climate: - - platform: midea_ir - name: Midea IR - use_fahrenheit: true +<<: !include common.yaml diff --git a/tests/components/midea_ir/test.esp32-c3.yaml b/tests/components/midea_ir/test.esp32-c3.yaml index e8d89cecc..dade44d14 100644 --- a/tests/components/midea_ir/test.esp32-c3.yaml +++ b/tests/components/midea_ir/test.esp32-c3.yaml @@ -1,8 +1 @@ -remote_transmitter: - pin: 4 - carrier_duty_percent: 50% - -climate: - - platform: midea_ir - name: Midea IR - use_fahrenheit: true +<<: !include common.yaml diff --git a/tests/components/midea_ir/test.esp32-idf.yaml b/tests/components/midea_ir/test.esp32-idf.yaml index e8d89cecc..dade44d14 100644 --- a/tests/components/midea_ir/test.esp32-idf.yaml +++ b/tests/components/midea_ir/test.esp32-idf.yaml @@ -1,8 +1 @@ -remote_transmitter: - pin: 4 - carrier_duty_percent: 50% - -climate: - - platform: midea_ir - name: Midea IR - use_fahrenheit: true +<<: !include common.yaml diff --git a/tests/components/midea_ir/test.esp32.yaml b/tests/components/midea_ir/test.esp32.yaml index e8d89cecc..dade44d14 100644 --- a/tests/components/midea_ir/test.esp32.yaml +++ b/tests/components/midea_ir/test.esp32.yaml @@ -1,8 +1 @@ -remote_transmitter: - pin: 4 - carrier_duty_percent: 50% - -climate: - - platform: midea_ir - name: Midea IR - use_fahrenheit: true +<<: !include common.yaml diff --git a/tests/components/midea_ir/test.esp8266.yaml b/tests/components/midea_ir/test.esp8266.yaml index e8d89cecc..dade44d14 100644 --- a/tests/components/midea_ir/test.esp8266.yaml +++ b/tests/components/midea_ir/test.esp8266.yaml @@ -1,8 +1 @@ -remote_transmitter: - pin: 4 - carrier_duty_percent: 50% - -climate: - - platform: midea_ir - name: Midea IR - use_fahrenheit: true +<<: !include common.yaml diff --git a/tests/components/mitsubishi/common.yaml b/tests/components/mitsubishi/common.yaml new file mode 100644 index 000000000..c0fc959c5 --- /dev/null +++ b/tests/components/mitsubishi/common.yaml @@ -0,0 +1,7 @@ +remote_transmitter: + pin: 4 + carrier_duty_percent: 50% + +climate: + - platform: mitsubishi + name: Mitsubishi diff --git a/tests/components/mitsubishi/test.esp32-c3-idf.yaml b/tests/components/mitsubishi/test.esp32-c3-idf.yaml index c0fc959c5..dade44d14 100644 --- a/tests/components/mitsubishi/test.esp32-c3-idf.yaml +++ b/tests/components/mitsubishi/test.esp32-c3-idf.yaml @@ -1,7 +1 @@ -remote_transmitter: - pin: 4 - carrier_duty_percent: 50% - -climate: - - platform: mitsubishi - name: Mitsubishi +<<: !include common.yaml diff --git a/tests/components/mitsubishi/test.esp32-c3.yaml b/tests/components/mitsubishi/test.esp32-c3.yaml index c0fc959c5..dade44d14 100644 --- a/tests/components/mitsubishi/test.esp32-c3.yaml +++ b/tests/components/mitsubishi/test.esp32-c3.yaml @@ -1,7 +1 @@ -remote_transmitter: - pin: 4 - carrier_duty_percent: 50% - -climate: - - platform: mitsubishi - name: Mitsubishi +<<: !include common.yaml diff --git a/tests/components/mitsubishi/test.esp32-idf.yaml b/tests/components/mitsubishi/test.esp32-idf.yaml index c0fc959c5..dade44d14 100644 --- a/tests/components/mitsubishi/test.esp32-idf.yaml +++ b/tests/components/mitsubishi/test.esp32-idf.yaml @@ -1,7 +1 @@ -remote_transmitter: - pin: 4 - carrier_duty_percent: 50% - -climate: - - platform: mitsubishi - name: Mitsubishi +<<: !include common.yaml diff --git a/tests/components/mitsubishi/test.esp32.yaml b/tests/components/mitsubishi/test.esp32.yaml index c0fc959c5..dade44d14 100644 --- a/tests/components/mitsubishi/test.esp32.yaml +++ b/tests/components/mitsubishi/test.esp32.yaml @@ -1,7 +1 @@ -remote_transmitter: - pin: 4 - carrier_duty_percent: 50% - -climate: - - platform: mitsubishi - name: Mitsubishi +<<: !include common.yaml diff --git a/tests/components/mitsubishi/test.esp8266.yaml b/tests/components/mitsubishi/test.esp8266.yaml index c0fc959c5..dade44d14 100644 --- a/tests/components/mitsubishi/test.esp8266.yaml +++ b/tests/components/mitsubishi/test.esp8266.yaml @@ -1,7 +1 @@ -remote_transmitter: - pin: 4 - carrier_duty_percent: 50% - -climate: - - platform: mitsubishi - name: Mitsubishi +<<: !include common.yaml diff --git a/tests/components/mopeka_ble/common.yaml b/tests/components/mopeka_ble/common.yaml new file mode 100644 index 000000000..a115404f1 --- /dev/null +++ b/tests/components/mopeka_ble/common.yaml @@ -0,0 +1,3 @@ +esp32_ble_tracker: + +mopeka_ble: diff --git a/tests/components/mopeka_ble/test.esp32-c3-idf.yaml b/tests/components/mopeka_ble/test.esp32-c3-idf.yaml index a115404f1..dade44d14 100644 --- a/tests/components/mopeka_ble/test.esp32-c3-idf.yaml +++ b/tests/components/mopeka_ble/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -mopeka_ble: +<<: !include common.yaml diff --git a/tests/components/mopeka_ble/test.esp32-c3.yaml b/tests/components/mopeka_ble/test.esp32-c3.yaml index a115404f1..dade44d14 100644 --- a/tests/components/mopeka_ble/test.esp32-c3.yaml +++ b/tests/components/mopeka_ble/test.esp32-c3.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -mopeka_ble: +<<: !include common.yaml diff --git a/tests/components/mopeka_ble/test.esp32-idf.yaml b/tests/components/mopeka_ble/test.esp32-idf.yaml index a115404f1..dade44d14 100644 --- a/tests/components/mopeka_ble/test.esp32-idf.yaml +++ b/tests/components/mopeka_ble/test.esp32-idf.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -mopeka_ble: +<<: !include common.yaml diff --git a/tests/components/mopeka_ble/test.esp32.yaml b/tests/components/mopeka_ble/test.esp32.yaml index a115404f1..dade44d14 100644 --- a/tests/components/mopeka_ble/test.esp32.yaml +++ b/tests/components/mopeka_ble/test.esp32.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -mopeka_ble: +<<: !include common.yaml diff --git a/tests/components/mopeka_pro_check/common.yaml b/tests/components/mopeka_pro_check/common.yaml new file mode 100644 index 000000000..147cbcb9d --- /dev/null +++ b/tests/components/mopeka_pro_check/common.yaml @@ -0,0 +1,16 @@ +esp32_ble_tracker: + +sensor: + - platform: mopeka_pro_check + mac_address: D3:75:F2:DC:16:91 + tank_type: CUSTOM + custom_distance_full: 40cm + custom_distance_empty: 10mm + temperature: + name: Propane test temp + level: + name: Propane test level + distance: + name: Propane test distance + battery_level: + name: Propane test battery level diff --git a/tests/components/mopeka_pro_check/test.esp32-c3-idf.yaml b/tests/components/mopeka_pro_check/test.esp32-c3-idf.yaml index 147cbcb9d..dade44d14 100644 --- a/tests/components/mopeka_pro_check/test.esp32-c3-idf.yaml +++ b/tests/components/mopeka_pro_check/test.esp32-c3-idf.yaml @@ -1,16 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: mopeka_pro_check - mac_address: D3:75:F2:DC:16:91 - tank_type: CUSTOM - custom_distance_full: 40cm - custom_distance_empty: 10mm - temperature: - name: Propane test temp - level: - name: Propane test level - distance: - name: Propane test distance - battery_level: - name: Propane test battery level +<<: !include common.yaml diff --git a/tests/components/mopeka_pro_check/test.esp32-c3.yaml b/tests/components/mopeka_pro_check/test.esp32-c3.yaml index 147cbcb9d..dade44d14 100644 --- a/tests/components/mopeka_pro_check/test.esp32-c3.yaml +++ b/tests/components/mopeka_pro_check/test.esp32-c3.yaml @@ -1,16 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: mopeka_pro_check - mac_address: D3:75:F2:DC:16:91 - tank_type: CUSTOM - custom_distance_full: 40cm - custom_distance_empty: 10mm - temperature: - name: Propane test temp - level: - name: Propane test level - distance: - name: Propane test distance - battery_level: - name: Propane test battery level +<<: !include common.yaml diff --git a/tests/components/mopeka_pro_check/test.esp32-idf.yaml b/tests/components/mopeka_pro_check/test.esp32-idf.yaml index 147cbcb9d..dade44d14 100644 --- a/tests/components/mopeka_pro_check/test.esp32-idf.yaml +++ b/tests/components/mopeka_pro_check/test.esp32-idf.yaml @@ -1,16 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: mopeka_pro_check - mac_address: D3:75:F2:DC:16:91 - tank_type: CUSTOM - custom_distance_full: 40cm - custom_distance_empty: 10mm - temperature: - name: Propane test temp - level: - name: Propane test level - distance: - name: Propane test distance - battery_level: - name: Propane test battery level +<<: !include common.yaml diff --git a/tests/components/mopeka_pro_check/test.esp32.yaml b/tests/components/mopeka_pro_check/test.esp32.yaml index 147cbcb9d..dade44d14 100644 --- a/tests/components/mopeka_pro_check/test.esp32.yaml +++ b/tests/components/mopeka_pro_check/test.esp32.yaml @@ -1,16 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: mopeka_pro_check - mac_address: D3:75:F2:DC:16:91 - tank_type: CUSTOM - custom_distance_full: 40cm - custom_distance_empty: 10mm - temperature: - name: Propane test temp - level: - name: Propane test level - distance: - name: Propane test distance - battery_level: - name: Propane test battery level +<<: !include common.yaml diff --git a/tests/components/mopeka_std_check/common.yaml b/tests/components/mopeka_std_check/common.yaml new file mode 100644 index 000000000..383e2e2a1 --- /dev/null +++ b/tests/components/mopeka_std_check/common.yaml @@ -0,0 +1,15 @@ +esp32_ble_tracker: + +sensor: + # Example using 11kg 100% propane tank. + - platform: mopeka_std_check + mac_address: D3:75:F2:DC:16:91 + tank_type: Europe_11kg + temperature: + name: "Propane test temp" + level: + name: "Propane test level" + distance: + name: "Propane test distance" + battery_level: + name: "Propane test battery level" diff --git a/tests/components/mopeka_std_check/test.esp32-c3-idf.yaml b/tests/components/mopeka_std_check/test.esp32-c3-idf.yaml index 383e2e2a1..dade44d14 100644 --- a/tests/components/mopeka_std_check/test.esp32-c3-idf.yaml +++ b/tests/components/mopeka_std_check/test.esp32-c3-idf.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - # Example using 11kg 100% propane tank. - - platform: mopeka_std_check - mac_address: D3:75:F2:DC:16:91 - tank_type: Europe_11kg - temperature: - name: "Propane test temp" - level: - name: "Propane test level" - distance: - name: "Propane test distance" - battery_level: - name: "Propane test battery level" +<<: !include common.yaml diff --git a/tests/components/mopeka_std_check/test.esp32-c3.yaml b/tests/components/mopeka_std_check/test.esp32-c3.yaml index 383e2e2a1..dade44d14 100644 --- a/tests/components/mopeka_std_check/test.esp32-c3.yaml +++ b/tests/components/mopeka_std_check/test.esp32-c3.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - # Example using 11kg 100% propane tank. - - platform: mopeka_std_check - mac_address: D3:75:F2:DC:16:91 - tank_type: Europe_11kg - temperature: - name: "Propane test temp" - level: - name: "Propane test level" - distance: - name: "Propane test distance" - battery_level: - name: "Propane test battery level" +<<: !include common.yaml diff --git a/tests/components/mopeka_std_check/test.esp32-idf.yaml b/tests/components/mopeka_std_check/test.esp32-idf.yaml index 383e2e2a1..dade44d14 100644 --- a/tests/components/mopeka_std_check/test.esp32-idf.yaml +++ b/tests/components/mopeka_std_check/test.esp32-idf.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - # Example using 11kg 100% propane tank. - - platform: mopeka_std_check - mac_address: D3:75:F2:DC:16:91 - tank_type: Europe_11kg - temperature: - name: "Propane test temp" - level: - name: "Propane test level" - distance: - name: "Propane test distance" - battery_level: - name: "Propane test battery level" +<<: !include common.yaml diff --git a/tests/components/mopeka_std_check/test.esp32.yaml b/tests/components/mopeka_std_check/test.esp32.yaml index 383e2e2a1..dade44d14 100644 --- a/tests/components/mopeka_std_check/test.esp32.yaml +++ b/tests/components/mopeka_std_check/test.esp32.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - # Example using 11kg 100% propane tank. - - platform: mopeka_std_check - mac_address: D3:75:F2:DC:16:91 - tank_type: Europe_11kg - temperature: - name: "Propane test temp" - level: - name: "Propane test level" - distance: - name: "Propane test distance" - battery_level: - name: "Propane test battery level" +<<: !include common.yaml diff --git a/tests/components/my9231/common.yaml b/tests/components/my9231/common.yaml new file mode 100644 index 000000000..3f2e81ef9 --- /dev/null +++ b/tests/components/my9231/common.yaml @@ -0,0 +1,26 @@ +my9231: + clock_pin: 5 + data_pin: 4 + num_channels: 6 + num_chips: 2 + bit_depth: 16 + +output: + - platform: my9231 + id: my_0 + channel: 0 + - platform: my9231 + id: my_1 + channel: 1 + - platform: my9231 + id: my_2 + channel: 2 + - platform: my9231 + id: my_3 + channel: 3 + - platform: my9231 + id: my_4 + channel: 4 + - platform: my9231 + id: my_5 + channel: 5 diff --git a/tests/components/my9231/test.esp32-c3-idf.yaml b/tests/components/my9231/test.esp32-c3-idf.yaml index 3f2e81ef9..dade44d14 100644 --- a/tests/components/my9231/test.esp32-c3-idf.yaml +++ b/tests/components/my9231/test.esp32-c3-idf.yaml @@ -1,26 +1 @@ -my9231: - clock_pin: 5 - data_pin: 4 - num_channels: 6 - num_chips: 2 - bit_depth: 16 - -output: - - platform: my9231 - id: my_0 - channel: 0 - - platform: my9231 - id: my_1 - channel: 1 - - platform: my9231 - id: my_2 - channel: 2 - - platform: my9231 - id: my_3 - channel: 3 - - platform: my9231 - id: my_4 - channel: 4 - - platform: my9231 - id: my_5 - channel: 5 +<<: !include common.yaml diff --git a/tests/components/my9231/test.esp32-c3.yaml b/tests/components/my9231/test.esp32-c3.yaml index 3f2e81ef9..dade44d14 100644 --- a/tests/components/my9231/test.esp32-c3.yaml +++ b/tests/components/my9231/test.esp32-c3.yaml @@ -1,26 +1 @@ -my9231: - clock_pin: 5 - data_pin: 4 - num_channels: 6 - num_chips: 2 - bit_depth: 16 - -output: - - platform: my9231 - id: my_0 - channel: 0 - - platform: my9231 - id: my_1 - channel: 1 - - platform: my9231 - id: my_2 - channel: 2 - - platform: my9231 - id: my_3 - channel: 3 - - platform: my9231 - id: my_4 - channel: 4 - - platform: my9231 - id: my_5 - channel: 5 +<<: !include common.yaml diff --git a/tests/components/my9231/test.esp32-idf.yaml b/tests/components/my9231/test.esp32-idf.yaml index 3f2e81ef9..dade44d14 100644 --- a/tests/components/my9231/test.esp32-idf.yaml +++ b/tests/components/my9231/test.esp32-idf.yaml @@ -1,26 +1 @@ -my9231: - clock_pin: 5 - data_pin: 4 - num_channels: 6 - num_chips: 2 - bit_depth: 16 - -output: - - platform: my9231 - id: my_0 - channel: 0 - - platform: my9231 - id: my_1 - channel: 1 - - platform: my9231 - id: my_2 - channel: 2 - - platform: my9231 - id: my_3 - channel: 3 - - platform: my9231 - id: my_4 - channel: 4 - - platform: my9231 - id: my_5 - channel: 5 +<<: !include common.yaml diff --git a/tests/components/my9231/test.esp32.yaml b/tests/components/my9231/test.esp32.yaml index 3f2e81ef9..dade44d14 100644 --- a/tests/components/my9231/test.esp32.yaml +++ b/tests/components/my9231/test.esp32.yaml @@ -1,26 +1 @@ -my9231: - clock_pin: 5 - data_pin: 4 - num_channels: 6 - num_chips: 2 - bit_depth: 16 - -output: - - platform: my9231 - id: my_0 - channel: 0 - - platform: my9231 - id: my_1 - channel: 1 - - platform: my9231 - id: my_2 - channel: 2 - - platform: my9231 - id: my_3 - channel: 3 - - platform: my9231 - id: my_4 - channel: 4 - - platform: my9231 - id: my_5 - channel: 5 +<<: !include common.yaml diff --git a/tests/components/my9231/test.esp8266.yaml b/tests/components/my9231/test.esp8266.yaml index 3f2e81ef9..dade44d14 100644 --- a/tests/components/my9231/test.esp8266.yaml +++ b/tests/components/my9231/test.esp8266.yaml @@ -1,26 +1 @@ -my9231: - clock_pin: 5 - data_pin: 4 - num_channels: 6 - num_chips: 2 - bit_depth: 16 - -output: - - platform: my9231 - id: my_0 - channel: 0 - - platform: my9231 - id: my_1 - channel: 1 - - platform: my9231 - id: my_2 - channel: 2 - - platform: my9231 - id: my_3 - channel: 3 - - platform: my9231 - id: my_4 - channel: 4 - - platform: my9231 - id: my_5 - channel: 5 +<<: !include common.yaml diff --git a/tests/components/my9231/test.rp2040.yaml b/tests/components/my9231/test.rp2040.yaml index 3f2e81ef9..dade44d14 100644 --- a/tests/components/my9231/test.rp2040.yaml +++ b/tests/components/my9231/test.rp2040.yaml @@ -1,26 +1 @@ -my9231: - clock_pin: 5 - data_pin: 4 - num_channels: 6 - num_chips: 2 - bit_depth: 16 - -output: - - platform: my9231 - id: my_0 - channel: 0 - - platform: my9231 - id: my_1 - channel: 1 - - platform: my9231 - id: my_2 - channel: 2 - - platform: my9231 - id: my_3 - channel: 3 - - platform: my9231 - id: my_4 - channel: 4 - - platform: my9231 - id: my_5 - channel: 5 +<<: !include common.yaml diff --git a/tests/components/network/common.yaml b/tests/components/network/common.yaml new file mode 100644 index 000000000..147afd1e8 --- /dev/null +++ b/tests/components/network/common.yaml @@ -0,0 +1,6 @@ +wifi: + ssid: MySSID + password: password1 + +network: + enable_ipv6: true diff --git a/tests/components/network/test.esp32-c3-idf.yaml b/tests/components/network/test.esp32-c3-idf.yaml index 147afd1e8..dade44d14 100644 --- a/tests/components/network/test.esp32-c3-idf.yaml +++ b/tests/components/network/test.esp32-c3-idf.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -network: - enable_ipv6: true +<<: !include common.yaml diff --git a/tests/components/network/test.esp32-c3.yaml b/tests/components/network/test.esp32-c3.yaml index 147afd1e8..dade44d14 100644 --- a/tests/components/network/test.esp32-c3.yaml +++ b/tests/components/network/test.esp32-c3.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -network: - enable_ipv6: true +<<: !include common.yaml diff --git a/tests/components/network/test.esp32-idf.yaml b/tests/components/network/test.esp32-idf.yaml index 147afd1e8..dade44d14 100644 --- a/tests/components/network/test.esp32-idf.yaml +++ b/tests/components/network/test.esp32-idf.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -network: - enable_ipv6: true +<<: !include common.yaml diff --git a/tests/components/network/test.esp32.yaml b/tests/components/network/test.esp32.yaml index 147afd1e8..dade44d14 100644 --- a/tests/components/network/test.esp32.yaml +++ b/tests/components/network/test.esp32.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -network: - enable_ipv6: true +<<: !include common.yaml diff --git a/tests/components/network/test.esp8266.yaml b/tests/components/network/test.esp8266.yaml index 147afd1e8..dade44d14 100644 --- a/tests/components/network/test.esp8266.yaml +++ b/tests/components/network/test.esp8266.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -network: - enable_ipv6: true +<<: !include common.yaml diff --git a/tests/components/network/test.rp2040.yaml b/tests/components/network/test.rp2040.yaml index 147afd1e8..dade44d14 100644 --- a/tests/components/network/test.rp2040.yaml +++ b/tests/components/network/test.rp2040.yaml @@ -1,6 +1 @@ -wifi: - ssid: MySSID - password: password1 - -network: - enable_ipv6: true +<<: !include common.yaml diff --git a/tests/components/noblex/common.yaml b/tests/components/noblex/common.yaml new file mode 100644 index 000000000..f5e471a9a --- /dev/null +++ b/tests/components/noblex/common.yaml @@ -0,0 +1,20 @@ +remote_receiver: + id: rcvr + pin: 4 + dump: all + +remote_transmitter: + pin: 2 + carrier_duty_percent: 50% + +sensor: + - platform: template + id: noblex_ac_sensor + lambda: "return 21;" + +climate: + - platform: noblex + name: AC Living + id: noblex_ac + sensor: noblex_ac_sensor + receiver_id: rcvr diff --git a/tests/components/noblex/test.esp32-c3-idf.yaml b/tests/components/noblex/test.esp32-c3-idf.yaml index f5e471a9a..dade44d14 100644 --- a/tests/components/noblex/test.esp32-c3-idf.yaml +++ b/tests/components/noblex/test.esp32-c3-idf.yaml @@ -1,20 +1 @@ -remote_receiver: - id: rcvr - pin: 4 - dump: all - -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% - -sensor: - - platform: template - id: noblex_ac_sensor - lambda: "return 21;" - -climate: - - platform: noblex - name: AC Living - id: noblex_ac - sensor: noblex_ac_sensor - receiver_id: rcvr +<<: !include common.yaml diff --git a/tests/components/noblex/test.esp32-c3.yaml b/tests/components/noblex/test.esp32-c3.yaml index f5e471a9a..dade44d14 100644 --- a/tests/components/noblex/test.esp32-c3.yaml +++ b/tests/components/noblex/test.esp32-c3.yaml @@ -1,20 +1 @@ -remote_receiver: - id: rcvr - pin: 4 - dump: all - -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% - -sensor: - - platform: template - id: noblex_ac_sensor - lambda: "return 21;" - -climate: - - platform: noblex - name: AC Living - id: noblex_ac - sensor: noblex_ac_sensor - receiver_id: rcvr +<<: !include common.yaml diff --git a/tests/components/noblex/test.esp32-idf.yaml b/tests/components/noblex/test.esp32-idf.yaml index f5e471a9a..dade44d14 100644 --- a/tests/components/noblex/test.esp32-idf.yaml +++ b/tests/components/noblex/test.esp32-idf.yaml @@ -1,20 +1 @@ -remote_receiver: - id: rcvr - pin: 4 - dump: all - -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% - -sensor: - - platform: template - id: noblex_ac_sensor - lambda: "return 21;" - -climate: - - platform: noblex - name: AC Living - id: noblex_ac - sensor: noblex_ac_sensor - receiver_id: rcvr +<<: !include common.yaml diff --git a/tests/components/noblex/test.esp32.yaml b/tests/components/noblex/test.esp32.yaml index f5e471a9a..dade44d14 100644 --- a/tests/components/noblex/test.esp32.yaml +++ b/tests/components/noblex/test.esp32.yaml @@ -1,20 +1 @@ -remote_receiver: - id: rcvr - pin: 4 - dump: all - -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% - -sensor: - - platform: template - id: noblex_ac_sensor - lambda: "return 21;" - -climate: - - platform: noblex - name: AC Living - id: noblex_ac - sensor: noblex_ac_sensor - receiver_id: rcvr +<<: !include common.yaml diff --git a/tests/components/noblex/test.esp8266.yaml b/tests/components/noblex/test.esp8266.yaml index f5e471a9a..dade44d14 100644 --- a/tests/components/noblex/test.esp8266.yaml +++ b/tests/components/noblex/test.esp8266.yaml @@ -1,20 +1 @@ -remote_receiver: - id: rcvr - pin: 4 - dump: all - -remote_transmitter: - pin: 2 - carrier_duty_percent: 50% - -sensor: - - platform: template - id: noblex_ac_sensor - lambda: "return 21;" - -climate: - - platform: noblex - name: AC Living - id: noblex_ac - sensor: noblex_ac_sensor - receiver_id: rcvr +<<: !include common.yaml diff --git a/tests/components/ota/common.yaml b/tests/components/ota/common.yaml new file mode 100644 index 000000000..367454995 --- /dev/null +++ b/tests/components/ota/common.yaml @@ -0,0 +1,30 @@ +wifi: + ssid: MySSID + password: password1 + +ota: + safe_mode: true + password: "superlongpasswordthatnoonewillknow" + port: 3286 + reboot_timeout: 2min + num_attempts: 5 + on_begin: + then: + - logger.log: "OTA start" + on_progress: + then: + - logger.log: + format: "OTA progress %0.1f%%" + args: ["x"] + on_end: + then: + - logger.log: "OTA end" + on_error: + then: + - logger.log: + format: "OTA update error %d" + args: ["x"] + on_state_change: + then: + lambda: >- + ESP_LOGD("ota", "State %d", state); diff --git a/tests/components/ota/test.esp32-c3-idf.yaml b/tests/components/ota/test.esp32-c3-idf.yaml index 367454995..dade44d14 100644 --- a/tests/components/ota/test.esp32-c3-idf.yaml +++ b/tests/components/ota/test.esp32-c3-idf.yaml @@ -1,30 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - safe_mode: true - password: "superlongpasswordthatnoonewillknow" - port: 3286 - reboot_timeout: 2min - num_attempts: 5 - on_begin: - then: - - logger.log: "OTA start" - on_progress: - then: - - logger.log: - format: "OTA progress %0.1f%%" - args: ["x"] - on_end: - then: - - logger.log: "OTA end" - on_error: - then: - - logger.log: - format: "OTA update error %d" - args: ["x"] - on_state_change: - then: - lambda: >- - ESP_LOGD("ota", "State %d", state); +<<: !include common.yaml diff --git a/tests/components/ota/test.esp32-c3.yaml b/tests/components/ota/test.esp32-c3.yaml index 367454995..dade44d14 100644 --- a/tests/components/ota/test.esp32-c3.yaml +++ b/tests/components/ota/test.esp32-c3.yaml @@ -1,30 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - safe_mode: true - password: "superlongpasswordthatnoonewillknow" - port: 3286 - reboot_timeout: 2min - num_attempts: 5 - on_begin: - then: - - logger.log: "OTA start" - on_progress: - then: - - logger.log: - format: "OTA progress %0.1f%%" - args: ["x"] - on_end: - then: - - logger.log: "OTA end" - on_error: - then: - - logger.log: - format: "OTA update error %d" - args: ["x"] - on_state_change: - then: - lambda: >- - ESP_LOGD("ota", "State %d", state); +<<: !include common.yaml diff --git a/tests/components/ota/test.esp32-idf.yaml b/tests/components/ota/test.esp32-idf.yaml index 367454995..dade44d14 100644 --- a/tests/components/ota/test.esp32-idf.yaml +++ b/tests/components/ota/test.esp32-idf.yaml @@ -1,30 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - safe_mode: true - password: "superlongpasswordthatnoonewillknow" - port: 3286 - reboot_timeout: 2min - num_attempts: 5 - on_begin: - then: - - logger.log: "OTA start" - on_progress: - then: - - logger.log: - format: "OTA progress %0.1f%%" - args: ["x"] - on_end: - then: - - logger.log: "OTA end" - on_error: - then: - - logger.log: - format: "OTA update error %d" - args: ["x"] - on_state_change: - then: - lambda: >- - ESP_LOGD("ota", "State %d", state); +<<: !include common.yaml diff --git a/tests/components/ota/test.esp32.yaml b/tests/components/ota/test.esp32.yaml index 367454995..dade44d14 100644 --- a/tests/components/ota/test.esp32.yaml +++ b/tests/components/ota/test.esp32.yaml @@ -1,30 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - safe_mode: true - password: "superlongpasswordthatnoonewillknow" - port: 3286 - reboot_timeout: 2min - num_attempts: 5 - on_begin: - then: - - logger.log: "OTA start" - on_progress: - then: - - logger.log: - format: "OTA progress %0.1f%%" - args: ["x"] - on_end: - then: - - logger.log: "OTA end" - on_error: - then: - - logger.log: - format: "OTA update error %d" - args: ["x"] - on_state_change: - then: - lambda: >- - ESP_LOGD("ota", "State %d", state); +<<: !include common.yaml diff --git a/tests/components/ota/test.esp8266.yaml b/tests/components/ota/test.esp8266.yaml index 367454995..dade44d14 100644 --- a/tests/components/ota/test.esp8266.yaml +++ b/tests/components/ota/test.esp8266.yaml @@ -1,30 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - safe_mode: true - password: "superlongpasswordthatnoonewillknow" - port: 3286 - reboot_timeout: 2min - num_attempts: 5 - on_begin: - then: - - logger.log: "OTA start" - on_progress: - then: - - logger.log: - format: "OTA progress %0.1f%%" - args: ["x"] - on_end: - then: - - logger.log: "OTA end" - on_error: - then: - - logger.log: - format: "OTA update error %d" - args: ["x"] - on_state_change: - then: - lambda: >- - ESP_LOGD("ota", "State %d", state); +<<: !include common.yaml diff --git a/tests/components/ota/test.rp2040.yaml b/tests/components/ota/test.rp2040.yaml index 367454995..dade44d14 100644 --- a/tests/components/ota/test.rp2040.yaml +++ b/tests/components/ota/test.rp2040.yaml @@ -1,30 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - safe_mode: true - password: "superlongpasswordthatnoonewillknow" - port: 3286 - reboot_timeout: 2min - num_attempts: 5 - on_begin: - then: - - logger.log: "OTA start" - on_progress: - then: - - logger.log: - format: "OTA progress %0.1f%%" - args: ["x"] - on_end: - then: - - logger.log: "OTA end" - on_error: - then: - - logger.log: - format: "OTA update error %d" - args: ["x"] - on_state_change: - then: - lambda: >- - ESP_LOGD("ota", "State %d", state); +<<: !include common.yaml diff --git a/tests/components/pid/common.yaml b/tests/components/pid/common.yaml new file mode 100644 index 000000000..5f7762872 --- /dev/null +++ b/tests/components/pid/common.yaml @@ -0,0 +1,56 @@ +esphome: + on_boot: + then: + - climate.pid.autotune: pid_climate + - climate.pid.autotune: + id: pid_climate + noiseband: 0.25 + positive_output: 25% + negative_output: -25% + - climate.pid.set_control_parameters: + id: pid_climate + kp: 0.0 + ki: 0.0 + kd: 0.0 + - climate.pid.reset_integral_term: pid_climate + +output: + - platform: slow_pwm + pin: 4 + id: pid_slow_pwm + period: 15s + restart_cycle_on_state_change: false + +sensor: + - platform: template + id: template_sensor1 + lambda: |- + if (millis() > 10000) { + return 42.0; + } else { + return 0.0; + } + update_interval: 60s + +climate: + - platform: pid + id: pid_climate + name: PID Climate Controller + sensor: template_sensor1 + humidity_sensor: template_sensor1 + default_target_temperature: 21°C + heat_output: pid_slow_pwm + control_parameters: + kp: 0.0 + ki: 0.0 + kd: 0.0 + max_integral: 0.0 + output_averaging_samples: 1 + derivative_averaging_samples: 1 + deadband_parameters: + threshold_high: 0.4 + threshold_low: -2.0 + kp_multiplier: 0.0 + ki_multiplier: 0.0 + kd_multiplier: 0.0 + deadband_output_averaging_samples: 1 diff --git a/tests/components/pid/test.esp32-c3-idf.yaml b/tests/components/pid/test.esp32-c3-idf.yaml index 5f7762872..dade44d14 100644 --- a/tests/components/pid/test.esp32-c3-idf.yaml +++ b/tests/components/pid/test.esp32-c3-idf.yaml @@ -1,56 +1 @@ -esphome: - on_boot: - then: - - climate.pid.autotune: pid_climate - - climate.pid.autotune: - id: pid_climate - noiseband: 0.25 - positive_output: 25% - negative_output: -25% - - climate.pid.set_control_parameters: - id: pid_climate - kp: 0.0 - ki: 0.0 - kd: 0.0 - - climate.pid.reset_integral_term: pid_climate - -output: - - platform: slow_pwm - pin: 4 - id: pid_slow_pwm - period: 15s - restart_cycle_on_state_change: false - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: pid - id: pid_climate - name: PID Climate Controller - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature: 21°C - heat_output: pid_slow_pwm - control_parameters: - kp: 0.0 - ki: 0.0 - kd: 0.0 - max_integral: 0.0 - output_averaging_samples: 1 - derivative_averaging_samples: 1 - deadband_parameters: - threshold_high: 0.4 - threshold_low: -2.0 - kp_multiplier: 0.0 - ki_multiplier: 0.0 - kd_multiplier: 0.0 - deadband_output_averaging_samples: 1 +<<: !include common.yaml diff --git a/tests/components/pid/test.esp32-c3.yaml b/tests/components/pid/test.esp32-c3.yaml index 5f7762872..dade44d14 100644 --- a/tests/components/pid/test.esp32-c3.yaml +++ b/tests/components/pid/test.esp32-c3.yaml @@ -1,56 +1 @@ -esphome: - on_boot: - then: - - climate.pid.autotune: pid_climate - - climate.pid.autotune: - id: pid_climate - noiseband: 0.25 - positive_output: 25% - negative_output: -25% - - climate.pid.set_control_parameters: - id: pid_climate - kp: 0.0 - ki: 0.0 - kd: 0.0 - - climate.pid.reset_integral_term: pid_climate - -output: - - platform: slow_pwm - pin: 4 - id: pid_slow_pwm - period: 15s - restart_cycle_on_state_change: false - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: pid - id: pid_climate - name: PID Climate Controller - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature: 21°C - heat_output: pid_slow_pwm - control_parameters: - kp: 0.0 - ki: 0.0 - kd: 0.0 - max_integral: 0.0 - output_averaging_samples: 1 - derivative_averaging_samples: 1 - deadband_parameters: - threshold_high: 0.4 - threshold_low: -2.0 - kp_multiplier: 0.0 - ki_multiplier: 0.0 - kd_multiplier: 0.0 - deadband_output_averaging_samples: 1 +<<: !include common.yaml diff --git a/tests/components/pid/test.esp32-idf.yaml b/tests/components/pid/test.esp32-idf.yaml index 5f7762872..dade44d14 100644 --- a/tests/components/pid/test.esp32-idf.yaml +++ b/tests/components/pid/test.esp32-idf.yaml @@ -1,56 +1 @@ -esphome: - on_boot: - then: - - climate.pid.autotune: pid_climate - - climate.pid.autotune: - id: pid_climate - noiseband: 0.25 - positive_output: 25% - negative_output: -25% - - climate.pid.set_control_parameters: - id: pid_climate - kp: 0.0 - ki: 0.0 - kd: 0.0 - - climate.pid.reset_integral_term: pid_climate - -output: - - platform: slow_pwm - pin: 4 - id: pid_slow_pwm - period: 15s - restart_cycle_on_state_change: false - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: pid - id: pid_climate - name: PID Climate Controller - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature: 21°C - heat_output: pid_slow_pwm - control_parameters: - kp: 0.0 - ki: 0.0 - kd: 0.0 - max_integral: 0.0 - output_averaging_samples: 1 - derivative_averaging_samples: 1 - deadband_parameters: - threshold_high: 0.4 - threshold_low: -2.0 - kp_multiplier: 0.0 - ki_multiplier: 0.0 - kd_multiplier: 0.0 - deadband_output_averaging_samples: 1 +<<: !include common.yaml diff --git a/tests/components/pid/test.esp32.yaml b/tests/components/pid/test.esp32.yaml index 5f7762872..dade44d14 100644 --- a/tests/components/pid/test.esp32.yaml +++ b/tests/components/pid/test.esp32.yaml @@ -1,56 +1 @@ -esphome: - on_boot: - then: - - climate.pid.autotune: pid_climate - - climate.pid.autotune: - id: pid_climate - noiseband: 0.25 - positive_output: 25% - negative_output: -25% - - climate.pid.set_control_parameters: - id: pid_climate - kp: 0.0 - ki: 0.0 - kd: 0.0 - - climate.pid.reset_integral_term: pid_climate - -output: - - platform: slow_pwm - pin: 4 - id: pid_slow_pwm - period: 15s - restart_cycle_on_state_change: false - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: pid - id: pid_climate - name: PID Climate Controller - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature: 21°C - heat_output: pid_slow_pwm - control_parameters: - kp: 0.0 - ki: 0.0 - kd: 0.0 - max_integral: 0.0 - output_averaging_samples: 1 - derivative_averaging_samples: 1 - deadband_parameters: - threshold_high: 0.4 - threshold_low: -2.0 - kp_multiplier: 0.0 - ki_multiplier: 0.0 - kd_multiplier: 0.0 - deadband_output_averaging_samples: 1 +<<: !include common.yaml diff --git a/tests/components/pid/test.esp8266.yaml b/tests/components/pid/test.esp8266.yaml index 5f7762872..dade44d14 100644 --- a/tests/components/pid/test.esp8266.yaml +++ b/tests/components/pid/test.esp8266.yaml @@ -1,56 +1 @@ -esphome: - on_boot: - then: - - climate.pid.autotune: pid_climate - - climate.pid.autotune: - id: pid_climate - noiseband: 0.25 - positive_output: 25% - negative_output: -25% - - climate.pid.set_control_parameters: - id: pid_climate - kp: 0.0 - ki: 0.0 - kd: 0.0 - - climate.pid.reset_integral_term: pid_climate - -output: - - platform: slow_pwm - pin: 4 - id: pid_slow_pwm - period: 15s - restart_cycle_on_state_change: false - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: pid - id: pid_climate - name: PID Climate Controller - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature: 21°C - heat_output: pid_slow_pwm - control_parameters: - kp: 0.0 - ki: 0.0 - kd: 0.0 - max_integral: 0.0 - output_averaging_samples: 1 - derivative_averaging_samples: 1 - deadband_parameters: - threshold_high: 0.4 - threshold_low: -2.0 - kp_multiplier: 0.0 - ki_multiplier: 0.0 - kd_multiplier: 0.0 - deadband_output_averaging_samples: 1 +<<: !include common.yaml diff --git a/tests/components/pid/test.rp2040.yaml b/tests/components/pid/test.rp2040.yaml index 5f7762872..dade44d14 100644 --- a/tests/components/pid/test.rp2040.yaml +++ b/tests/components/pid/test.rp2040.yaml @@ -1,56 +1 @@ -esphome: - on_boot: - then: - - climate.pid.autotune: pid_climate - - climate.pid.autotune: - id: pid_climate - noiseband: 0.25 - positive_output: 25% - negative_output: -25% - - climate.pid.set_control_parameters: - id: pid_climate - kp: 0.0 - ki: 0.0 - kd: 0.0 - - climate.pid.reset_integral_term: pid_climate - -output: - - platform: slow_pwm - pin: 4 - id: pid_slow_pwm - period: 15s - restart_cycle_on_state_change: false - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -climate: - - platform: pid - id: pid_climate - name: PID Climate Controller - sensor: template_sensor1 - humidity_sensor: template_sensor1 - default_target_temperature: 21°C - heat_output: pid_slow_pwm - control_parameters: - kp: 0.0 - ki: 0.0 - kd: 0.0 - max_integral: 0.0 - output_averaging_samples: 1 - derivative_averaging_samples: 1 - deadband_parameters: - threshold_high: 0.4 - threshold_low: -2.0 - kp_multiplier: 0.0 - ki_multiplier: 0.0 - kd_multiplier: 0.0 - deadband_output_averaging_samples: 1 +<<: !include common.yaml diff --git a/tests/components/power_supply/common.yaml b/tests/components/power_supply/common.yaml new file mode 100644 index 000000000..3fefc4d42 --- /dev/null +++ b/tests/components/power_supply/common.yaml @@ -0,0 +1,6 @@ +power_supply: + - id: atx_power_supply + enable_time: 20ms + keep_on_time: 10s + enable_on_boot: true + pin: 4 diff --git a/tests/components/power_supply/test.esp32-c3-idf.yaml b/tests/components/power_supply/test.esp32-c3-idf.yaml index 3fefc4d42..dade44d14 100644 --- a/tests/components/power_supply/test.esp32-c3-idf.yaml +++ b/tests/components/power_supply/test.esp32-c3-idf.yaml @@ -1,6 +1 @@ -power_supply: - - id: atx_power_supply - enable_time: 20ms - keep_on_time: 10s - enable_on_boot: true - pin: 4 +<<: !include common.yaml diff --git a/tests/components/power_supply/test.esp32-c3.yaml b/tests/components/power_supply/test.esp32-c3.yaml index 3fefc4d42..dade44d14 100644 --- a/tests/components/power_supply/test.esp32-c3.yaml +++ b/tests/components/power_supply/test.esp32-c3.yaml @@ -1,6 +1 @@ -power_supply: - - id: atx_power_supply - enable_time: 20ms - keep_on_time: 10s - enable_on_boot: true - pin: 4 +<<: !include common.yaml diff --git a/tests/components/power_supply/test.esp32-idf.yaml b/tests/components/power_supply/test.esp32-idf.yaml index 3fefc4d42..dade44d14 100644 --- a/tests/components/power_supply/test.esp32-idf.yaml +++ b/tests/components/power_supply/test.esp32-idf.yaml @@ -1,6 +1 @@ -power_supply: - - id: atx_power_supply - enable_time: 20ms - keep_on_time: 10s - enable_on_boot: true - pin: 4 +<<: !include common.yaml diff --git a/tests/components/power_supply/test.esp32.yaml b/tests/components/power_supply/test.esp32.yaml index 3fefc4d42..dade44d14 100644 --- a/tests/components/power_supply/test.esp32.yaml +++ b/tests/components/power_supply/test.esp32.yaml @@ -1,6 +1 @@ -power_supply: - - id: atx_power_supply - enable_time: 20ms - keep_on_time: 10s - enable_on_boot: true - pin: 4 +<<: !include common.yaml diff --git a/tests/components/power_supply/test.esp8266.yaml b/tests/components/power_supply/test.esp8266.yaml index 3fefc4d42..dade44d14 100644 --- a/tests/components/power_supply/test.esp8266.yaml +++ b/tests/components/power_supply/test.esp8266.yaml @@ -1,6 +1 @@ -power_supply: - - id: atx_power_supply - enable_time: 20ms - keep_on_time: 10s - enable_on_boot: true - pin: 4 +<<: !include common.yaml diff --git a/tests/components/power_supply/test.rp2040.yaml b/tests/components/power_supply/test.rp2040.yaml index 3fefc4d42..dade44d14 100644 --- a/tests/components/power_supply/test.rp2040.yaml +++ b/tests/components/power_supply/test.rp2040.yaml @@ -1,6 +1 @@ -power_supply: - - id: atx_power_supply - enable_time: 20ms - keep_on_time: 10s - enable_on_boot: true - pin: 4 +<<: !include common.yaml diff --git a/tests/components/prometheus/common.yaml b/tests/components/prometheus/common.yaml new file mode 100644 index 000000000..c8ce17da8 --- /dev/null +++ b/tests/components/prometheus/common.yaml @@ -0,0 +1,21 @@ +wifi: + ssid: MySSID + password: password1 + +sensor: + - platform: template + id: template_sensor1 + lambda: |- + if (millis() > 10000) { + return 42.0; + } else { + return 0.0; + } + update_interval: 60s + +prometheus: + include_internal: true + relabel: + template_sensor1: + id: hellow_world + name: Hello World diff --git a/tests/components/prometheus/test.esp32-c3-idf.yaml b/tests/components/prometheus/test.esp32-c3-idf.yaml index c8ce17da8..dade44d14 100644 --- a/tests/components/prometheus/test.esp32-c3-idf.yaml +++ b/tests/components/prometheus/test.esp32-c3-idf.yaml @@ -1,21 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -prometheus: - include_internal: true - relabel: - template_sensor1: - id: hellow_world - name: Hello World +<<: !include common.yaml diff --git a/tests/components/prometheus/test.esp32-c3.yaml b/tests/components/prometheus/test.esp32-c3.yaml index c8ce17da8..dade44d14 100644 --- a/tests/components/prometheus/test.esp32-c3.yaml +++ b/tests/components/prometheus/test.esp32-c3.yaml @@ -1,21 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -prometheus: - include_internal: true - relabel: - template_sensor1: - id: hellow_world - name: Hello World +<<: !include common.yaml diff --git a/tests/components/prometheus/test.esp32-idf.yaml b/tests/components/prometheus/test.esp32-idf.yaml index c8ce17da8..dade44d14 100644 --- a/tests/components/prometheus/test.esp32-idf.yaml +++ b/tests/components/prometheus/test.esp32-idf.yaml @@ -1,21 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -prometheus: - include_internal: true - relabel: - template_sensor1: - id: hellow_world - name: Hello World +<<: !include common.yaml diff --git a/tests/components/prometheus/test.esp32.yaml b/tests/components/prometheus/test.esp32.yaml index c8ce17da8..dade44d14 100644 --- a/tests/components/prometheus/test.esp32.yaml +++ b/tests/components/prometheus/test.esp32.yaml @@ -1,21 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -prometheus: - include_internal: true - relabel: - template_sensor1: - id: hellow_world - name: Hello World +<<: !include common.yaml diff --git a/tests/components/prometheus/test.esp8266.yaml b/tests/components/prometheus/test.esp8266.yaml index c8ce17da8..dade44d14 100644 --- a/tests/components/prometheus/test.esp8266.yaml +++ b/tests/components/prometheus/test.esp8266.yaml @@ -1,21 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: template - id: template_sensor1 - lambda: |- - if (millis() > 10000) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - -prometheus: - include_internal: true - relabel: - template_sensor1: - id: hellow_world - name: Hello World +<<: !include common.yaml diff --git a/tests/components/psram/common.yaml b/tests/components/psram/common.yaml new file mode 100644 index 000000000..cfd39f77f --- /dev/null +++ b/tests/components/psram/common.yaml @@ -0,0 +1,3 @@ +psram: + mode: octal + speed: 80MHz diff --git a/tests/components/psram/test.esp32-c3-idf.yaml b/tests/components/psram/test.esp32-c3-idf.yaml index cfd39f77f..dade44d14 100644 --- a/tests/components/psram/test.esp32-c3-idf.yaml +++ b/tests/components/psram/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -psram: - mode: octal - speed: 80MHz +<<: !include common.yaml diff --git a/tests/components/psram/test.esp32-c3.yaml b/tests/components/psram/test.esp32-c3.yaml index cfd39f77f..dade44d14 100644 --- a/tests/components/psram/test.esp32-c3.yaml +++ b/tests/components/psram/test.esp32-c3.yaml @@ -1,3 +1 @@ -psram: - mode: octal - speed: 80MHz +<<: !include common.yaml diff --git a/tests/components/psram/test.esp32-idf.yaml b/tests/components/psram/test.esp32-idf.yaml index cfd39f77f..dade44d14 100644 --- a/tests/components/psram/test.esp32-idf.yaml +++ b/tests/components/psram/test.esp32-idf.yaml @@ -1,3 +1 @@ -psram: - mode: octal - speed: 80MHz +<<: !include common.yaml diff --git a/tests/components/psram/test.esp32.yaml b/tests/components/psram/test.esp32.yaml index cfd39f77f..dade44d14 100644 --- a/tests/components/psram/test.esp32.yaml +++ b/tests/components/psram/test.esp32.yaml @@ -1,3 +1 @@ -psram: - mode: octal - speed: 80MHz +<<: !include common.yaml diff --git a/tests/components/pulse_counter/common.yaml b/tests/components/pulse_counter/common.yaml new file mode 100644 index 000000000..556b43ee6 --- /dev/null +++ b/tests/components/pulse_counter/common.yaml @@ -0,0 +1,9 @@ +sensor: + - platform: pulse_counter + name: Pulse Counter + pin: 4 + count_mode: + rising_edge: INCREMENT + falling_edge: DECREMENT + internal_filter: 13us + update_interval: 15s diff --git a/tests/components/pulse_counter/test.esp32-c3-idf.yaml b/tests/components/pulse_counter/test.esp32-c3-idf.yaml index 556b43ee6..dade44d14 100644 --- a/tests/components/pulse_counter/test.esp32-c3-idf.yaml +++ b/tests/components/pulse_counter/test.esp32-c3-idf.yaml @@ -1,9 +1 @@ -sensor: - - platform: pulse_counter - name: Pulse Counter - pin: 4 - count_mode: - rising_edge: INCREMENT - falling_edge: DECREMENT - internal_filter: 13us - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/pulse_counter/test.esp32-c3.yaml b/tests/components/pulse_counter/test.esp32-c3.yaml index 556b43ee6..dade44d14 100644 --- a/tests/components/pulse_counter/test.esp32-c3.yaml +++ b/tests/components/pulse_counter/test.esp32-c3.yaml @@ -1,9 +1 @@ -sensor: - - platform: pulse_counter - name: Pulse Counter - pin: 4 - count_mode: - rising_edge: INCREMENT - falling_edge: DECREMENT - internal_filter: 13us - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/pulse_counter/test.esp32-idf.yaml b/tests/components/pulse_counter/test.esp32-idf.yaml index 556b43ee6..dade44d14 100644 --- a/tests/components/pulse_counter/test.esp32-idf.yaml +++ b/tests/components/pulse_counter/test.esp32-idf.yaml @@ -1,9 +1 @@ -sensor: - - platform: pulse_counter - name: Pulse Counter - pin: 4 - count_mode: - rising_edge: INCREMENT - falling_edge: DECREMENT - internal_filter: 13us - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/pulse_counter/test.esp32.yaml b/tests/components/pulse_counter/test.esp32.yaml index 556b43ee6..dade44d14 100644 --- a/tests/components/pulse_counter/test.esp32.yaml +++ b/tests/components/pulse_counter/test.esp32.yaml @@ -1,9 +1 @@ -sensor: - - platform: pulse_counter - name: Pulse Counter - pin: 4 - count_mode: - rising_edge: INCREMENT - falling_edge: DECREMENT - internal_filter: 13us - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/pulse_counter/test.esp8266.yaml b/tests/components/pulse_counter/test.esp8266.yaml index 556b43ee6..dade44d14 100644 --- a/tests/components/pulse_counter/test.esp8266.yaml +++ b/tests/components/pulse_counter/test.esp8266.yaml @@ -1,9 +1 @@ -sensor: - - platform: pulse_counter - name: Pulse Counter - pin: 4 - count_mode: - rising_edge: INCREMENT - falling_edge: DECREMENT - internal_filter: 13us - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/pulse_counter/test.rp2040.yaml b/tests/components/pulse_counter/test.rp2040.yaml index 556b43ee6..dade44d14 100644 --- a/tests/components/pulse_counter/test.rp2040.yaml +++ b/tests/components/pulse_counter/test.rp2040.yaml @@ -1,9 +1 @@ -sensor: - - platform: pulse_counter - name: Pulse Counter - pin: 4 - count_mode: - rising_edge: INCREMENT - falling_edge: DECREMENT - internal_filter: 13us - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/pulse_meter/common.yaml b/tests/components/pulse_meter/common.yaml new file mode 100644 index 000000000..a83ec478b --- /dev/null +++ b/tests/components/pulse_meter/common.yaml @@ -0,0 +1,13 @@ +sensor: + - platform: pulse_meter + id: pulse_meter_sensor + name: Pulse Meter + pin: 4 + internal_filter: 100ms + timeout: 2 min + on_value: + - pulse_meter.set_total_pulses: + id: pulse_meter_sensor + value: 12345 + total: + name: Pulse Meter Total diff --git a/tests/components/pulse_meter/test.esp32-c3-idf.yaml b/tests/components/pulse_meter/test.esp32-c3-idf.yaml index a83ec478b..dade44d14 100644 --- a/tests/components/pulse_meter/test.esp32-c3-idf.yaml +++ b/tests/components/pulse_meter/test.esp32-c3-idf.yaml @@ -1,13 +1 @@ -sensor: - - platform: pulse_meter - id: pulse_meter_sensor - name: Pulse Meter - pin: 4 - internal_filter: 100ms - timeout: 2 min - on_value: - - pulse_meter.set_total_pulses: - id: pulse_meter_sensor - value: 12345 - total: - name: Pulse Meter Total +<<: !include common.yaml diff --git a/tests/components/pulse_meter/test.esp32-c3.yaml b/tests/components/pulse_meter/test.esp32-c3.yaml index a83ec478b..dade44d14 100644 --- a/tests/components/pulse_meter/test.esp32-c3.yaml +++ b/tests/components/pulse_meter/test.esp32-c3.yaml @@ -1,13 +1 @@ -sensor: - - platform: pulse_meter - id: pulse_meter_sensor - name: Pulse Meter - pin: 4 - internal_filter: 100ms - timeout: 2 min - on_value: - - pulse_meter.set_total_pulses: - id: pulse_meter_sensor - value: 12345 - total: - name: Pulse Meter Total +<<: !include common.yaml diff --git a/tests/components/pulse_meter/test.esp32-idf.yaml b/tests/components/pulse_meter/test.esp32-idf.yaml index a83ec478b..dade44d14 100644 --- a/tests/components/pulse_meter/test.esp32-idf.yaml +++ b/tests/components/pulse_meter/test.esp32-idf.yaml @@ -1,13 +1 @@ -sensor: - - platform: pulse_meter - id: pulse_meter_sensor - name: Pulse Meter - pin: 4 - internal_filter: 100ms - timeout: 2 min - on_value: - - pulse_meter.set_total_pulses: - id: pulse_meter_sensor - value: 12345 - total: - name: Pulse Meter Total +<<: !include common.yaml diff --git a/tests/components/pulse_meter/test.esp32.yaml b/tests/components/pulse_meter/test.esp32.yaml index a83ec478b..dade44d14 100644 --- a/tests/components/pulse_meter/test.esp32.yaml +++ b/tests/components/pulse_meter/test.esp32.yaml @@ -1,13 +1 @@ -sensor: - - platform: pulse_meter - id: pulse_meter_sensor - name: Pulse Meter - pin: 4 - internal_filter: 100ms - timeout: 2 min - on_value: - - pulse_meter.set_total_pulses: - id: pulse_meter_sensor - value: 12345 - total: - name: Pulse Meter Total +<<: !include common.yaml diff --git a/tests/components/pulse_meter/test.esp8266.yaml b/tests/components/pulse_meter/test.esp8266.yaml index a83ec478b..dade44d14 100644 --- a/tests/components/pulse_meter/test.esp8266.yaml +++ b/tests/components/pulse_meter/test.esp8266.yaml @@ -1,13 +1 @@ -sensor: - - platform: pulse_meter - id: pulse_meter_sensor - name: Pulse Meter - pin: 4 - internal_filter: 100ms - timeout: 2 min - on_value: - - pulse_meter.set_total_pulses: - id: pulse_meter_sensor - value: 12345 - total: - name: Pulse Meter Total +<<: !include common.yaml diff --git a/tests/components/pulse_meter/test.rp2040.yaml b/tests/components/pulse_meter/test.rp2040.yaml index a83ec478b..dade44d14 100644 --- a/tests/components/pulse_meter/test.rp2040.yaml +++ b/tests/components/pulse_meter/test.rp2040.yaml @@ -1,13 +1 @@ -sensor: - - platform: pulse_meter - id: pulse_meter_sensor - name: Pulse Meter - pin: 4 - internal_filter: 100ms - timeout: 2 min - on_value: - - pulse_meter.set_total_pulses: - id: pulse_meter_sensor - value: 12345 - total: - name: Pulse Meter Total +<<: !include common.yaml diff --git a/tests/components/pulse_width/common.yaml b/tests/components/pulse_width/common.yaml new file mode 100644 index 000000000..fbda7cda2 --- /dev/null +++ b/tests/components/pulse_width/common.yaml @@ -0,0 +1,4 @@ +sensor: + - platform: pulse_width + name: Pulse Width + pin: 4 diff --git a/tests/components/pulse_width/test.esp32-c3-idf.yaml b/tests/components/pulse_width/test.esp32-c3-idf.yaml index fbda7cda2..dade44d14 100644 --- a/tests/components/pulse_width/test.esp32-c3-idf.yaml +++ b/tests/components/pulse_width/test.esp32-c3-idf.yaml @@ -1,4 +1 @@ -sensor: - - platform: pulse_width - name: Pulse Width - pin: 4 +<<: !include common.yaml diff --git a/tests/components/pulse_width/test.esp32-c3.yaml b/tests/components/pulse_width/test.esp32-c3.yaml index fbda7cda2..dade44d14 100644 --- a/tests/components/pulse_width/test.esp32-c3.yaml +++ b/tests/components/pulse_width/test.esp32-c3.yaml @@ -1,4 +1 @@ -sensor: - - platform: pulse_width - name: Pulse Width - pin: 4 +<<: !include common.yaml diff --git a/tests/components/pulse_width/test.esp32-idf.yaml b/tests/components/pulse_width/test.esp32-idf.yaml index fbda7cda2..dade44d14 100644 --- a/tests/components/pulse_width/test.esp32-idf.yaml +++ b/tests/components/pulse_width/test.esp32-idf.yaml @@ -1,4 +1 @@ -sensor: - - platform: pulse_width - name: Pulse Width - pin: 4 +<<: !include common.yaml diff --git a/tests/components/pulse_width/test.esp32.yaml b/tests/components/pulse_width/test.esp32.yaml index fbda7cda2..dade44d14 100644 --- a/tests/components/pulse_width/test.esp32.yaml +++ b/tests/components/pulse_width/test.esp32.yaml @@ -1,4 +1 @@ -sensor: - - platform: pulse_width - name: Pulse Width - pin: 4 +<<: !include common.yaml diff --git a/tests/components/pulse_width/test.esp8266.yaml b/tests/components/pulse_width/test.esp8266.yaml index fbda7cda2..dade44d14 100644 --- a/tests/components/pulse_width/test.esp8266.yaml +++ b/tests/components/pulse_width/test.esp8266.yaml @@ -1,4 +1 @@ -sensor: - - platform: pulse_width - name: Pulse Width - pin: 4 +<<: !include common.yaml diff --git a/tests/components/pulse_width/test.rp2040.yaml b/tests/components/pulse_width/test.rp2040.yaml index fbda7cda2..dade44d14 100644 --- a/tests/components/pulse_width/test.rp2040.yaml +++ b/tests/components/pulse_width/test.rp2040.yaml @@ -1,4 +1 @@ -sensor: - - platform: pulse_width - name: Pulse Width - pin: 4 +<<: !include common.yaml diff --git a/tests/components/pvvx_mithermometer/common.yaml b/tests/components/pvvx_mithermometer/common.yaml new file mode 100644 index 000000000..972f23122 --- /dev/null +++ b/tests/components/pvvx_mithermometer/common.yaml @@ -0,0 +1,44 @@ +wifi: + ssid: MySSID + password: password1 + +esp32_ble_tracker: + +ble_client: + - mac_address: 01:02:03:04:05:06 + id: pvvx_ble_display + +display: + - platform: pvvx_mithermometer + ble_client_id: pvvx_ble_display + time_id: sntp_time + disconnect_delay: 3s + update_interval: 10min + validity_period: 20min + lambda: |- + it.print_bignum(188.8); + it.print_unit(pvvx_mithermometer::UNIT_DEG_E); + it.print_smallnum(88); + it.print_percent(true); + it.print_happy(true); + it.print_sad(true); + it.print_bracket(true); + it.print_battery(true); + +sensor: + - platform: pvvx_mithermometer + mac_address: A4:C1:38:4E:16:78 + temperature: + name: PVVX Temperature + humidity: + name: PVVX Humidity + battery_level: + name: PVVX Battery-Level + battery_voltage: + name: PVVX Battery-Voltage + +time: + - platform: sntp + id: sntp_time + servers: + - 0.pool.ntp.org diff --git a/tests/components/pvvx_mithermometer/test.esp32-c3-idf.yaml b/tests/components/pvvx_mithermometer/test.esp32-c3-idf.yaml index 972f23122..dade44d14 100644 --- a/tests/components/pvvx_mithermometer/test.esp32-c3-idf.yaml +++ b/tests/components/pvvx_mithermometer/test.esp32-c3-idf.yaml @@ -1,44 +1 @@ -wifi: - ssid: MySSID - password: password1 - -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: pvvx_ble_display - -display: - - platform: pvvx_mithermometer - ble_client_id: pvvx_ble_display - time_id: sntp_time - disconnect_delay: 3s - update_interval: 10min - validity_period: 20min - lambda: |- - it.print_bignum(188.8); - it.print_unit(pvvx_mithermometer::UNIT_DEG_E); - it.print_smallnum(88); - it.print_percent(true); - it.print_happy(true); - it.print_sad(true); - it.print_bracket(true); - it.print_battery(true); - -sensor: - - platform: pvvx_mithermometer - mac_address: A4:C1:38:4E:16:78 - temperature: - name: PVVX Temperature - humidity: - name: PVVX Humidity - battery_level: - name: PVVX Battery-Level - battery_voltage: - name: PVVX Battery-Voltage - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org +<<: !include common.yaml diff --git a/tests/components/pvvx_mithermometer/test.esp32-c3.yaml b/tests/components/pvvx_mithermometer/test.esp32-c3.yaml index 972f23122..dade44d14 100644 --- a/tests/components/pvvx_mithermometer/test.esp32-c3.yaml +++ b/tests/components/pvvx_mithermometer/test.esp32-c3.yaml @@ -1,44 +1 @@ -wifi: - ssid: MySSID - password: password1 - -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: pvvx_ble_display - -display: - - platform: pvvx_mithermometer - ble_client_id: pvvx_ble_display - time_id: sntp_time - disconnect_delay: 3s - update_interval: 10min - validity_period: 20min - lambda: |- - it.print_bignum(188.8); - it.print_unit(pvvx_mithermometer::UNIT_DEG_E); - it.print_smallnum(88); - it.print_percent(true); - it.print_happy(true); - it.print_sad(true); - it.print_bracket(true); - it.print_battery(true); - -sensor: - - platform: pvvx_mithermometer - mac_address: A4:C1:38:4E:16:78 - temperature: - name: PVVX Temperature - humidity: - name: PVVX Humidity - battery_level: - name: PVVX Battery-Level - battery_voltage: - name: PVVX Battery-Voltage - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org +<<: !include common.yaml diff --git a/tests/components/pvvx_mithermometer/test.esp32-idf.yaml b/tests/components/pvvx_mithermometer/test.esp32-idf.yaml index 972f23122..dade44d14 100644 --- a/tests/components/pvvx_mithermometer/test.esp32-idf.yaml +++ b/tests/components/pvvx_mithermometer/test.esp32-idf.yaml @@ -1,44 +1 @@ -wifi: - ssid: MySSID - password: password1 - -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: pvvx_ble_display - -display: - - platform: pvvx_mithermometer - ble_client_id: pvvx_ble_display - time_id: sntp_time - disconnect_delay: 3s - update_interval: 10min - validity_period: 20min - lambda: |- - it.print_bignum(188.8); - it.print_unit(pvvx_mithermometer::UNIT_DEG_E); - it.print_smallnum(88); - it.print_percent(true); - it.print_happy(true); - it.print_sad(true); - it.print_bracket(true); - it.print_battery(true); - -sensor: - - platform: pvvx_mithermometer - mac_address: A4:C1:38:4E:16:78 - temperature: - name: PVVX Temperature - humidity: - name: PVVX Humidity - battery_level: - name: PVVX Battery-Level - battery_voltage: - name: PVVX Battery-Voltage - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org +<<: !include common.yaml diff --git a/tests/components/pvvx_mithermometer/test.esp32.yaml b/tests/components/pvvx_mithermometer/test.esp32.yaml index 972f23122..dade44d14 100644 --- a/tests/components/pvvx_mithermometer/test.esp32.yaml +++ b/tests/components/pvvx_mithermometer/test.esp32.yaml @@ -1,44 +1 @@ -wifi: - ssid: MySSID - password: password1 - -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: pvvx_ble_display - -display: - - platform: pvvx_mithermometer - ble_client_id: pvvx_ble_display - time_id: sntp_time - disconnect_delay: 3s - update_interval: 10min - validity_period: 20min - lambda: |- - it.print_bignum(188.8); - it.print_unit(pvvx_mithermometer::UNIT_DEG_E); - it.print_smallnum(88); - it.print_percent(true); - it.print_happy(true); - it.print_sad(true); - it.print_bracket(true); - it.print_battery(true); - -sensor: - - platform: pvvx_mithermometer - mac_address: A4:C1:38:4E:16:78 - temperature: - name: PVVX Temperature - humidity: - name: PVVX Humidity - battery_level: - name: PVVX Battery-Level - battery_voltage: - name: PVVX Battery-Voltage - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org +<<: !include common.yaml diff --git a/tests/components/qspi_amoled/common.yaml b/tests/components/qspi_amoled/common.yaml new file mode 100644 index 000000000..01d1a63bc --- /dev/null +++ b/tests/components/qspi_amoled/common.yaml @@ -0,0 +1,36 @@ +spi: + id: quad_spi + clk_pin: 15 + type: quad + data_pins: [14, 10, 16, 12] + +display: + - platform: qspi_amoled + model: RM690B0 + data_rate: 80MHz + spi_mode: mode0 + dimensions: + width: 450 + height: 600 + offset_width: 16 + color_order: rgb + invert_colors: false + brightness: 255 + cs_pin: 11 + reset_pin: 13 + enable_pin: 9 + + - platform: qspi_amoled + model: RM67162 + id: main_lcd + dimensions: + height: 240 + width: 536 + transform: + mirror_x: true + swap_xy: true + color_order: rgb + brightness: 255 + cs_pin: 6 + reset_pin: 17 + enable_pin: 38 diff --git a/tests/components/qspi_amoled/test.esp32-s3-idf.yaml b/tests/components/qspi_amoled/test.esp32-s3-idf.yaml index 01d1a63bc..dade44d14 100644 --- a/tests/components/qspi_amoled/test.esp32-s3-idf.yaml +++ b/tests/components/qspi_amoled/test.esp32-s3-idf.yaml @@ -1,36 +1 @@ -spi: - id: quad_spi - clk_pin: 15 - type: quad - data_pins: [14, 10, 16, 12] - -display: - - platform: qspi_amoled - model: RM690B0 - data_rate: 80MHz - spi_mode: mode0 - dimensions: - width: 450 - height: 600 - offset_width: 16 - color_order: rgb - invert_colors: false - brightness: 255 - cs_pin: 11 - reset_pin: 13 - enable_pin: 9 - - - platform: qspi_amoled - model: RM67162 - id: main_lcd - dimensions: - height: 240 - width: 536 - transform: - mirror_x: true - swap_xy: true - color_order: rgb - brightness: 255 - cs_pin: 6 - reset_pin: 17 - enable_pin: 38 +<<: !include common.yaml diff --git a/tests/components/radon_eye_ble/common.yaml b/tests/components/radon_eye_ble/common.yaml new file mode 100644 index 000000000..85638d5c0 --- /dev/null +++ b/tests/components/radon_eye_ble/common.yaml @@ -0,0 +1,3 @@ +esp32_ble_tracker: + +radon_eye_ble: diff --git a/tests/components/radon_eye_ble/test.esp32-c3-idf.yaml b/tests/components/radon_eye_ble/test.esp32-c3-idf.yaml index 85638d5c0..dade44d14 100644 --- a/tests/components/radon_eye_ble/test.esp32-c3-idf.yaml +++ b/tests/components/radon_eye_ble/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -radon_eye_ble: +<<: !include common.yaml diff --git a/tests/components/radon_eye_ble/test.esp32-c3.yaml b/tests/components/radon_eye_ble/test.esp32-c3.yaml index 85638d5c0..dade44d14 100644 --- a/tests/components/radon_eye_ble/test.esp32-c3.yaml +++ b/tests/components/radon_eye_ble/test.esp32-c3.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -radon_eye_ble: +<<: !include common.yaml diff --git a/tests/components/radon_eye_ble/test.esp32-idf.yaml b/tests/components/radon_eye_ble/test.esp32-idf.yaml index 85638d5c0..dade44d14 100644 --- a/tests/components/radon_eye_ble/test.esp32-idf.yaml +++ b/tests/components/radon_eye_ble/test.esp32-idf.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -radon_eye_ble: +<<: !include common.yaml diff --git a/tests/components/radon_eye_ble/test.esp32.yaml b/tests/components/radon_eye_ble/test.esp32.yaml index 85638d5c0..dade44d14 100644 --- a/tests/components/radon_eye_ble/test.esp32.yaml +++ b/tests/components/radon_eye_ble/test.esp32.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -radon_eye_ble: +<<: !include common.yaml diff --git a/tests/components/radon_eye_rd200/common.yaml b/tests/components/radon_eye_rd200/common.yaml new file mode 100644 index 000000000..d06979be6 --- /dev/null +++ b/tests/components/radon_eye_rd200/common.yaml @@ -0,0 +1,14 @@ +esp32_ble_tracker: + +ble_client: + - mac_address: 01:02:03:04:05:06 + id: radon_eye_blec + +sensor: + - platform: radon_eye_rd200 + ble_client_id: radon_eye_blec + radon: + name: RD200 Radon + radon_long_term: + name: RD200 Radon Long Term + update_interval: 10min diff --git a/tests/components/radon_eye_rd200/test.esp32-c3-idf.yaml b/tests/components/radon_eye_rd200/test.esp32-c3-idf.yaml index d06979be6..dade44d14 100644 --- a/tests/components/radon_eye_rd200/test.esp32-c3-idf.yaml +++ b/tests/components/radon_eye_rd200/test.esp32-c3-idf.yaml @@ -1,14 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: radon_eye_blec - -sensor: - - platform: radon_eye_rd200 - ble_client_id: radon_eye_blec - radon: - name: RD200 Radon - radon_long_term: - name: RD200 Radon Long Term - update_interval: 10min +<<: !include common.yaml diff --git a/tests/components/radon_eye_rd200/test.esp32-c3.yaml b/tests/components/radon_eye_rd200/test.esp32-c3.yaml index d06979be6..dade44d14 100644 --- a/tests/components/radon_eye_rd200/test.esp32-c3.yaml +++ b/tests/components/radon_eye_rd200/test.esp32-c3.yaml @@ -1,14 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: radon_eye_blec - -sensor: - - platform: radon_eye_rd200 - ble_client_id: radon_eye_blec - radon: - name: RD200 Radon - radon_long_term: - name: RD200 Radon Long Term - update_interval: 10min +<<: !include common.yaml diff --git a/tests/components/radon_eye_rd200/test.esp32-idf.yaml b/tests/components/radon_eye_rd200/test.esp32-idf.yaml index d06979be6..dade44d14 100644 --- a/tests/components/radon_eye_rd200/test.esp32-idf.yaml +++ b/tests/components/radon_eye_rd200/test.esp32-idf.yaml @@ -1,14 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: radon_eye_blec - -sensor: - - platform: radon_eye_rd200 - ble_client_id: radon_eye_blec - radon: - name: RD200 Radon - radon_long_term: - name: RD200 Radon Long Term - update_interval: 10min +<<: !include common.yaml diff --git a/tests/components/radon_eye_rd200/test.esp32.yaml b/tests/components/radon_eye_rd200/test.esp32.yaml index d06979be6..dade44d14 100644 --- a/tests/components/radon_eye_rd200/test.esp32.yaml +++ b/tests/components/radon_eye_rd200/test.esp32.yaml @@ -1,14 +1 @@ -esp32_ble_tracker: - -ble_client: - - mac_address: 01:02:03:04:05:06 - id: radon_eye_blec - -sensor: - - platform: radon_eye_rd200 - ble_client_id: radon_eye_blec - radon: - name: RD200 Radon - radon_long_term: - name: RD200 Radon Long Term - update_interval: 10min +<<: !include common.yaml diff --git a/tests/components/restart/common.yaml b/tests/components/restart/common.yaml new file mode 100644 index 000000000..f0d25809a --- /dev/null +++ b/tests/components/restart/common.yaml @@ -0,0 +1,7 @@ +button: + - platform: restart + name: Restart Button + +switch: + - platform: restart + name: Restart Switch diff --git a/tests/components/restart/test.esp32-c3-idf.yaml b/tests/components/restart/test.esp32-c3-idf.yaml index f0d25809a..dade44d14 100644 --- a/tests/components/restart/test.esp32-c3-idf.yaml +++ b/tests/components/restart/test.esp32-c3-idf.yaml @@ -1,7 +1 @@ -button: - - platform: restart - name: Restart Button - -switch: - - platform: restart - name: Restart Switch +<<: !include common.yaml diff --git a/tests/components/restart/test.esp32-c3.yaml b/tests/components/restart/test.esp32-c3.yaml index f0d25809a..dade44d14 100644 --- a/tests/components/restart/test.esp32-c3.yaml +++ b/tests/components/restart/test.esp32-c3.yaml @@ -1,7 +1 @@ -button: - - platform: restart - name: Restart Button - -switch: - - platform: restart - name: Restart Switch +<<: !include common.yaml diff --git a/tests/components/restart/test.esp32-idf.yaml b/tests/components/restart/test.esp32-idf.yaml index f0d25809a..dade44d14 100644 --- a/tests/components/restart/test.esp32-idf.yaml +++ b/tests/components/restart/test.esp32-idf.yaml @@ -1,7 +1 @@ -button: - - platform: restart - name: Restart Button - -switch: - - platform: restart - name: Restart Switch +<<: !include common.yaml diff --git a/tests/components/restart/test.esp32.yaml b/tests/components/restart/test.esp32.yaml index f0d25809a..dade44d14 100644 --- a/tests/components/restart/test.esp32.yaml +++ b/tests/components/restart/test.esp32.yaml @@ -1,7 +1 @@ -button: - - platform: restart - name: Restart Button - -switch: - - platform: restart - name: Restart Switch +<<: !include common.yaml diff --git a/tests/components/restart/test.esp8266.yaml b/tests/components/restart/test.esp8266.yaml index f0d25809a..dade44d14 100644 --- a/tests/components/restart/test.esp8266.yaml +++ b/tests/components/restart/test.esp8266.yaml @@ -1,7 +1 @@ -button: - - platform: restart - name: Restart Button - -switch: - - platform: restart - name: Restart Switch +<<: !include common.yaml diff --git a/tests/components/restart/test.rp2040.yaml b/tests/components/restart/test.rp2040.yaml index f0d25809a..dade44d14 100644 --- a/tests/components/restart/test.rp2040.yaml +++ b/tests/components/restart/test.rp2040.yaml @@ -1,7 +1 @@ -button: - - platform: restart - name: Restart Button - -switch: - - platform: restart - name: Restart Switch +<<: !include common.yaml diff --git a/tests/components/rp2040_pio_led_strip/common.yaml b/tests/components/rp2040_pio_led_strip/common.yaml new file mode 100644 index 000000000..b9b1436cd --- /dev/null +++ b/tests/components/rp2040_pio_led_strip/common.yaml @@ -0,0 +1,18 @@ +light: + - platform: rp2040_pio_led_strip + id: led_strip + pin: 4 + num_leds: 60 + pio: 0 + rgb_order: GRB + chipset: WS2812 + - platform: rp2040_pio_led_strip + id: led_strip_custom_timings + pin: 5 + num_leds: 60 + pio: 1 + rgb_order: GRB + bit0_high: .1us + bit0_low: 1.2us + bit1_high: .69us + bit1_low: .4us diff --git a/tests/components/rp2040_pio_led_strip/test.rp2040.yaml b/tests/components/rp2040_pio_led_strip/test.rp2040.yaml index b9b1436cd..dade44d14 100644 --- a/tests/components/rp2040_pio_led_strip/test.rp2040.yaml +++ b/tests/components/rp2040_pio_led_strip/test.rp2040.yaml @@ -1,18 +1 @@ -light: - - platform: rp2040_pio_led_strip - id: led_strip - pin: 4 - num_leds: 60 - pio: 0 - rgb_order: GRB - chipset: WS2812 - - platform: rp2040_pio_led_strip - id: led_strip_custom_timings - pin: 5 - num_leds: 60 - pio: 1 - rgb_order: GRB - bit0_high: .1us - bit0_low: 1.2us - bit1_high: .69us - bit1_low: .4us +<<: !include common.yaml diff --git a/tests/components/rp2040_pwm/common.yaml b/tests/components/rp2040_pwm/common.yaml new file mode 100644 index 000000000..45c039106 --- /dev/null +++ b/tests/components/rp2040_pwm/common.yaml @@ -0,0 +1,7 @@ +output: + - platform: rp2040_pwm + id: light_output_1 + pin: 2 + - platform: rp2040_pwm + id: light_output_2 + pin: 3 diff --git a/tests/components/rp2040_pwm/test.rp2040.yaml b/tests/components/rp2040_pwm/test.rp2040.yaml index 45c039106..dade44d14 100644 --- a/tests/components/rp2040_pwm/test.rp2040.yaml +++ b/tests/components/rp2040_pwm/test.rp2040.yaml @@ -1,7 +1 @@ -output: - - platform: rp2040_pwm - id: light_output_1 - pin: 2 - - platform: rp2040_pwm - id: light_output_2 - pin: 3 +<<: !include common.yaml diff --git a/tests/components/rpi_dpi_rgb/common.yaml b/tests/components/rpi_dpi_rgb/common.yaml new file mode 100644 index 000000000..9ce2d9b9f --- /dev/null +++ b/tests/components/rpi_dpi_rgb/common.yaml @@ -0,0 +1,40 @@ +psram: + mode: octal + speed: 80MHz +display: + - platform: rpi_dpi_rgb + update_interval: never + auto_clear_enabled: false + id: rpi_display + color_order: RGB + rotation: 90 + dimensions: + width: 800 + height: 480 + de_pin: + number: 40 + hsync_pin: 39 + vsync_pin: 41 + pclk_pin: 42 + data_pins: + red: + - number: 45 # r1 + ignore_strapping_warning: true + - 48 # r2 + - 47 # r3 + - 21 # r4 + - number: 14 # r5 + ignore_strapping_warning: false + green: + - 5 # g0 + - 6 # g1 + - 7 # g2 + - 15 # g3 + - 16 # g4 + - 4 # g5 + blue: + - 8 # b1 + - 3 # b2 + - 46 # b3 + - 9 # b4 + - 1 # b5 diff --git a/tests/components/rpi_dpi_rgb/test.esp32-s3-idf.yaml b/tests/components/rpi_dpi_rgb/test.esp32-s3-idf.yaml index 9ce2d9b9f..dade44d14 100644 --- a/tests/components/rpi_dpi_rgb/test.esp32-s3-idf.yaml +++ b/tests/components/rpi_dpi_rgb/test.esp32-s3-idf.yaml @@ -1,40 +1 @@ -psram: - mode: octal - speed: 80MHz -display: - - platform: rpi_dpi_rgb - update_interval: never - auto_clear_enabled: false - id: rpi_display - color_order: RGB - rotation: 90 - dimensions: - width: 800 - height: 480 - de_pin: - number: 40 - hsync_pin: 39 - vsync_pin: 41 - pclk_pin: 42 - data_pins: - red: - - number: 45 # r1 - ignore_strapping_warning: true - - 48 # r2 - - 47 # r3 - - 21 # r4 - - number: 14 # r5 - ignore_strapping_warning: false - green: - - 5 # g0 - - 6 # g1 - - 7 # g2 - - 15 # g3 - - 16 # g4 - - 4 # g5 - blue: - - 8 # b1 - - 3 # b2 - - 46 # b3 - - 9 # b4 - - 1 # b5 +<<: !include common.yaml diff --git a/tests/components/ruuvi_ble/common.yaml b/tests/components/ruuvi_ble/common.yaml new file mode 100644 index 000000000..1f155fd8e --- /dev/null +++ b/tests/components/ruuvi_ble/common.yaml @@ -0,0 +1,3 @@ +esp32_ble_tracker: + +ruuvi_ble: diff --git a/tests/components/ruuvi_ble/test.esp32-c3-idf.yaml b/tests/components/ruuvi_ble/test.esp32-c3-idf.yaml index 1f155fd8e..dade44d14 100644 --- a/tests/components/ruuvi_ble/test.esp32-c3-idf.yaml +++ b/tests/components/ruuvi_ble/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -ruuvi_ble: +<<: !include common.yaml diff --git a/tests/components/ruuvi_ble/test.esp32-c3.yaml b/tests/components/ruuvi_ble/test.esp32-c3.yaml index 1f155fd8e..dade44d14 100644 --- a/tests/components/ruuvi_ble/test.esp32-c3.yaml +++ b/tests/components/ruuvi_ble/test.esp32-c3.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -ruuvi_ble: +<<: !include common.yaml diff --git a/tests/components/ruuvi_ble/test.esp32-idf.yaml b/tests/components/ruuvi_ble/test.esp32-idf.yaml index 1f155fd8e..dade44d14 100644 --- a/tests/components/ruuvi_ble/test.esp32-idf.yaml +++ b/tests/components/ruuvi_ble/test.esp32-idf.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -ruuvi_ble: +<<: !include common.yaml diff --git a/tests/components/ruuvi_ble/test.esp32.yaml b/tests/components/ruuvi_ble/test.esp32.yaml index 1f155fd8e..dade44d14 100644 --- a/tests/components/ruuvi_ble/test.esp32.yaml +++ b/tests/components/ruuvi_ble/test.esp32.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -ruuvi_ble: +<<: !include common.yaml diff --git a/tests/components/ruuvitag/common.yaml b/tests/components/ruuvitag/common.yaml new file mode 100644 index 000000000..799061771 --- /dev/null +++ b/tests/components/ruuvitag/common.yaml @@ -0,0 +1,27 @@ +esp32_ble_tracker: + +sensor: + - platform: ruuvitag + mac_address: FF:56:D3:2F:7D:E8 + humidity: + name: RuuviTag Humidity + temperature: + name: RuuviTag Temperature + pressure: + name: RuuviTag Pressure + acceleration: + name: RuuviTag Acceleration + acceleration_x: + name: RuuviTag Acceleration X + acceleration_y: + name: RuuviTag Acceleration Y + acceleration_z: + name: RuuviTag Acceleration Z + battery_voltage: + name: RuuviTag Battery Voltage + tx_power: + name: RuuviTag TX Power + movement_counter: + name: RuuviTag Movement Counter + measurement_sequence_number: + name: RuuviTag Measurement Sequence Number diff --git a/tests/components/ruuvitag/test.esp32-c3-idf.yaml b/tests/components/ruuvitag/test.esp32-c3-idf.yaml index 799061771..dade44d14 100644 --- a/tests/components/ruuvitag/test.esp32-c3-idf.yaml +++ b/tests/components/ruuvitag/test.esp32-c3-idf.yaml @@ -1,27 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: ruuvitag - mac_address: FF:56:D3:2F:7D:E8 - humidity: - name: RuuviTag Humidity - temperature: - name: RuuviTag Temperature - pressure: - name: RuuviTag Pressure - acceleration: - name: RuuviTag Acceleration - acceleration_x: - name: RuuviTag Acceleration X - acceleration_y: - name: RuuviTag Acceleration Y - acceleration_z: - name: RuuviTag Acceleration Z - battery_voltage: - name: RuuviTag Battery Voltage - tx_power: - name: RuuviTag TX Power - movement_counter: - name: RuuviTag Movement Counter - measurement_sequence_number: - name: RuuviTag Measurement Sequence Number +<<: !include common.yaml diff --git a/tests/components/ruuvitag/test.esp32-c3.yaml b/tests/components/ruuvitag/test.esp32-c3.yaml index 799061771..dade44d14 100644 --- a/tests/components/ruuvitag/test.esp32-c3.yaml +++ b/tests/components/ruuvitag/test.esp32-c3.yaml @@ -1,27 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: ruuvitag - mac_address: FF:56:D3:2F:7D:E8 - humidity: - name: RuuviTag Humidity - temperature: - name: RuuviTag Temperature - pressure: - name: RuuviTag Pressure - acceleration: - name: RuuviTag Acceleration - acceleration_x: - name: RuuviTag Acceleration X - acceleration_y: - name: RuuviTag Acceleration Y - acceleration_z: - name: RuuviTag Acceleration Z - battery_voltage: - name: RuuviTag Battery Voltage - tx_power: - name: RuuviTag TX Power - movement_counter: - name: RuuviTag Movement Counter - measurement_sequence_number: - name: RuuviTag Measurement Sequence Number +<<: !include common.yaml diff --git a/tests/components/ruuvitag/test.esp32-idf.yaml b/tests/components/ruuvitag/test.esp32-idf.yaml index 799061771..dade44d14 100644 --- a/tests/components/ruuvitag/test.esp32-idf.yaml +++ b/tests/components/ruuvitag/test.esp32-idf.yaml @@ -1,27 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: ruuvitag - mac_address: FF:56:D3:2F:7D:E8 - humidity: - name: RuuviTag Humidity - temperature: - name: RuuviTag Temperature - pressure: - name: RuuviTag Pressure - acceleration: - name: RuuviTag Acceleration - acceleration_x: - name: RuuviTag Acceleration X - acceleration_y: - name: RuuviTag Acceleration Y - acceleration_z: - name: RuuviTag Acceleration Z - battery_voltage: - name: RuuviTag Battery Voltage - tx_power: - name: RuuviTag TX Power - movement_counter: - name: RuuviTag Movement Counter - measurement_sequence_number: - name: RuuviTag Measurement Sequence Number +<<: !include common.yaml diff --git a/tests/components/ruuvitag/test.esp32.yaml b/tests/components/ruuvitag/test.esp32.yaml index 799061771..dade44d14 100644 --- a/tests/components/ruuvitag/test.esp32.yaml +++ b/tests/components/ruuvitag/test.esp32.yaml @@ -1,27 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: ruuvitag - mac_address: FF:56:D3:2F:7D:E8 - humidity: - name: RuuviTag Humidity - temperature: - name: RuuviTag Temperature - pressure: - name: RuuviTag Pressure - acceleration: - name: RuuviTag Acceleration - acceleration_x: - name: RuuviTag Acceleration X - acceleration_y: - name: RuuviTag Acceleration Y - acceleration_z: - name: RuuviTag Acceleration Z - battery_voltage: - name: RuuviTag Battery Voltage - tx_power: - name: RuuviTag TX Power - movement_counter: - name: RuuviTag Movement Counter - measurement_sequence_number: - name: RuuviTag Measurement Sequence Number +<<: !include common.yaml diff --git a/tests/components/safe_mode/common.yaml b/tests/components/safe_mode/common.yaml new file mode 100644 index 000000000..df0abd9ae --- /dev/null +++ b/tests/components/safe_mode/common.yaml @@ -0,0 +1,13 @@ +wifi: + ssid: MySSID + password: password1 + +ota: + +button: + - platform: safe_mode + name: Safe Mode Button + +switch: + - platform: safe_mode + name: Safe Mode Switch diff --git a/tests/components/safe_mode/test.esp32-c3-idf.yaml b/tests/components/safe_mode/test.esp32-c3-idf.yaml index df0abd9ae..dade44d14 100644 --- a/tests/components/safe_mode/test.esp32-c3-idf.yaml +++ b/tests/components/safe_mode/test.esp32-c3-idf.yaml @@ -1,13 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - -button: - - platform: safe_mode - name: Safe Mode Button - -switch: - - platform: safe_mode - name: Safe Mode Switch +<<: !include common.yaml diff --git a/tests/components/safe_mode/test.esp32-c3.yaml b/tests/components/safe_mode/test.esp32-c3.yaml index df0abd9ae..dade44d14 100644 --- a/tests/components/safe_mode/test.esp32-c3.yaml +++ b/tests/components/safe_mode/test.esp32-c3.yaml @@ -1,13 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - -button: - - platform: safe_mode - name: Safe Mode Button - -switch: - - platform: safe_mode - name: Safe Mode Switch +<<: !include common.yaml diff --git a/tests/components/safe_mode/test.esp32-idf.yaml b/tests/components/safe_mode/test.esp32-idf.yaml index df0abd9ae..dade44d14 100644 --- a/tests/components/safe_mode/test.esp32-idf.yaml +++ b/tests/components/safe_mode/test.esp32-idf.yaml @@ -1,13 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - -button: - - platform: safe_mode - name: Safe Mode Button - -switch: - - platform: safe_mode - name: Safe Mode Switch +<<: !include common.yaml diff --git a/tests/components/safe_mode/test.esp32.yaml b/tests/components/safe_mode/test.esp32.yaml index df0abd9ae..dade44d14 100644 --- a/tests/components/safe_mode/test.esp32.yaml +++ b/tests/components/safe_mode/test.esp32.yaml @@ -1,13 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - -button: - - platform: safe_mode - name: Safe Mode Button - -switch: - - platform: safe_mode - name: Safe Mode Switch +<<: !include common.yaml diff --git a/tests/components/safe_mode/test.esp8266.yaml b/tests/components/safe_mode/test.esp8266.yaml index df0abd9ae..dade44d14 100644 --- a/tests/components/safe_mode/test.esp8266.yaml +++ b/tests/components/safe_mode/test.esp8266.yaml @@ -1,13 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - -button: - - platform: safe_mode - name: Safe Mode Button - -switch: - - platform: safe_mode - name: Safe Mode Switch +<<: !include common.yaml diff --git a/tests/components/safe_mode/test.rp2040.yaml b/tests/components/safe_mode/test.rp2040.yaml index df0abd9ae..dade44d14 100644 --- a/tests/components/safe_mode/test.rp2040.yaml +++ b/tests/components/safe_mode/test.rp2040.yaml @@ -1,13 +1 @@ -wifi: - ssid: MySSID - password: password1 - -ota: - -button: - - platform: safe_mode - name: Safe Mode Button - -switch: - - platform: safe_mode - name: Safe Mode Switch +<<: !include common.yaml diff --git a/tests/components/shelly_dimmer/common.yaml b/tests/components/shelly_dimmer/common.yaml new file mode 100644 index 000000000..3acd0260d --- /dev/null +++ b/tests/components/shelly_dimmer/common.yaml @@ -0,0 +1,19 @@ +uart: + - id: uart_shelly_dimmer + tx_pin: 4 + rx_pin: 5 + baud_rate: 9600 + +light: + - platform: shelly_dimmer + name: Shelly Dimmer Light + power: + name: Shelly Dimmer Power + voltage: + name: Shelly Dimmer Voltage + current: + name: Shelly Dimmer Current + max_brightness: 500 + firmware: "51.6" + nrst_pin: 13 + boot0_pin: 14 diff --git a/tests/components/shelly_dimmer/test.esp8266.yaml b/tests/components/shelly_dimmer/test.esp8266.yaml index 3acd0260d..dade44d14 100644 --- a/tests/components/shelly_dimmer/test.esp8266.yaml +++ b/tests/components/shelly_dimmer/test.esp8266.yaml @@ -1,19 +1 @@ -uart: - - id: uart_shelly_dimmer - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - -light: - - platform: shelly_dimmer - name: Shelly Dimmer Light - power: - name: Shelly Dimmer Power - voltage: - name: Shelly Dimmer Voltage - current: - name: Shelly Dimmer Current - max_brightness: 500 - firmware: "51.6" - nrst_pin: 13 - boot0_pin: 14 +<<: !include common.yaml diff --git a/tests/components/shutdown/common.yaml b/tests/components/shutdown/common.yaml new file mode 100644 index 000000000..f47e7da85 --- /dev/null +++ b/tests/components/shutdown/common.yaml @@ -0,0 +1,7 @@ +button: + - platform: shutdown + name: Shutdown Button + +switch: + - platform: shutdown + name: Shutdown Switch diff --git a/tests/components/shutdown/test.esp32-c3-idf.yaml b/tests/components/shutdown/test.esp32-c3-idf.yaml index f47e7da85..dade44d14 100644 --- a/tests/components/shutdown/test.esp32-c3-idf.yaml +++ b/tests/components/shutdown/test.esp32-c3-idf.yaml @@ -1,7 +1 @@ -button: - - platform: shutdown - name: Shutdown Button - -switch: - - platform: shutdown - name: Shutdown Switch +<<: !include common.yaml diff --git a/tests/components/shutdown/test.esp32-c3.yaml b/tests/components/shutdown/test.esp32-c3.yaml index f47e7da85..dade44d14 100644 --- a/tests/components/shutdown/test.esp32-c3.yaml +++ b/tests/components/shutdown/test.esp32-c3.yaml @@ -1,7 +1 @@ -button: - - platform: shutdown - name: Shutdown Button - -switch: - - platform: shutdown - name: Shutdown Switch +<<: !include common.yaml diff --git a/tests/components/shutdown/test.esp32-idf.yaml b/tests/components/shutdown/test.esp32-idf.yaml index f47e7da85..dade44d14 100644 --- a/tests/components/shutdown/test.esp32-idf.yaml +++ b/tests/components/shutdown/test.esp32-idf.yaml @@ -1,7 +1 @@ -button: - - platform: shutdown - name: Shutdown Button - -switch: - - platform: shutdown - name: Shutdown Switch +<<: !include common.yaml diff --git a/tests/components/shutdown/test.esp32.yaml b/tests/components/shutdown/test.esp32.yaml index f47e7da85..dade44d14 100644 --- a/tests/components/shutdown/test.esp32.yaml +++ b/tests/components/shutdown/test.esp32.yaml @@ -1,7 +1 @@ -button: - - platform: shutdown - name: Shutdown Button - -switch: - - platform: shutdown - name: Shutdown Switch +<<: !include common.yaml diff --git a/tests/components/shutdown/test.esp8266.yaml b/tests/components/shutdown/test.esp8266.yaml index f47e7da85..dade44d14 100644 --- a/tests/components/shutdown/test.esp8266.yaml +++ b/tests/components/shutdown/test.esp8266.yaml @@ -1,7 +1 @@ -button: - - platform: shutdown - name: Shutdown Button - -switch: - - platform: shutdown - name: Shutdown Switch +<<: !include common.yaml diff --git a/tests/components/shutdown/test.rp2040.yaml b/tests/components/shutdown/test.rp2040.yaml index f47e7da85..dade44d14 100644 --- a/tests/components/shutdown/test.rp2040.yaml +++ b/tests/components/shutdown/test.rp2040.yaml @@ -1,7 +1 @@ -button: - - platform: shutdown - name: Shutdown Button - -switch: - - platform: shutdown - name: Shutdown Switch +<<: !include common.yaml diff --git a/tests/components/sigma_delta_output/common.yaml b/tests/components/sigma_delta_output/common.yaml new file mode 100644 index 000000000..2a9a5d2c3 --- /dev/null +++ b/tests/components/sigma_delta_output/common.yaml @@ -0,0 +1,16 @@ +output: + - platform: sigma_delta_output + id: sddac + pin: 4 + turn_on_action: + then: + - logger.log: "Turned on" + turn_off_action: + then: + - logger.log: "Turned off" + state_change_action: + then: + - logger.log: + format: "Changed state: %d" + args: ["state"] + update_interval: 60s diff --git a/tests/components/sigma_delta_output/test.esp32-c3-idf.yaml b/tests/components/sigma_delta_output/test.esp32-c3-idf.yaml index 2a9a5d2c3..dade44d14 100644 --- a/tests/components/sigma_delta_output/test.esp32-c3-idf.yaml +++ b/tests/components/sigma_delta_output/test.esp32-c3-idf.yaml @@ -1,16 +1 @@ -output: - - platform: sigma_delta_output - id: sddac - pin: 4 - turn_on_action: - then: - - logger.log: "Turned on" - turn_off_action: - then: - - logger.log: "Turned off" - state_change_action: - then: - - logger.log: - format: "Changed state: %d" - args: ["state"] - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sigma_delta_output/test.esp32-c3.yaml b/tests/components/sigma_delta_output/test.esp32-c3.yaml index 2a9a5d2c3..dade44d14 100644 --- a/tests/components/sigma_delta_output/test.esp32-c3.yaml +++ b/tests/components/sigma_delta_output/test.esp32-c3.yaml @@ -1,16 +1 @@ -output: - - platform: sigma_delta_output - id: sddac - pin: 4 - turn_on_action: - then: - - logger.log: "Turned on" - turn_off_action: - then: - - logger.log: "Turned off" - state_change_action: - then: - - logger.log: - format: "Changed state: %d" - args: ["state"] - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sigma_delta_output/test.esp32-idf.yaml b/tests/components/sigma_delta_output/test.esp32-idf.yaml index 2a9a5d2c3..dade44d14 100644 --- a/tests/components/sigma_delta_output/test.esp32-idf.yaml +++ b/tests/components/sigma_delta_output/test.esp32-idf.yaml @@ -1,16 +1 @@ -output: - - platform: sigma_delta_output - id: sddac - pin: 4 - turn_on_action: - then: - - logger.log: "Turned on" - turn_off_action: - then: - - logger.log: "Turned off" - state_change_action: - then: - - logger.log: - format: "Changed state: %d" - args: ["state"] - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sigma_delta_output/test.esp32.yaml b/tests/components/sigma_delta_output/test.esp32.yaml index 2a9a5d2c3..dade44d14 100644 --- a/tests/components/sigma_delta_output/test.esp32.yaml +++ b/tests/components/sigma_delta_output/test.esp32.yaml @@ -1,16 +1 @@ -output: - - platform: sigma_delta_output - id: sddac - pin: 4 - turn_on_action: - then: - - logger.log: "Turned on" - turn_off_action: - then: - - logger.log: "Turned off" - state_change_action: - then: - - logger.log: - format: "Changed state: %d" - args: ["state"] - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sigma_delta_output/test.esp8266.yaml b/tests/components/sigma_delta_output/test.esp8266.yaml index 2a9a5d2c3..dade44d14 100644 --- a/tests/components/sigma_delta_output/test.esp8266.yaml +++ b/tests/components/sigma_delta_output/test.esp8266.yaml @@ -1,16 +1 @@ -output: - - platform: sigma_delta_output - id: sddac - pin: 4 - turn_on_action: - then: - - logger.log: "Turned on" - turn_off_action: - then: - - logger.log: "Turned off" - state_change_action: - then: - - logger.log: - format: "Changed state: %d" - args: ["state"] - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/sigma_delta_output/test.rp2040.yaml b/tests/components/sigma_delta_output/test.rp2040.yaml index 2a9a5d2c3..dade44d14 100644 --- a/tests/components/sigma_delta_output/test.rp2040.yaml +++ b/tests/components/sigma_delta_output/test.rp2040.yaml @@ -1,16 +1 @@ -output: - - platform: sigma_delta_output - id: sddac - pin: 4 - turn_on_action: - then: - - logger.log: "Turned on" - turn_off_action: - then: - - logger.log: "Turned off" - state_change_action: - then: - - logger.log: - format: "Changed state: %d" - args: ["state"] - update_interval: 60s +<<: !include common.yaml diff --git a/tests/components/slow_pwm/common.yaml b/tests/components/slow_pwm/common.yaml new file mode 100644 index 000000000..6bfb2f8ac --- /dev/null +++ b/tests/components/slow_pwm/common.yaml @@ -0,0 +1,6 @@ +output: + - platform: slow_pwm + id: test_slow_pwm + pin: 4 + period: 15s + restart_cycle_on_state_change: false diff --git a/tests/components/slow_pwm/test.esp32-c3-idf.yaml b/tests/components/slow_pwm/test.esp32-c3-idf.yaml index 6bfb2f8ac..dade44d14 100644 --- a/tests/components/slow_pwm/test.esp32-c3-idf.yaml +++ b/tests/components/slow_pwm/test.esp32-c3-idf.yaml @@ -1,6 +1 @@ -output: - - platform: slow_pwm - id: test_slow_pwm - pin: 4 - period: 15s - restart_cycle_on_state_change: false +<<: !include common.yaml diff --git a/tests/components/slow_pwm/test.esp32-c3.yaml b/tests/components/slow_pwm/test.esp32-c3.yaml index 6bfb2f8ac..dade44d14 100644 --- a/tests/components/slow_pwm/test.esp32-c3.yaml +++ b/tests/components/slow_pwm/test.esp32-c3.yaml @@ -1,6 +1 @@ -output: - - platform: slow_pwm - id: test_slow_pwm - pin: 4 - period: 15s - restart_cycle_on_state_change: false +<<: !include common.yaml diff --git a/tests/components/slow_pwm/test.esp32-idf.yaml b/tests/components/slow_pwm/test.esp32-idf.yaml index 6bfb2f8ac..dade44d14 100644 --- a/tests/components/slow_pwm/test.esp32-idf.yaml +++ b/tests/components/slow_pwm/test.esp32-idf.yaml @@ -1,6 +1 @@ -output: - - platform: slow_pwm - id: test_slow_pwm - pin: 4 - period: 15s - restart_cycle_on_state_change: false +<<: !include common.yaml diff --git a/tests/components/slow_pwm/test.esp32.yaml b/tests/components/slow_pwm/test.esp32.yaml index 6bfb2f8ac..dade44d14 100644 --- a/tests/components/slow_pwm/test.esp32.yaml +++ b/tests/components/slow_pwm/test.esp32.yaml @@ -1,6 +1 @@ -output: - - platform: slow_pwm - id: test_slow_pwm - pin: 4 - period: 15s - restart_cycle_on_state_change: false +<<: !include common.yaml diff --git a/tests/components/slow_pwm/test.esp8266.yaml b/tests/components/slow_pwm/test.esp8266.yaml index 6bfb2f8ac..dade44d14 100644 --- a/tests/components/slow_pwm/test.esp8266.yaml +++ b/tests/components/slow_pwm/test.esp8266.yaml @@ -1,6 +1 @@ -output: - - platform: slow_pwm - id: test_slow_pwm - pin: 4 - period: 15s - restart_cycle_on_state_change: false +<<: !include common.yaml diff --git a/tests/components/slow_pwm/test.rp2040.yaml b/tests/components/slow_pwm/test.rp2040.yaml index 6bfb2f8ac..dade44d14 100644 --- a/tests/components/slow_pwm/test.rp2040.yaml +++ b/tests/components/slow_pwm/test.rp2040.yaml @@ -1,6 +1 @@ -output: - - platform: slow_pwm - id: test_slow_pwm - pin: 4 - period: 15s - restart_cycle_on_state_change: false +<<: !include common.yaml diff --git a/tests/components/sm16716/common.yaml b/tests/components/sm16716/common.yaml new file mode 100644 index 000000000..3bf2712f4 --- /dev/null +++ b/tests/components/sm16716/common.yaml @@ -0,0 +1,16 @@ +sm16716: + clock_pin: 4 + data_pin: 5 + num_channels: 3 + num_chips: 1 + +output: + - platform: sm16716 + id: sm16716_red + channel: 1 + - platform: sm16716 + id: sm16716_green + channel: 0 + - platform: sm16716 + id: sm16716_blue + channel: 2 diff --git a/tests/components/sm16716/test.esp32-c3-idf.yaml b/tests/components/sm16716/test.esp32-c3-idf.yaml index 3bf2712f4..dade44d14 100644 --- a/tests/components/sm16716/test.esp32-c3-idf.yaml +++ b/tests/components/sm16716/test.esp32-c3-idf.yaml @@ -1,16 +1 @@ -sm16716: - clock_pin: 4 - data_pin: 5 - num_channels: 3 - num_chips: 1 - -output: - - platform: sm16716 - id: sm16716_red - channel: 1 - - platform: sm16716 - id: sm16716_green - channel: 0 - - platform: sm16716 - id: sm16716_blue - channel: 2 +<<: !include common.yaml diff --git a/tests/components/sm16716/test.esp32-c3.yaml b/tests/components/sm16716/test.esp32-c3.yaml index 3bf2712f4..dade44d14 100644 --- a/tests/components/sm16716/test.esp32-c3.yaml +++ b/tests/components/sm16716/test.esp32-c3.yaml @@ -1,16 +1 @@ -sm16716: - clock_pin: 4 - data_pin: 5 - num_channels: 3 - num_chips: 1 - -output: - - platform: sm16716 - id: sm16716_red - channel: 1 - - platform: sm16716 - id: sm16716_green - channel: 0 - - platform: sm16716 - id: sm16716_blue - channel: 2 +<<: !include common.yaml diff --git a/tests/components/sm16716/test.esp32-idf.yaml b/tests/components/sm16716/test.esp32-idf.yaml index 3bf2712f4..dade44d14 100644 --- a/tests/components/sm16716/test.esp32-idf.yaml +++ b/tests/components/sm16716/test.esp32-idf.yaml @@ -1,16 +1 @@ -sm16716: - clock_pin: 4 - data_pin: 5 - num_channels: 3 - num_chips: 1 - -output: - - platform: sm16716 - id: sm16716_red - channel: 1 - - platform: sm16716 - id: sm16716_green - channel: 0 - - platform: sm16716 - id: sm16716_blue - channel: 2 +<<: !include common.yaml diff --git a/tests/components/sm16716/test.esp32.yaml b/tests/components/sm16716/test.esp32.yaml index 3bf2712f4..dade44d14 100644 --- a/tests/components/sm16716/test.esp32.yaml +++ b/tests/components/sm16716/test.esp32.yaml @@ -1,16 +1 @@ -sm16716: - clock_pin: 4 - data_pin: 5 - num_channels: 3 - num_chips: 1 - -output: - - platform: sm16716 - id: sm16716_red - channel: 1 - - platform: sm16716 - id: sm16716_green - channel: 0 - - platform: sm16716 - id: sm16716_blue - channel: 2 +<<: !include common.yaml diff --git a/tests/components/sm16716/test.esp8266.yaml b/tests/components/sm16716/test.esp8266.yaml index 3bf2712f4..dade44d14 100644 --- a/tests/components/sm16716/test.esp8266.yaml +++ b/tests/components/sm16716/test.esp8266.yaml @@ -1,16 +1 @@ -sm16716: - clock_pin: 4 - data_pin: 5 - num_channels: 3 - num_chips: 1 - -output: - - platform: sm16716 - id: sm16716_red - channel: 1 - - platform: sm16716 - id: sm16716_green - channel: 0 - - platform: sm16716 - id: sm16716_blue - channel: 2 +<<: !include common.yaml diff --git a/tests/components/sm16716/test.rp2040.yaml b/tests/components/sm16716/test.rp2040.yaml index 3bf2712f4..dade44d14 100644 --- a/tests/components/sm16716/test.rp2040.yaml +++ b/tests/components/sm16716/test.rp2040.yaml @@ -1,16 +1 @@ -sm16716: - clock_pin: 4 - data_pin: 5 - num_channels: 3 - num_chips: 1 - -output: - - platform: sm16716 - id: sm16716_red - channel: 1 - - platform: sm16716 - id: sm16716_green - channel: 0 - - platform: sm16716 - id: sm16716_blue - channel: 2 +<<: !include common.yaml diff --git a/tests/components/sm2135/common.yaml b/tests/components/sm2135/common.yaml new file mode 100644 index 000000000..9a0de6083 --- /dev/null +++ b/tests/components/sm2135/common.yaml @@ -0,0 +1,22 @@ +sm2135: + clock_pin: 4 + data_pin: 5 + rgb_current: 20mA + cw_current: 60mA + +output: + - platform: sm2135 + id: sm2135_0 + channel: 0 + - platform: sm2135 + id: sm2135_1 + channel: 1 + - platform: sm2135 + id: sm2135_2 + channel: 2 + - platform: sm2135 + id: sm2135_3 + channel: 3 + - platform: sm2135 + id: sm2135_4 + channel: 4 diff --git a/tests/components/sm2135/test.esp32-c3-idf.yaml b/tests/components/sm2135/test.esp32-c3-idf.yaml index 9a0de6083..dade44d14 100644 --- a/tests/components/sm2135/test.esp32-c3-idf.yaml +++ b/tests/components/sm2135/test.esp32-c3-idf.yaml @@ -1,22 +1 @@ -sm2135: - clock_pin: 4 - data_pin: 5 - rgb_current: 20mA - cw_current: 60mA - -output: - - platform: sm2135 - id: sm2135_0 - channel: 0 - - platform: sm2135 - id: sm2135_1 - channel: 1 - - platform: sm2135 - id: sm2135_2 - channel: 2 - - platform: sm2135 - id: sm2135_3 - channel: 3 - - platform: sm2135 - id: sm2135_4 - channel: 4 +<<: !include common.yaml diff --git a/tests/components/sm2135/test.esp32-c3.yaml b/tests/components/sm2135/test.esp32-c3.yaml index 9a0de6083..dade44d14 100644 --- a/tests/components/sm2135/test.esp32-c3.yaml +++ b/tests/components/sm2135/test.esp32-c3.yaml @@ -1,22 +1 @@ -sm2135: - clock_pin: 4 - data_pin: 5 - rgb_current: 20mA - cw_current: 60mA - -output: - - platform: sm2135 - id: sm2135_0 - channel: 0 - - platform: sm2135 - id: sm2135_1 - channel: 1 - - platform: sm2135 - id: sm2135_2 - channel: 2 - - platform: sm2135 - id: sm2135_3 - channel: 3 - - platform: sm2135 - id: sm2135_4 - channel: 4 +<<: !include common.yaml diff --git a/tests/components/sm2135/test.esp32-idf.yaml b/tests/components/sm2135/test.esp32-idf.yaml index 9a0de6083..dade44d14 100644 --- a/tests/components/sm2135/test.esp32-idf.yaml +++ b/tests/components/sm2135/test.esp32-idf.yaml @@ -1,22 +1 @@ -sm2135: - clock_pin: 4 - data_pin: 5 - rgb_current: 20mA - cw_current: 60mA - -output: - - platform: sm2135 - id: sm2135_0 - channel: 0 - - platform: sm2135 - id: sm2135_1 - channel: 1 - - platform: sm2135 - id: sm2135_2 - channel: 2 - - platform: sm2135 - id: sm2135_3 - channel: 3 - - platform: sm2135 - id: sm2135_4 - channel: 4 +<<: !include common.yaml diff --git a/tests/components/sm2135/test.esp32.yaml b/tests/components/sm2135/test.esp32.yaml index 9a0de6083..dade44d14 100644 --- a/tests/components/sm2135/test.esp32.yaml +++ b/tests/components/sm2135/test.esp32.yaml @@ -1,22 +1 @@ -sm2135: - clock_pin: 4 - data_pin: 5 - rgb_current: 20mA - cw_current: 60mA - -output: - - platform: sm2135 - id: sm2135_0 - channel: 0 - - platform: sm2135 - id: sm2135_1 - channel: 1 - - platform: sm2135 - id: sm2135_2 - channel: 2 - - platform: sm2135 - id: sm2135_3 - channel: 3 - - platform: sm2135 - id: sm2135_4 - channel: 4 +<<: !include common.yaml diff --git a/tests/components/sm2135/test.esp8266.yaml b/tests/components/sm2135/test.esp8266.yaml index 9a0de6083..dade44d14 100644 --- a/tests/components/sm2135/test.esp8266.yaml +++ b/tests/components/sm2135/test.esp8266.yaml @@ -1,22 +1 @@ -sm2135: - clock_pin: 4 - data_pin: 5 - rgb_current: 20mA - cw_current: 60mA - -output: - - platform: sm2135 - id: sm2135_0 - channel: 0 - - platform: sm2135 - id: sm2135_1 - channel: 1 - - platform: sm2135 - id: sm2135_2 - channel: 2 - - platform: sm2135 - id: sm2135_3 - channel: 3 - - platform: sm2135 - id: sm2135_4 - channel: 4 +<<: !include common.yaml diff --git a/tests/components/sm2135/test.rp2040.yaml b/tests/components/sm2135/test.rp2040.yaml index 9a0de6083..dade44d14 100644 --- a/tests/components/sm2135/test.rp2040.yaml +++ b/tests/components/sm2135/test.rp2040.yaml @@ -1,22 +1 @@ -sm2135: - clock_pin: 4 - data_pin: 5 - rgb_current: 20mA - cw_current: 60mA - -output: - - platform: sm2135 - id: sm2135_0 - channel: 0 - - platform: sm2135 - id: sm2135_1 - channel: 1 - - platform: sm2135 - id: sm2135_2 - channel: 2 - - platform: sm2135 - id: sm2135_3 - channel: 3 - - platform: sm2135 - id: sm2135_4 - channel: 4 +<<: !include common.yaml diff --git a/tests/components/sm2235/common.yaml b/tests/components/sm2235/common.yaml new file mode 100644 index 000000000..043d43d6f --- /dev/null +++ b/tests/components/sm2235/common.yaml @@ -0,0 +1,22 @@ +sm2235: + clock_pin: 4 + data_pin: 5 + max_power_color_channels: 9 + max_power_white_channels: 9 + +output: + - platform: sm2235 + id: sm2235_red + channel: 1 + - platform: sm2235 + id: sm2235_green + channel: 0 + - platform: sm2235 + id: sm2235_blue + channel: 2 + - platform: sm2235 + id: sm2235_coldwhite + channel: 4 + - platform: sm2235 + id: sm2235_warmwhite + channel: 3 diff --git a/tests/components/sm2235/test.esp32-c3-idf.yaml b/tests/components/sm2235/test.esp32-c3-idf.yaml index 043d43d6f..dade44d14 100644 --- a/tests/components/sm2235/test.esp32-c3-idf.yaml +++ b/tests/components/sm2235/test.esp32-c3-idf.yaml @@ -1,22 +1 @@ -sm2235: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2235 - id: sm2235_red - channel: 1 - - platform: sm2235 - id: sm2235_green - channel: 0 - - platform: sm2235 - id: sm2235_blue - channel: 2 - - platform: sm2235 - id: sm2235_coldwhite - channel: 4 - - platform: sm2235 - id: sm2235_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2235/test.esp32-c3.yaml b/tests/components/sm2235/test.esp32-c3.yaml index 043d43d6f..dade44d14 100644 --- a/tests/components/sm2235/test.esp32-c3.yaml +++ b/tests/components/sm2235/test.esp32-c3.yaml @@ -1,22 +1 @@ -sm2235: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2235 - id: sm2235_red - channel: 1 - - platform: sm2235 - id: sm2235_green - channel: 0 - - platform: sm2235 - id: sm2235_blue - channel: 2 - - platform: sm2235 - id: sm2235_coldwhite - channel: 4 - - platform: sm2235 - id: sm2235_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2235/test.esp32-idf.yaml b/tests/components/sm2235/test.esp32-idf.yaml index 043d43d6f..dade44d14 100644 --- a/tests/components/sm2235/test.esp32-idf.yaml +++ b/tests/components/sm2235/test.esp32-idf.yaml @@ -1,22 +1 @@ -sm2235: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2235 - id: sm2235_red - channel: 1 - - platform: sm2235 - id: sm2235_green - channel: 0 - - platform: sm2235 - id: sm2235_blue - channel: 2 - - platform: sm2235 - id: sm2235_coldwhite - channel: 4 - - platform: sm2235 - id: sm2235_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2235/test.esp32.yaml b/tests/components/sm2235/test.esp32.yaml index 043d43d6f..dade44d14 100644 --- a/tests/components/sm2235/test.esp32.yaml +++ b/tests/components/sm2235/test.esp32.yaml @@ -1,22 +1 @@ -sm2235: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2235 - id: sm2235_red - channel: 1 - - platform: sm2235 - id: sm2235_green - channel: 0 - - platform: sm2235 - id: sm2235_blue - channel: 2 - - platform: sm2235 - id: sm2235_coldwhite - channel: 4 - - platform: sm2235 - id: sm2235_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2235/test.esp8266.yaml b/tests/components/sm2235/test.esp8266.yaml index 043d43d6f..dade44d14 100644 --- a/tests/components/sm2235/test.esp8266.yaml +++ b/tests/components/sm2235/test.esp8266.yaml @@ -1,22 +1 @@ -sm2235: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2235 - id: sm2235_red - channel: 1 - - platform: sm2235 - id: sm2235_green - channel: 0 - - platform: sm2235 - id: sm2235_blue - channel: 2 - - platform: sm2235 - id: sm2235_coldwhite - channel: 4 - - platform: sm2235 - id: sm2235_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2235/test.rp2040.yaml b/tests/components/sm2235/test.rp2040.yaml index 043d43d6f..dade44d14 100644 --- a/tests/components/sm2235/test.rp2040.yaml +++ b/tests/components/sm2235/test.rp2040.yaml @@ -1,22 +1 @@ -sm2235: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2235 - id: sm2235_red - channel: 1 - - platform: sm2235 - id: sm2235_green - channel: 0 - - platform: sm2235 - id: sm2235_blue - channel: 2 - - platform: sm2235 - id: sm2235_coldwhite - channel: 4 - - platform: sm2235 - id: sm2235_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2335/common.yaml b/tests/components/sm2335/common.yaml new file mode 100644 index 000000000..a5b2aedeb --- /dev/null +++ b/tests/components/sm2335/common.yaml @@ -0,0 +1,22 @@ +sm2335: + clock_pin: 4 + data_pin: 5 + max_power_color_channels: 9 + max_power_white_channels: 9 + +output: + - platform: sm2335 + id: sm2335_red + channel: 1 + - platform: sm2335 + id: sm2335_green + channel: 0 + - platform: sm2335 + id: sm2335_blue + channel: 2 + - platform: sm2335 + id: sm2335_coldwhite + channel: 4 + - platform: sm2335 + id: sm2335_warmwhite + channel: 3 diff --git a/tests/components/sm2335/test.esp32-c3-idf.yaml b/tests/components/sm2335/test.esp32-c3-idf.yaml index a5b2aedeb..dade44d14 100644 --- a/tests/components/sm2335/test.esp32-c3-idf.yaml +++ b/tests/components/sm2335/test.esp32-c3-idf.yaml @@ -1,22 +1 @@ -sm2335: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2335 - id: sm2335_red - channel: 1 - - platform: sm2335 - id: sm2335_green - channel: 0 - - platform: sm2335 - id: sm2335_blue - channel: 2 - - platform: sm2335 - id: sm2335_coldwhite - channel: 4 - - platform: sm2335 - id: sm2335_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2335/test.esp32-c3.yaml b/tests/components/sm2335/test.esp32-c3.yaml index a5b2aedeb..dade44d14 100644 --- a/tests/components/sm2335/test.esp32-c3.yaml +++ b/tests/components/sm2335/test.esp32-c3.yaml @@ -1,22 +1 @@ -sm2335: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2335 - id: sm2335_red - channel: 1 - - platform: sm2335 - id: sm2335_green - channel: 0 - - platform: sm2335 - id: sm2335_blue - channel: 2 - - platform: sm2335 - id: sm2335_coldwhite - channel: 4 - - platform: sm2335 - id: sm2335_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2335/test.esp32-idf.yaml b/tests/components/sm2335/test.esp32-idf.yaml index a5b2aedeb..dade44d14 100644 --- a/tests/components/sm2335/test.esp32-idf.yaml +++ b/tests/components/sm2335/test.esp32-idf.yaml @@ -1,22 +1 @@ -sm2335: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2335 - id: sm2335_red - channel: 1 - - platform: sm2335 - id: sm2335_green - channel: 0 - - platform: sm2335 - id: sm2335_blue - channel: 2 - - platform: sm2335 - id: sm2335_coldwhite - channel: 4 - - platform: sm2335 - id: sm2335_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2335/test.esp32.yaml b/tests/components/sm2335/test.esp32.yaml index a5b2aedeb..dade44d14 100644 --- a/tests/components/sm2335/test.esp32.yaml +++ b/tests/components/sm2335/test.esp32.yaml @@ -1,22 +1 @@ -sm2335: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2335 - id: sm2335_red - channel: 1 - - platform: sm2335 - id: sm2335_green - channel: 0 - - platform: sm2335 - id: sm2335_blue - channel: 2 - - platform: sm2335 - id: sm2335_coldwhite - channel: 4 - - platform: sm2335 - id: sm2335_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2335/test.esp8266.yaml b/tests/components/sm2335/test.esp8266.yaml index a5b2aedeb..dade44d14 100644 --- a/tests/components/sm2335/test.esp8266.yaml +++ b/tests/components/sm2335/test.esp8266.yaml @@ -1,22 +1 @@ -sm2335: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2335 - id: sm2335_red - channel: 1 - - platform: sm2335 - id: sm2335_green - channel: 0 - - platform: sm2335 - id: sm2335_blue - channel: 2 - - platform: sm2335 - id: sm2335_coldwhite - channel: 4 - - platform: sm2335 - id: sm2335_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sm2335/test.rp2040.yaml b/tests/components/sm2335/test.rp2040.yaml index a5b2aedeb..dade44d14 100644 --- a/tests/components/sm2335/test.rp2040.yaml +++ b/tests/components/sm2335/test.rp2040.yaml @@ -1,22 +1 @@ -sm2335: - clock_pin: 4 - data_pin: 5 - max_power_color_channels: 9 - max_power_white_channels: 9 - -output: - - platform: sm2335 - id: sm2335_red - channel: 1 - - platform: sm2335 - id: sm2335_green - channel: 0 - - platform: sm2335 - id: sm2335_blue - channel: 2 - - platform: sm2335 - id: sm2335_coldwhite - channel: 4 - - platform: sm2335 - id: sm2335_warmwhite - channel: 3 +<<: !include common.yaml diff --git a/tests/components/sntp/common.yaml b/tests/components/sntp/common.yaml new file mode 100644 index 000000000..3e9e46529 --- /dev/null +++ b/tests/components/sntp/common.yaml @@ -0,0 +1,15 @@ +wifi: + ssid: MySSID + password: password1 + +time: + - platform: sntp + id: sntp_time + servers: + - 0.pool.ntp.org + - 1.pool.ntp.org + - 192.168.178.1 + on_time: + cron: "/30 0-30,30/5 * ? JAN-DEC MON,SAT-SUN,TUE-FRI" + then: + - lambda: 'ESP_LOGD("main", "time");' diff --git a/tests/components/sntp/test.esp32-c3-idf.yaml b/tests/components/sntp/test.esp32-c3-idf.yaml index 3e9e46529..dade44d14 100644 --- a/tests/components/sntp/test.esp32-c3-idf.yaml +++ b/tests/components/sntp/test.esp32-c3-idf.yaml @@ -1,15 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org - - 1.pool.ntp.org - - 192.168.178.1 - on_time: - cron: "/30 0-30,30/5 * ? JAN-DEC MON,SAT-SUN,TUE-FRI" - then: - - lambda: 'ESP_LOGD("main", "time");' +<<: !include common.yaml diff --git a/tests/components/sntp/test.esp32-c3.yaml b/tests/components/sntp/test.esp32-c3.yaml index 3e9e46529..dade44d14 100644 --- a/tests/components/sntp/test.esp32-c3.yaml +++ b/tests/components/sntp/test.esp32-c3.yaml @@ -1,15 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org - - 1.pool.ntp.org - - 192.168.178.1 - on_time: - cron: "/30 0-30,30/5 * ? JAN-DEC MON,SAT-SUN,TUE-FRI" - then: - - lambda: 'ESP_LOGD("main", "time");' +<<: !include common.yaml diff --git a/tests/components/sntp/test.esp32-idf.yaml b/tests/components/sntp/test.esp32-idf.yaml index 3e9e46529..dade44d14 100644 --- a/tests/components/sntp/test.esp32-idf.yaml +++ b/tests/components/sntp/test.esp32-idf.yaml @@ -1,15 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org - - 1.pool.ntp.org - - 192.168.178.1 - on_time: - cron: "/30 0-30,30/5 * ? JAN-DEC MON,SAT-SUN,TUE-FRI" - then: - - lambda: 'ESP_LOGD("main", "time");' +<<: !include common.yaml diff --git a/tests/components/sntp/test.esp32.yaml b/tests/components/sntp/test.esp32.yaml index 3e9e46529..dade44d14 100644 --- a/tests/components/sntp/test.esp32.yaml +++ b/tests/components/sntp/test.esp32.yaml @@ -1,15 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org - - 1.pool.ntp.org - - 192.168.178.1 - on_time: - cron: "/30 0-30,30/5 * ? JAN-DEC MON,SAT-SUN,TUE-FRI" - then: - - lambda: 'ESP_LOGD("main", "time");' +<<: !include common.yaml diff --git a/tests/components/sntp/test.esp8266.yaml b/tests/components/sntp/test.esp8266.yaml index 3e9e46529..dade44d14 100644 --- a/tests/components/sntp/test.esp8266.yaml +++ b/tests/components/sntp/test.esp8266.yaml @@ -1,15 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org - - 1.pool.ntp.org - - 192.168.178.1 - on_time: - cron: "/30 0-30,30/5 * ? JAN-DEC MON,SAT-SUN,TUE-FRI" - then: - - lambda: 'ESP_LOGD("main", "time");' +<<: !include common.yaml diff --git a/tests/components/sntp/test.rp2040.yaml b/tests/components/sntp/test.rp2040.yaml index 3e9e46529..dade44d14 100644 --- a/tests/components/sntp/test.rp2040.yaml +++ b/tests/components/sntp/test.rp2040.yaml @@ -1,15 +1 @@ -wifi: - ssid: MySSID - password: password1 - -time: - - platform: sntp - id: sntp_time - servers: - - 0.pool.ntp.org - - 1.pool.ntp.org - - 192.168.178.1 - on_time: - cron: "/30 0-30,30/5 * ? JAN-DEC MON,SAT-SUN,TUE-FRI" - then: - - lambda: 'ESP_LOGD("main", "time");' +<<: !include common.yaml diff --git a/tests/components/sprinkler/common.yaml b/tests/components/sprinkler/common.yaml new file mode 100644 index 000000000..f099f7772 --- /dev/null +++ b/tests/components/sprinkler/common.yaml @@ -0,0 +1,83 @@ +esphome: + on_boot: + then: + - sprinkler.start_full_cycle: yard_sprinkler_ctrlr + - sprinkler.start_from_queue: yard_sprinkler_ctrlr + - sprinkler.start_single_valve: + id: yard_sprinkler_ctrlr + valve_number: 0 + run_duration: 600s + - sprinkler.shutdown: yard_sprinkler_ctrlr + - sprinkler.next_valve: yard_sprinkler_ctrlr + - sprinkler.previous_valve: yard_sprinkler_ctrlr + - sprinkler.pause: yard_sprinkler_ctrlr + - sprinkler.resume: yard_sprinkler_ctrlr + - sprinkler.resume_or_start_full_cycle: yard_sprinkler_ctrlr + - sprinkler.queue_valve: + id: yard_sprinkler_ctrlr + valve_number: 2 + run_duration: 900s + - sprinkler.clear_queued_valves: yard_sprinkler_ctrlr + - sprinkler.set_multiplier: + id: yard_sprinkler_ctrlr + multiplier: 1.5 + - sprinkler.set_repeat: + id: yard_sprinkler_ctrlr + repeat: 2 + - sprinkler.set_divider: + id: yard_sprinkler_ctrlr + divider: 2 + - sprinkler.set_valve_run_duration: + id: yard_sprinkler_ctrlr + valve_number: 0 + run_duration: 600s + +switch: + - platform: template + id: switch1 + optimistic: true + - platform: template + id: switch2 + optimistic: true + +sprinkler: + - id: yard_sprinkler_ctrlr + main_switch: Yard Sprinklers + auto_advance_switch: Yard Sprinklers Auto Advance + reverse_switch: Yard Sprinklers Reverse + pump_start_pump_delay: 2s + pump_stop_valve_delay: 4s + pump_switch_off_during_valve_open_delay: true + valve_open_delay: 5s + valves: + - valve_switch: Yard Valve 0 + enable_switch: Enable Yard Valve 0 + pump_switch_id: switch1 + run_duration: 10s + valve_switch_id: switch2 + - valve_switch: Yard Valve 1 + enable_switch: Enable Yard Valve 1 + pump_switch_id: switch1 + run_duration: 10s + valve_switch_id: switch2 + - valve_switch: Yard Valve 2 + enable_switch: Enable Yard Valve 2 + pump_switch_id: switch1 + run_duration: 10s + valve_switch_id: switch2 + - id: garden_sprinkler_ctrlr + main_switch: Garden Sprinklers + auto_advance_switch: Garden Sprinklers Auto Advance + reverse_switch: Garden Sprinklers Reverse + valve_overlap: 5s + valves: + - valve_switch: Garden Valve 0 + enable_switch: Enable Garden Valve 0 + pump_switch_id: switch1 + run_duration: 10s + valve_switch_id: switch2 + - valve_switch: Garden Valve 1 + enable_switch: Enable Garden Valve 1 + pump_switch_id: switch1 + run_duration: 10s + valve_switch_id: switch2 diff --git a/tests/components/sprinkler/test.esp32-c3-idf.yaml b/tests/components/sprinkler/test.esp32-c3-idf.yaml index f099f7772..dade44d14 100644 --- a/tests/components/sprinkler/test.esp32-c3-idf.yaml +++ b/tests/components/sprinkler/test.esp32-c3-idf.yaml @@ -1,83 +1 @@ -esphome: - on_boot: - then: - - sprinkler.start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.start_from_queue: yard_sprinkler_ctrlr - - sprinkler.start_single_valve: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - - sprinkler.shutdown: yard_sprinkler_ctrlr - - sprinkler.next_valve: yard_sprinkler_ctrlr - - sprinkler.previous_valve: yard_sprinkler_ctrlr - - sprinkler.pause: yard_sprinkler_ctrlr - - sprinkler.resume: yard_sprinkler_ctrlr - - sprinkler.resume_or_start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.queue_valve: - id: yard_sprinkler_ctrlr - valve_number: 2 - run_duration: 900s - - sprinkler.clear_queued_valves: yard_sprinkler_ctrlr - - sprinkler.set_multiplier: - id: yard_sprinkler_ctrlr - multiplier: 1.5 - - sprinkler.set_repeat: - id: yard_sprinkler_ctrlr - repeat: 2 - - sprinkler.set_divider: - id: yard_sprinkler_ctrlr - divider: 2 - - sprinkler.set_valve_run_duration: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - -switch: - - platform: template - id: switch1 - optimistic: true - - platform: template - id: switch2 - optimistic: true - -sprinkler: - - id: yard_sprinkler_ctrlr - main_switch: Yard Sprinklers - auto_advance_switch: Yard Sprinklers Auto Advance - reverse_switch: Yard Sprinklers Reverse - pump_start_pump_delay: 2s - pump_stop_valve_delay: 4s - pump_switch_off_during_valve_open_delay: true - valve_open_delay: 5s - valves: - - valve_switch: Yard Valve 0 - enable_switch: Enable Yard Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 1 - enable_switch: Enable Yard Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 2 - enable_switch: Enable Yard Valve 2 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - id: garden_sprinkler_ctrlr - main_switch: Garden Sprinklers - auto_advance_switch: Garden Sprinklers Auto Advance - reverse_switch: Garden Sprinklers Reverse - valve_overlap: 5s - valves: - - valve_switch: Garden Valve 0 - enable_switch: Enable Garden Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Garden Valve 1 - enable_switch: Enable Garden Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 +<<: !include common.yaml diff --git a/tests/components/sprinkler/test.esp32-c3.yaml b/tests/components/sprinkler/test.esp32-c3.yaml index f099f7772..dade44d14 100644 --- a/tests/components/sprinkler/test.esp32-c3.yaml +++ b/tests/components/sprinkler/test.esp32-c3.yaml @@ -1,83 +1 @@ -esphome: - on_boot: - then: - - sprinkler.start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.start_from_queue: yard_sprinkler_ctrlr - - sprinkler.start_single_valve: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - - sprinkler.shutdown: yard_sprinkler_ctrlr - - sprinkler.next_valve: yard_sprinkler_ctrlr - - sprinkler.previous_valve: yard_sprinkler_ctrlr - - sprinkler.pause: yard_sprinkler_ctrlr - - sprinkler.resume: yard_sprinkler_ctrlr - - sprinkler.resume_or_start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.queue_valve: - id: yard_sprinkler_ctrlr - valve_number: 2 - run_duration: 900s - - sprinkler.clear_queued_valves: yard_sprinkler_ctrlr - - sprinkler.set_multiplier: - id: yard_sprinkler_ctrlr - multiplier: 1.5 - - sprinkler.set_repeat: - id: yard_sprinkler_ctrlr - repeat: 2 - - sprinkler.set_divider: - id: yard_sprinkler_ctrlr - divider: 2 - - sprinkler.set_valve_run_duration: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - -switch: - - platform: template - id: switch1 - optimistic: true - - platform: template - id: switch2 - optimistic: true - -sprinkler: - - id: yard_sprinkler_ctrlr - main_switch: Yard Sprinklers - auto_advance_switch: Yard Sprinklers Auto Advance - reverse_switch: Yard Sprinklers Reverse - pump_start_pump_delay: 2s - pump_stop_valve_delay: 4s - pump_switch_off_during_valve_open_delay: true - valve_open_delay: 5s - valves: - - valve_switch: Yard Valve 0 - enable_switch: Enable Yard Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 1 - enable_switch: Enable Yard Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 2 - enable_switch: Enable Yard Valve 2 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - id: garden_sprinkler_ctrlr - main_switch: Garden Sprinklers - auto_advance_switch: Garden Sprinklers Auto Advance - reverse_switch: Garden Sprinklers Reverse - valve_overlap: 5s - valves: - - valve_switch: Garden Valve 0 - enable_switch: Enable Garden Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Garden Valve 1 - enable_switch: Enable Garden Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 +<<: !include common.yaml diff --git a/tests/components/sprinkler/test.esp32-idf.yaml b/tests/components/sprinkler/test.esp32-idf.yaml index f099f7772..dade44d14 100644 --- a/tests/components/sprinkler/test.esp32-idf.yaml +++ b/tests/components/sprinkler/test.esp32-idf.yaml @@ -1,83 +1 @@ -esphome: - on_boot: - then: - - sprinkler.start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.start_from_queue: yard_sprinkler_ctrlr - - sprinkler.start_single_valve: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - - sprinkler.shutdown: yard_sprinkler_ctrlr - - sprinkler.next_valve: yard_sprinkler_ctrlr - - sprinkler.previous_valve: yard_sprinkler_ctrlr - - sprinkler.pause: yard_sprinkler_ctrlr - - sprinkler.resume: yard_sprinkler_ctrlr - - sprinkler.resume_or_start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.queue_valve: - id: yard_sprinkler_ctrlr - valve_number: 2 - run_duration: 900s - - sprinkler.clear_queued_valves: yard_sprinkler_ctrlr - - sprinkler.set_multiplier: - id: yard_sprinkler_ctrlr - multiplier: 1.5 - - sprinkler.set_repeat: - id: yard_sprinkler_ctrlr - repeat: 2 - - sprinkler.set_divider: - id: yard_sprinkler_ctrlr - divider: 2 - - sprinkler.set_valve_run_duration: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - -switch: - - platform: template - id: switch1 - optimistic: true - - platform: template - id: switch2 - optimistic: true - -sprinkler: - - id: yard_sprinkler_ctrlr - main_switch: Yard Sprinklers - auto_advance_switch: Yard Sprinklers Auto Advance - reverse_switch: Yard Sprinklers Reverse - pump_start_pump_delay: 2s - pump_stop_valve_delay: 4s - pump_switch_off_during_valve_open_delay: true - valve_open_delay: 5s - valves: - - valve_switch: Yard Valve 0 - enable_switch: Enable Yard Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 1 - enable_switch: Enable Yard Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 2 - enable_switch: Enable Yard Valve 2 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - id: garden_sprinkler_ctrlr - main_switch: Garden Sprinklers - auto_advance_switch: Garden Sprinklers Auto Advance - reverse_switch: Garden Sprinklers Reverse - valve_overlap: 5s - valves: - - valve_switch: Garden Valve 0 - enable_switch: Enable Garden Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Garden Valve 1 - enable_switch: Enable Garden Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 +<<: !include common.yaml diff --git a/tests/components/sprinkler/test.esp32.yaml b/tests/components/sprinkler/test.esp32.yaml index f099f7772..dade44d14 100644 --- a/tests/components/sprinkler/test.esp32.yaml +++ b/tests/components/sprinkler/test.esp32.yaml @@ -1,83 +1 @@ -esphome: - on_boot: - then: - - sprinkler.start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.start_from_queue: yard_sprinkler_ctrlr - - sprinkler.start_single_valve: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - - sprinkler.shutdown: yard_sprinkler_ctrlr - - sprinkler.next_valve: yard_sprinkler_ctrlr - - sprinkler.previous_valve: yard_sprinkler_ctrlr - - sprinkler.pause: yard_sprinkler_ctrlr - - sprinkler.resume: yard_sprinkler_ctrlr - - sprinkler.resume_or_start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.queue_valve: - id: yard_sprinkler_ctrlr - valve_number: 2 - run_duration: 900s - - sprinkler.clear_queued_valves: yard_sprinkler_ctrlr - - sprinkler.set_multiplier: - id: yard_sprinkler_ctrlr - multiplier: 1.5 - - sprinkler.set_repeat: - id: yard_sprinkler_ctrlr - repeat: 2 - - sprinkler.set_divider: - id: yard_sprinkler_ctrlr - divider: 2 - - sprinkler.set_valve_run_duration: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - -switch: - - platform: template - id: switch1 - optimistic: true - - platform: template - id: switch2 - optimistic: true - -sprinkler: - - id: yard_sprinkler_ctrlr - main_switch: Yard Sprinklers - auto_advance_switch: Yard Sprinklers Auto Advance - reverse_switch: Yard Sprinklers Reverse - pump_start_pump_delay: 2s - pump_stop_valve_delay: 4s - pump_switch_off_during_valve_open_delay: true - valve_open_delay: 5s - valves: - - valve_switch: Yard Valve 0 - enable_switch: Enable Yard Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 1 - enable_switch: Enable Yard Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 2 - enable_switch: Enable Yard Valve 2 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - id: garden_sprinkler_ctrlr - main_switch: Garden Sprinklers - auto_advance_switch: Garden Sprinklers Auto Advance - reverse_switch: Garden Sprinklers Reverse - valve_overlap: 5s - valves: - - valve_switch: Garden Valve 0 - enable_switch: Enable Garden Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Garden Valve 1 - enable_switch: Enable Garden Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 +<<: !include common.yaml diff --git a/tests/components/sprinkler/test.esp8266.yaml b/tests/components/sprinkler/test.esp8266.yaml index f099f7772..dade44d14 100644 --- a/tests/components/sprinkler/test.esp8266.yaml +++ b/tests/components/sprinkler/test.esp8266.yaml @@ -1,83 +1 @@ -esphome: - on_boot: - then: - - sprinkler.start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.start_from_queue: yard_sprinkler_ctrlr - - sprinkler.start_single_valve: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - - sprinkler.shutdown: yard_sprinkler_ctrlr - - sprinkler.next_valve: yard_sprinkler_ctrlr - - sprinkler.previous_valve: yard_sprinkler_ctrlr - - sprinkler.pause: yard_sprinkler_ctrlr - - sprinkler.resume: yard_sprinkler_ctrlr - - sprinkler.resume_or_start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.queue_valve: - id: yard_sprinkler_ctrlr - valve_number: 2 - run_duration: 900s - - sprinkler.clear_queued_valves: yard_sprinkler_ctrlr - - sprinkler.set_multiplier: - id: yard_sprinkler_ctrlr - multiplier: 1.5 - - sprinkler.set_repeat: - id: yard_sprinkler_ctrlr - repeat: 2 - - sprinkler.set_divider: - id: yard_sprinkler_ctrlr - divider: 2 - - sprinkler.set_valve_run_duration: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - -switch: - - platform: template - id: switch1 - optimistic: true - - platform: template - id: switch2 - optimistic: true - -sprinkler: - - id: yard_sprinkler_ctrlr - main_switch: Yard Sprinklers - auto_advance_switch: Yard Sprinklers Auto Advance - reverse_switch: Yard Sprinklers Reverse - pump_start_pump_delay: 2s - pump_stop_valve_delay: 4s - pump_switch_off_during_valve_open_delay: true - valve_open_delay: 5s - valves: - - valve_switch: Yard Valve 0 - enable_switch: Enable Yard Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 1 - enable_switch: Enable Yard Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 2 - enable_switch: Enable Yard Valve 2 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - id: garden_sprinkler_ctrlr - main_switch: Garden Sprinklers - auto_advance_switch: Garden Sprinklers Auto Advance - reverse_switch: Garden Sprinklers Reverse - valve_overlap: 5s - valves: - - valve_switch: Garden Valve 0 - enable_switch: Enable Garden Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Garden Valve 1 - enable_switch: Enable Garden Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 +<<: !include common.yaml diff --git a/tests/components/sprinkler/test.rp2040.yaml b/tests/components/sprinkler/test.rp2040.yaml index f099f7772..dade44d14 100644 --- a/tests/components/sprinkler/test.rp2040.yaml +++ b/tests/components/sprinkler/test.rp2040.yaml @@ -1,83 +1 @@ -esphome: - on_boot: - then: - - sprinkler.start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.start_from_queue: yard_sprinkler_ctrlr - - sprinkler.start_single_valve: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - - sprinkler.shutdown: yard_sprinkler_ctrlr - - sprinkler.next_valve: yard_sprinkler_ctrlr - - sprinkler.previous_valve: yard_sprinkler_ctrlr - - sprinkler.pause: yard_sprinkler_ctrlr - - sprinkler.resume: yard_sprinkler_ctrlr - - sprinkler.resume_or_start_full_cycle: yard_sprinkler_ctrlr - - sprinkler.queue_valve: - id: yard_sprinkler_ctrlr - valve_number: 2 - run_duration: 900s - - sprinkler.clear_queued_valves: yard_sprinkler_ctrlr - - sprinkler.set_multiplier: - id: yard_sprinkler_ctrlr - multiplier: 1.5 - - sprinkler.set_repeat: - id: yard_sprinkler_ctrlr - repeat: 2 - - sprinkler.set_divider: - id: yard_sprinkler_ctrlr - divider: 2 - - sprinkler.set_valve_run_duration: - id: yard_sprinkler_ctrlr - valve_number: 0 - run_duration: 600s - -switch: - - platform: template - id: switch1 - optimistic: true - - platform: template - id: switch2 - optimistic: true - -sprinkler: - - id: yard_sprinkler_ctrlr - main_switch: Yard Sprinklers - auto_advance_switch: Yard Sprinklers Auto Advance - reverse_switch: Yard Sprinklers Reverse - pump_start_pump_delay: 2s - pump_stop_valve_delay: 4s - pump_switch_off_during_valve_open_delay: true - valve_open_delay: 5s - valves: - - valve_switch: Yard Valve 0 - enable_switch: Enable Yard Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 1 - enable_switch: Enable Yard Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Yard Valve 2 - enable_switch: Enable Yard Valve 2 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - id: garden_sprinkler_ctrlr - main_switch: Garden Sprinklers - auto_advance_switch: Garden Sprinklers Auto Advance - reverse_switch: Garden Sprinklers Reverse - valve_overlap: 5s - valves: - - valve_switch: Garden Valve 0 - enable_switch: Enable Garden Valve 0 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 - - valve_switch: Garden Valve 1 - enable_switch: Enable Garden Valve 1 - pump_switch_id: switch1 - run_duration: 10s - valve_switch_id: switch2 +<<: !include common.yaml diff --git a/tests/components/st7701s/common.yaml b/tests/components/st7701s/common.yaml new file mode 100644 index 000000000..497df8c8c --- /dev/null +++ b/tests/components/st7701s/common.yaml @@ -0,0 +1,60 @@ +psram: + mode: octal + speed: 80MHz +spi: + - id: lcd_spi + clk_pin: 41 + mosi_pin: 48 + +i2c: + sda: 39 + scl: 40 + scan: false + id: bus_a + +pca9554: + - id: p_c_a + pin_count: 16 + address: 0x20 + +display: + - platform: st7701s + spi_mode: MODE3 + color_order: RGB + dimensions: + width: 480 + height: 480 + invert_colors: true + transform: + mirror_x: true + mirror_y: true + cs_pin: + pca9554: p_c_a + number: 4 + reset_pin: + pca9554: p_c_a + number: 5 + de_pin: 18 + hsync_pin: 16 + vsync_pin: 17 + pclk_pin: 21 + init_sequence: 1 + data_pins: + - number: 0 + ignore_strapping_warning: true + - 1 + - 2 + - 3 + - number: 4 + ignore_strapping_warning: false + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + - 12 + - 13 + - 14 + - 15 diff --git a/tests/components/st7701s/test.esp32-s3-idf.yaml b/tests/components/st7701s/test.esp32-s3-idf.yaml index 497df8c8c..dade44d14 100644 --- a/tests/components/st7701s/test.esp32-s3-idf.yaml +++ b/tests/components/st7701s/test.esp32-s3-idf.yaml @@ -1,60 +1 @@ -psram: - mode: octal - speed: 80MHz -spi: - - id: lcd_spi - clk_pin: 41 - mosi_pin: 48 - -i2c: - sda: 39 - scl: 40 - scan: false - id: bus_a - -pca9554: - - id: p_c_a - pin_count: 16 - address: 0x20 - -display: - - platform: st7701s - spi_mode: MODE3 - color_order: RGB - dimensions: - width: 480 - height: 480 - invert_colors: true - transform: - mirror_x: true - mirror_y: true - cs_pin: - pca9554: p_c_a - number: 4 - reset_pin: - pca9554: p_c_a - number: 5 - de_pin: 18 - hsync_pin: 16 - vsync_pin: 17 - pclk_pin: 21 - init_sequence: 1 - data_pins: - - number: 0 - ignore_strapping_warning: true - - 1 - - 2 - - 3 - - number: 4 - ignore_strapping_warning: false - - 5 - - 6 - - 7 - - 8 - - 9 - - 10 - - 11 - - 12 - - 13 - - 14 - - 15 +<<: !include common.yaml diff --git a/tests/components/status/common.yaml b/tests/components/status/common.yaml new file mode 100644 index 000000000..c14157566 --- /dev/null +++ b/tests/components/status/common.yaml @@ -0,0 +1,10 @@ +wifi: + ssid: MySSID + password: password1 + +api: + +binary_sensor: + - platform: status + id: node_status + name: Node Status diff --git a/tests/components/status/test.esp32-c3-idf.yaml b/tests/components/status/test.esp32-c3-idf.yaml index c14157566..dade44d14 100644 --- a/tests/components/status/test.esp32-c3-idf.yaml +++ b/tests/components/status/test.esp32-c3-idf.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -binary_sensor: - - platform: status - id: node_status - name: Node Status +<<: !include common.yaml diff --git a/tests/components/status/test.esp32-c3.yaml b/tests/components/status/test.esp32-c3.yaml index c14157566..dade44d14 100644 --- a/tests/components/status/test.esp32-c3.yaml +++ b/tests/components/status/test.esp32-c3.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -binary_sensor: - - platform: status - id: node_status - name: Node Status +<<: !include common.yaml diff --git a/tests/components/status/test.esp32-idf.yaml b/tests/components/status/test.esp32-idf.yaml index c14157566..dade44d14 100644 --- a/tests/components/status/test.esp32-idf.yaml +++ b/tests/components/status/test.esp32-idf.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -binary_sensor: - - platform: status - id: node_status - name: Node Status +<<: !include common.yaml diff --git a/tests/components/status/test.esp32.yaml b/tests/components/status/test.esp32.yaml index c14157566..dade44d14 100644 --- a/tests/components/status/test.esp32.yaml +++ b/tests/components/status/test.esp32.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -binary_sensor: - - platform: status - id: node_status - name: Node Status +<<: !include common.yaml diff --git a/tests/components/status/test.esp8266.yaml b/tests/components/status/test.esp8266.yaml index c14157566..dade44d14 100644 --- a/tests/components/status/test.esp8266.yaml +++ b/tests/components/status/test.esp8266.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -binary_sensor: - - platform: status - id: node_status - name: Node Status +<<: !include common.yaml diff --git a/tests/components/status/test.rp2040.yaml b/tests/components/status/test.rp2040.yaml index c14157566..dade44d14 100644 --- a/tests/components/status/test.rp2040.yaml +++ b/tests/components/status/test.rp2040.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -binary_sensor: - - platform: status - id: node_status - name: Node Status +<<: !include common.yaml diff --git a/tests/components/status_led/common.yaml b/tests/components/status_led/common.yaml new file mode 100644 index 000000000..ec66c219d --- /dev/null +++ b/tests/components/status_led/common.yaml @@ -0,0 +1,10 @@ +wifi: + ssid: MySSID + password: password1 + +api: + +light: + - platform: status_led + name: Switch State + pin: 4 diff --git a/tests/components/status_led/test.esp32-c3-idf.yaml b/tests/components/status_led/test.esp32-c3-idf.yaml index ec66c219d..dade44d14 100644 --- a/tests/components/status_led/test.esp32-c3-idf.yaml +++ b/tests/components/status_led/test.esp32-c3-idf.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -light: - - platform: status_led - name: Switch State - pin: 4 +<<: !include common.yaml diff --git a/tests/components/status_led/test.esp32-c3.yaml b/tests/components/status_led/test.esp32-c3.yaml index ec66c219d..dade44d14 100644 --- a/tests/components/status_led/test.esp32-c3.yaml +++ b/tests/components/status_led/test.esp32-c3.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -light: - - platform: status_led - name: Switch State - pin: 4 +<<: !include common.yaml diff --git a/tests/components/status_led/test.esp32-idf.yaml b/tests/components/status_led/test.esp32-idf.yaml index ec66c219d..dade44d14 100644 --- a/tests/components/status_led/test.esp32-idf.yaml +++ b/tests/components/status_led/test.esp32-idf.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -light: - - platform: status_led - name: Switch State - pin: 4 +<<: !include common.yaml diff --git a/tests/components/status_led/test.esp32.yaml b/tests/components/status_led/test.esp32.yaml index ec66c219d..dade44d14 100644 --- a/tests/components/status_led/test.esp32.yaml +++ b/tests/components/status_led/test.esp32.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -light: - - platform: status_led - name: Switch State - pin: 4 +<<: !include common.yaml diff --git a/tests/components/status_led/test.esp8266.yaml b/tests/components/status_led/test.esp8266.yaml index ec66c219d..dade44d14 100644 --- a/tests/components/status_led/test.esp8266.yaml +++ b/tests/components/status_led/test.esp8266.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -light: - - platform: status_led - name: Switch State - pin: 4 +<<: !include common.yaml diff --git a/tests/components/status_led/test.rp2040.yaml b/tests/components/status_led/test.rp2040.yaml index ec66c219d..dade44d14 100644 --- a/tests/components/status_led/test.rp2040.yaml +++ b/tests/components/status_led/test.rp2040.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -light: - - platform: status_led - name: Switch State - pin: 4 +<<: !include common.yaml diff --git a/tests/components/stepper/common.yaml b/tests/components/stepper/common.yaml new file mode 100644 index 000000000..fcf575961 --- /dev/null +++ b/tests/components/stepper/common.yaml @@ -0,0 +1,27 @@ +stepper: + - platform: a4988 + id: test_stepper + step_pin: 3 + dir_pin: 4 + sleep_pin: 5 + max_speed: 250 steps/s + acceleration: 100 steps/s^2 + deceleration: 200 steps/s^2 + +switch: + - platform: template + name: Stepper Switch + assumed_state: true + turn_on_action: + - stepper.set_target: + id: test_stepper + target: !lambda |- + static int32_t i = 0; + i += 1000; + if (i > 5000) { + i = -5000; + } + return i; + - stepper.report_position: + id: test_stepper + position: 0 diff --git a/tests/components/stepper/test.esp32-c3-idf.yaml b/tests/components/stepper/test.esp32-c3-idf.yaml index fcf575961..dade44d14 100644 --- a/tests/components/stepper/test.esp32-c3-idf.yaml +++ b/tests/components/stepper/test.esp32-c3-idf.yaml @@ -1,27 +1 @@ -stepper: - - platform: a4988 - id: test_stepper - step_pin: 3 - dir_pin: 4 - sleep_pin: 5 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 - -switch: - - platform: template - name: Stepper Switch - assumed_state: true - turn_on_action: - - stepper.set_target: - id: test_stepper - target: !lambda |- - static int32_t i = 0; - i += 1000; - if (i > 5000) { - i = -5000; - } - return i; - - stepper.report_position: - id: test_stepper - position: 0 +<<: !include common.yaml diff --git a/tests/components/stepper/test.esp32-c3.yaml b/tests/components/stepper/test.esp32-c3.yaml index fcf575961..dade44d14 100644 --- a/tests/components/stepper/test.esp32-c3.yaml +++ b/tests/components/stepper/test.esp32-c3.yaml @@ -1,27 +1 @@ -stepper: - - platform: a4988 - id: test_stepper - step_pin: 3 - dir_pin: 4 - sleep_pin: 5 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 - -switch: - - platform: template - name: Stepper Switch - assumed_state: true - turn_on_action: - - stepper.set_target: - id: test_stepper - target: !lambda |- - static int32_t i = 0; - i += 1000; - if (i > 5000) { - i = -5000; - } - return i; - - stepper.report_position: - id: test_stepper - position: 0 +<<: !include common.yaml diff --git a/tests/components/stepper/test.esp32-idf.yaml b/tests/components/stepper/test.esp32-idf.yaml index fcf575961..dade44d14 100644 --- a/tests/components/stepper/test.esp32-idf.yaml +++ b/tests/components/stepper/test.esp32-idf.yaml @@ -1,27 +1 @@ -stepper: - - platform: a4988 - id: test_stepper - step_pin: 3 - dir_pin: 4 - sleep_pin: 5 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 - -switch: - - platform: template - name: Stepper Switch - assumed_state: true - turn_on_action: - - stepper.set_target: - id: test_stepper - target: !lambda |- - static int32_t i = 0; - i += 1000; - if (i > 5000) { - i = -5000; - } - return i; - - stepper.report_position: - id: test_stepper - position: 0 +<<: !include common.yaml diff --git a/tests/components/stepper/test.esp32.yaml b/tests/components/stepper/test.esp32.yaml index fcf575961..dade44d14 100644 --- a/tests/components/stepper/test.esp32.yaml +++ b/tests/components/stepper/test.esp32.yaml @@ -1,27 +1 @@ -stepper: - - platform: a4988 - id: test_stepper - step_pin: 3 - dir_pin: 4 - sleep_pin: 5 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 - -switch: - - platform: template - name: Stepper Switch - assumed_state: true - turn_on_action: - - stepper.set_target: - id: test_stepper - target: !lambda |- - static int32_t i = 0; - i += 1000; - if (i > 5000) { - i = -5000; - } - return i; - - stepper.report_position: - id: test_stepper - position: 0 +<<: !include common.yaml diff --git a/tests/components/stepper/test.esp8266.yaml b/tests/components/stepper/test.esp8266.yaml index fcf575961..dade44d14 100644 --- a/tests/components/stepper/test.esp8266.yaml +++ b/tests/components/stepper/test.esp8266.yaml @@ -1,27 +1 @@ -stepper: - - platform: a4988 - id: test_stepper - step_pin: 3 - dir_pin: 4 - sleep_pin: 5 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 - -switch: - - platform: template - name: Stepper Switch - assumed_state: true - turn_on_action: - - stepper.set_target: - id: test_stepper - target: !lambda |- - static int32_t i = 0; - i += 1000; - if (i > 5000) { - i = -5000; - } - return i; - - stepper.report_position: - id: test_stepper - position: 0 +<<: !include common.yaml diff --git a/tests/components/stepper/test.rp2040.yaml b/tests/components/stepper/test.rp2040.yaml index fcf575961..dade44d14 100644 --- a/tests/components/stepper/test.rp2040.yaml +++ b/tests/components/stepper/test.rp2040.yaml @@ -1,27 +1 @@ -stepper: - - platform: a4988 - id: test_stepper - step_pin: 3 - dir_pin: 4 - sleep_pin: 5 - max_speed: 250 steps/s - acceleration: 100 steps/s^2 - deceleration: 200 steps/s^2 - -switch: - - platform: template - name: Stepper Switch - assumed_state: true - turn_on_action: - - stepper.set_target: - id: test_stepper - target: !lambda |- - static int32_t i = 0; - i += 1000; - if (i > 5000) { - i = -5000; - } - return i; - - stepper.report_position: - id: test_stepper - position: 0 +<<: !include common.yaml diff --git a/tests/components/sun/common.yaml b/tests/components/sun/common.yaml new file mode 100644 index 000000000..e0157424a --- /dev/null +++ b/tests/components/sun/common.yaml @@ -0,0 +1,38 @@ +wifi: + ssid: MySSID + password: password1 + +api: + +time: + - platform: homeassistant + id: homeassistant_time + +sun: + latitude: 48.8584° + longitude: 2.2945° + on_sunrise: + - then: + - logger.log: Good morning + - elevation: 5° + then: + - logger.log: Good morning again + on_sunset: + - then: + - logger.log: Good evening + +sensor: + - platform: sun + name: Sun Elevation + type: elevation + - platform: sun + name: Sun Azimuth + type: azimuth + +text_sensor: + - platform: sun + name: Sun Next Sunrise + type: sunrise + - platform: sun + name: Sun Next Sunset + type: sunset diff --git a/tests/components/sun/test.esp32-c3-idf.yaml b/tests/components/sun/test.esp32-c3-idf.yaml index e0157424a..dade44d14 100644 --- a/tests/components/sun/test.esp32-c3-idf.yaml +++ b/tests/components/sun/test.esp32-c3-idf.yaml @@ -1,38 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - id: homeassistant_time - -sun: - latitude: 48.8584° - longitude: 2.2945° - on_sunrise: - - then: - - logger.log: Good morning - - elevation: 5° - then: - - logger.log: Good morning again - on_sunset: - - then: - - logger.log: Good evening - -sensor: - - platform: sun - name: Sun Elevation - type: elevation - - platform: sun - name: Sun Azimuth - type: azimuth - -text_sensor: - - platform: sun - name: Sun Next Sunrise - type: sunrise - - platform: sun - name: Sun Next Sunset - type: sunset +<<: !include common.yaml diff --git a/tests/components/sun/test.esp32-c3.yaml b/tests/components/sun/test.esp32-c3.yaml index e0157424a..dade44d14 100644 --- a/tests/components/sun/test.esp32-c3.yaml +++ b/tests/components/sun/test.esp32-c3.yaml @@ -1,38 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - id: homeassistant_time - -sun: - latitude: 48.8584° - longitude: 2.2945° - on_sunrise: - - then: - - logger.log: Good morning - - elevation: 5° - then: - - logger.log: Good morning again - on_sunset: - - then: - - logger.log: Good evening - -sensor: - - platform: sun - name: Sun Elevation - type: elevation - - platform: sun - name: Sun Azimuth - type: azimuth - -text_sensor: - - platform: sun - name: Sun Next Sunrise - type: sunrise - - platform: sun - name: Sun Next Sunset - type: sunset +<<: !include common.yaml diff --git a/tests/components/sun/test.esp32-idf.yaml b/tests/components/sun/test.esp32-idf.yaml index e0157424a..dade44d14 100644 --- a/tests/components/sun/test.esp32-idf.yaml +++ b/tests/components/sun/test.esp32-idf.yaml @@ -1,38 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - id: homeassistant_time - -sun: - latitude: 48.8584° - longitude: 2.2945° - on_sunrise: - - then: - - logger.log: Good morning - - elevation: 5° - then: - - logger.log: Good morning again - on_sunset: - - then: - - logger.log: Good evening - -sensor: - - platform: sun - name: Sun Elevation - type: elevation - - platform: sun - name: Sun Azimuth - type: azimuth - -text_sensor: - - platform: sun - name: Sun Next Sunrise - type: sunrise - - platform: sun - name: Sun Next Sunset - type: sunset +<<: !include common.yaml diff --git a/tests/components/sun/test.esp32.yaml b/tests/components/sun/test.esp32.yaml index e0157424a..dade44d14 100644 --- a/tests/components/sun/test.esp32.yaml +++ b/tests/components/sun/test.esp32.yaml @@ -1,38 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - id: homeassistant_time - -sun: - latitude: 48.8584° - longitude: 2.2945° - on_sunrise: - - then: - - logger.log: Good morning - - elevation: 5° - then: - - logger.log: Good morning again - on_sunset: - - then: - - logger.log: Good evening - -sensor: - - platform: sun - name: Sun Elevation - type: elevation - - platform: sun - name: Sun Azimuth - type: azimuth - -text_sensor: - - platform: sun - name: Sun Next Sunrise - type: sunrise - - platform: sun - name: Sun Next Sunset - type: sunset +<<: !include common.yaml diff --git a/tests/components/sun/test.esp8266.yaml b/tests/components/sun/test.esp8266.yaml index e0157424a..dade44d14 100644 --- a/tests/components/sun/test.esp8266.yaml +++ b/tests/components/sun/test.esp8266.yaml @@ -1,38 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - id: homeassistant_time - -sun: - latitude: 48.8584° - longitude: 2.2945° - on_sunrise: - - then: - - logger.log: Good morning - - elevation: 5° - then: - - logger.log: Good morning again - on_sunset: - - then: - - logger.log: Good evening - -sensor: - - platform: sun - name: Sun Elevation - type: elevation - - platform: sun - name: Sun Azimuth - type: azimuth - -text_sensor: - - platform: sun - name: Sun Next Sunrise - type: sunrise - - platform: sun - name: Sun Next Sunset - type: sunset +<<: !include common.yaml diff --git a/tests/components/sun/test.rp2040.yaml b/tests/components/sun/test.rp2040.yaml index e0157424a..dade44d14 100644 --- a/tests/components/sun/test.rp2040.yaml +++ b/tests/components/sun/test.rp2040.yaml @@ -1,38 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - id: homeassistant_time - -sun: - latitude: 48.8584° - longitude: 2.2945° - on_sunrise: - - then: - - logger.log: Good morning - - elevation: 5° - then: - - logger.log: Good morning again - on_sunset: - - then: - - logger.log: Good evening - -sensor: - - platform: sun - name: Sun Elevation - type: elevation - - platform: sun - name: Sun Azimuth - type: azimuth - -text_sensor: - - platform: sun - name: Sun Next Sunrise - type: sunrise - - platform: sun - name: Sun Next Sunset - type: sunset +<<: !include common.yaml diff --git a/tests/components/thermostat/common.yaml b/tests/components/thermostat/common.yaml new file mode 100644 index 000000000..d630a93ef --- /dev/null +++ b/tests/components/thermostat/common.yaml @@ -0,0 +1,93 @@ +sensor: + - platform: template + id: thermostat_sensor + lambda: "return 21;" + +climate: + - platform: thermostat + name: Test Thermostat + sensor: thermostat_sensor + humidity_sensor: thermostat_sensor + preset: + - name: Default Preset + default_target_temperature_low: 18°C + default_target_temperature_high: 24°C + - name: Away + default_target_temperature_low: 16°C + default_target_temperature_high: 20°C + idle_action: + - logger.log: idle_action + cool_action: + - logger.log: cool_action + supplemental_cooling_action: + - logger.log: supplemental_cooling_action + heat_action: + - logger.log: heat_action + supplemental_heating_action: + - logger.log: supplemental_heating_action + dry_action: + - logger.log: dry_action + fan_only_action: + - logger.log: fan_only_action + auto_mode: + - logger.log: auto_mode + off_mode: + - logger.log: off_mode + heat_mode: + - logger.log: heat_mode + cool_mode: + - logger.log: cool_mode + dry_mode: + - logger.log: dry_mode + fan_only_mode: + - logger.log: fan_only_mode + fan_mode_auto_action: + - logger.log: fan_mode_auto_action + fan_mode_on_action: + - logger.log: fan_mode_on_action + fan_mode_off_action: + - logger.log: fan_mode_off_action + fan_mode_low_action: + - logger.log: fan_mode_low_action + fan_mode_medium_action: + - logger.log: fan_mode_medium_action + fan_mode_high_action: + - logger.log: fan_mode_high_action + fan_mode_middle_action: + - logger.log: fan_mode_middle_action + fan_mode_focus_action: + - logger.log: fan_mode_focus_action + fan_mode_diffuse_action: + - logger.log: fan_mode_diffuse_action + fan_mode_quiet_action: + - logger.log: fan_mode_quiet_action + swing_off_action: + - logger.log: swing_off_action + swing_horizontal_action: + - logger.log: swing_horizontal_action + swing_vertical_action: + - logger.log: swing_vertical_action + swing_both_action: + - logger.log: swing_both_action + startup_delay: true + supplemental_cooling_delta: 2.0 + cool_deadband: 0.5 + cool_overrun: 0.5 + min_cooling_off_time: 300s + min_cooling_run_time: 300s + max_cooling_run_time: 600s + supplemental_heating_delta: 2.0 + heat_deadband: 0.5 + heat_overrun: 0.5 + min_heating_off_time: 300s + min_heating_run_time: 300s + max_heating_run_time: 600s + min_fanning_off_time: 30s + min_fanning_run_time: 30s + min_fan_mode_switching_time: 15s + min_idle_time: 30s + set_point_minimum_differential: 0.5 + fan_only_action_uses_fan_mode_timer: true + fan_only_cooling: true + fan_with_cooling: true + fan_with_heating: true diff --git a/tests/components/thermostat/test.esp32-c3-idf.yaml b/tests/components/thermostat/test.esp32-c3-idf.yaml index d630a93ef..dade44d14 100644 --- a/tests/components/thermostat/test.esp32-c3-idf.yaml +++ b/tests/components/thermostat/test.esp32-c3-idf.yaml @@ -1,93 +1 @@ -sensor: - - platform: template - id: thermostat_sensor - lambda: "return 21;" - -climate: - - platform: thermostat - name: Test Thermostat - sensor: thermostat_sensor - humidity_sensor: thermostat_sensor - preset: - - name: Default Preset - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - - name: Away - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C - idle_action: - - logger.log: idle_action - cool_action: - - logger.log: cool_action - supplemental_cooling_action: - - logger.log: supplemental_cooling_action - heat_action: - - logger.log: heat_action - supplemental_heating_action: - - logger.log: supplemental_heating_action - dry_action: - - logger.log: dry_action - fan_only_action: - - logger.log: fan_only_action - auto_mode: - - logger.log: auto_mode - off_mode: - - logger.log: off_mode - heat_mode: - - logger.log: heat_mode - cool_mode: - - logger.log: cool_mode - dry_mode: - - logger.log: dry_mode - fan_only_mode: - - logger.log: fan_only_mode - fan_mode_auto_action: - - logger.log: fan_mode_auto_action - fan_mode_on_action: - - logger.log: fan_mode_on_action - fan_mode_off_action: - - logger.log: fan_mode_off_action - fan_mode_low_action: - - logger.log: fan_mode_low_action - fan_mode_medium_action: - - logger.log: fan_mode_medium_action - fan_mode_high_action: - - logger.log: fan_mode_high_action - fan_mode_middle_action: - - logger.log: fan_mode_middle_action - fan_mode_focus_action: - - logger.log: fan_mode_focus_action - fan_mode_diffuse_action: - - logger.log: fan_mode_diffuse_action - fan_mode_quiet_action: - - logger.log: fan_mode_quiet_action - swing_off_action: - - logger.log: swing_off_action - swing_horizontal_action: - - logger.log: swing_horizontal_action - swing_vertical_action: - - logger.log: swing_vertical_action - swing_both_action: - - logger.log: swing_both_action - startup_delay: true - supplemental_cooling_delta: 2.0 - cool_deadband: 0.5 - cool_overrun: 0.5 - min_cooling_off_time: 300s - min_cooling_run_time: 300s - max_cooling_run_time: 600s - supplemental_heating_delta: 2.0 - heat_deadband: 0.5 - heat_overrun: 0.5 - min_heating_off_time: 300s - min_heating_run_time: 300s - max_heating_run_time: 600s - min_fanning_off_time: 30s - min_fanning_run_time: 30s - min_fan_mode_switching_time: 15s - min_idle_time: 30s - set_point_minimum_differential: 0.5 - fan_only_action_uses_fan_mode_timer: true - fan_only_cooling: true - fan_with_cooling: true - fan_with_heating: true +<<: !include common.yaml diff --git a/tests/components/thermostat/test.esp32-c3.yaml b/tests/components/thermostat/test.esp32-c3.yaml index d630a93ef..dade44d14 100644 --- a/tests/components/thermostat/test.esp32-c3.yaml +++ b/tests/components/thermostat/test.esp32-c3.yaml @@ -1,93 +1 @@ -sensor: - - platform: template - id: thermostat_sensor - lambda: "return 21;" - -climate: - - platform: thermostat - name: Test Thermostat - sensor: thermostat_sensor - humidity_sensor: thermostat_sensor - preset: - - name: Default Preset - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - - name: Away - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C - idle_action: - - logger.log: idle_action - cool_action: - - logger.log: cool_action - supplemental_cooling_action: - - logger.log: supplemental_cooling_action - heat_action: - - logger.log: heat_action - supplemental_heating_action: - - logger.log: supplemental_heating_action - dry_action: - - logger.log: dry_action - fan_only_action: - - logger.log: fan_only_action - auto_mode: - - logger.log: auto_mode - off_mode: - - logger.log: off_mode - heat_mode: - - logger.log: heat_mode - cool_mode: - - logger.log: cool_mode - dry_mode: - - logger.log: dry_mode - fan_only_mode: - - logger.log: fan_only_mode - fan_mode_auto_action: - - logger.log: fan_mode_auto_action - fan_mode_on_action: - - logger.log: fan_mode_on_action - fan_mode_off_action: - - logger.log: fan_mode_off_action - fan_mode_low_action: - - logger.log: fan_mode_low_action - fan_mode_medium_action: - - logger.log: fan_mode_medium_action - fan_mode_high_action: - - logger.log: fan_mode_high_action - fan_mode_middle_action: - - logger.log: fan_mode_middle_action - fan_mode_focus_action: - - logger.log: fan_mode_focus_action - fan_mode_diffuse_action: - - logger.log: fan_mode_diffuse_action - fan_mode_quiet_action: - - logger.log: fan_mode_quiet_action - swing_off_action: - - logger.log: swing_off_action - swing_horizontal_action: - - logger.log: swing_horizontal_action - swing_vertical_action: - - logger.log: swing_vertical_action - swing_both_action: - - logger.log: swing_both_action - startup_delay: true - supplemental_cooling_delta: 2.0 - cool_deadband: 0.5 - cool_overrun: 0.5 - min_cooling_off_time: 300s - min_cooling_run_time: 300s - max_cooling_run_time: 600s - supplemental_heating_delta: 2.0 - heat_deadband: 0.5 - heat_overrun: 0.5 - min_heating_off_time: 300s - min_heating_run_time: 300s - max_heating_run_time: 600s - min_fanning_off_time: 30s - min_fanning_run_time: 30s - min_fan_mode_switching_time: 15s - min_idle_time: 30s - set_point_minimum_differential: 0.5 - fan_only_action_uses_fan_mode_timer: true - fan_only_cooling: true - fan_with_cooling: true - fan_with_heating: true +<<: !include common.yaml diff --git a/tests/components/thermostat/test.esp32-idf.yaml b/tests/components/thermostat/test.esp32-idf.yaml index d630a93ef..dade44d14 100644 --- a/tests/components/thermostat/test.esp32-idf.yaml +++ b/tests/components/thermostat/test.esp32-idf.yaml @@ -1,93 +1 @@ -sensor: - - platform: template - id: thermostat_sensor - lambda: "return 21;" - -climate: - - platform: thermostat - name: Test Thermostat - sensor: thermostat_sensor - humidity_sensor: thermostat_sensor - preset: - - name: Default Preset - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - - name: Away - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C - idle_action: - - logger.log: idle_action - cool_action: - - logger.log: cool_action - supplemental_cooling_action: - - logger.log: supplemental_cooling_action - heat_action: - - logger.log: heat_action - supplemental_heating_action: - - logger.log: supplemental_heating_action - dry_action: - - logger.log: dry_action - fan_only_action: - - logger.log: fan_only_action - auto_mode: - - logger.log: auto_mode - off_mode: - - logger.log: off_mode - heat_mode: - - logger.log: heat_mode - cool_mode: - - logger.log: cool_mode - dry_mode: - - logger.log: dry_mode - fan_only_mode: - - logger.log: fan_only_mode - fan_mode_auto_action: - - logger.log: fan_mode_auto_action - fan_mode_on_action: - - logger.log: fan_mode_on_action - fan_mode_off_action: - - logger.log: fan_mode_off_action - fan_mode_low_action: - - logger.log: fan_mode_low_action - fan_mode_medium_action: - - logger.log: fan_mode_medium_action - fan_mode_high_action: - - logger.log: fan_mode_high_action - fan_mode_middle_action: - - logger.log: fan_mode_middle_action - fan_mode_focus_action: - - logger.log: fan_mode_focus_action - fan_mode_diffuse_action: - - logger.log: fan_mode_diffuse_action - fan_mode_quiet_action: - - logger.log: fan_mode_quiet_action - swing_off_action: - - logger.log: swing_off_action - swing_horizontal_action: - - logger.log: swing_horizontal_action - swing_vertical_action: - - logger.log: swing_vertical_action - swing_both_action: - - logger.log: swing_both_action - startup_delay: true - supplemental_cooling_delta: 2.0 - cool_deadband: 0.5 - cool_overrun: 0.5 - min_cooling_off_time: 300s - min_cooling_run_time: 300s - max_cooling_run_time: 600s - supplemental_heating_delta: 2.0 - heat_deadband: 0.5 - heat_overrun: 0.5 - min_heating_off_time: 300s - min_heating_run_time: 300s - max_heating_run_time: 600s - min_fanning_off_time: 30s - min_fanning_run_time: 30s - min_fan_mode_switching_time: 15s - min_idle_time: 30s - set_point_minimum_differential: 0.5 - fan_only_action_uses_fan_mode_timer: true - fan_only_cooling: true - fan_with_cooling: true - fan_with_heating: true +<<: !include common.yaml diff --git a/tests/components/thermostat/test.esp32.yaml b/tests/components/thermostat/test.esp32.yaml index d630a93ef..dade44d14 100644 --- a/tests/components/thermostat/test.esp32.yaml +++ b/tests/components/thermostat/test.esp32.yaml @@ -1,93 +1 @@ -sensor: - - platform: template - id: thermostat_sensor - lambda: "return 21;" - -climate: - - platform: thermostat - name: Test Thermostat - sensor: thermostat_sensor - humidity_sensor: thermostat_sensor - preset: - - name: Default Preset - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - - name: Away - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C - idle_action: - - logger.log: idle_action - cool_action: - - logger.log: cool_action - supplemental_cooling_action: - - logger.log: supplemental_cooling_action - heat_action: - - logger.log: heat_action - supplemental_heating_action: - - logger.log: supplemental_heating_action - dry_action: - - logger.log: dry_action - fan_only_action: - - logger.log: fan_only_action - auto_mode: - - logger.log: auto_mode - off_mode: - - logger.log: off_mode - heat_mode: - - logger.log: heat_mode - cool_mode: - - logger.log: cool_mode - dry_mode: - - logger.log: dry_mode - fan_only_mode: - - logger.log: fan_only_mode - fan_mode_auto_action: - - logger.log: fan_mode_auto_action - fan_mode_on_action: - - logger.log: fan_mode_on_action - fan_mode_off_action: - - logger.log: fan_mode_off_action - fan_mode_low_action: - - logger.log: fan_mode_low_action - fan_mode_medium_action: - - logger.log: fan_mode_medium_action - fan_mode_high_action: - - logger.log: fan_mode_high_action - fan_mode_middle_action: - - logger.log: fan_mode_middle_action - fan_mode_focus_action: - - logger.log: fan_mode_focus_action - fan_mode_diffuse_action: - - logger.log: fan_mode_diffuse_action - fan_mode_quiet_action: - - logger.log: fan_mode_quiet_action - swing_off_action: - - logger.log: swing_off_action - swing_horizontal_action: - - logger.log: swing_horizontal_action - swing_vertical_action: - - logger.log: swing_vertical_action - swing_both_action: - - logger.log: swing_both_action - startup_delay: true - supplemental_cooling_delta: 2.0 - cool_deadband: 0.5 - cool_overrun: 0.5 - min_cooling_off_time: 300s - min_cooling_run_time: 300s - max_cooling_run_time: 600s - supplemental_heating_delta: 2.0 - heat_deadband: 0.5 - heat_overrun: 0.5 - min_heating_off_time: 300s - min_heating_run_time: 300s - max_heating_run_time: 600s - min_fanning_off_time: 30s - min_fanning_run_time: 30s - min_fan_mode_switching_time: 15s - min_idle_time: 30s - set_point_minimum_differential: 0.5 - fan_only_action_uses_fan_mode_timer: true - fan_only_cooling: true - fan_with_cooling: true - fan_with_heating: true +<<: !include common.yaml diff --git a/tests/components/thermostat/test.esp8266.yaml b/tests/components/thermostat/test.esp8266.yaml index d630a93ef..dade44d14 100644 --- a/tests/components/thermostat/test.esp8266.yaml +++ b/tests/components/thermostat/test.esp8266.yaml @@ -1,93 +1 @@ -sensor: - - platform: template - id: thermostat_sensor - lambda: "return 21;" - -climate: - - platform: thermostat - name: Test Thermostat - sensor: thermostat_sensor - humidity_sensor: thermostat_sensor - preset: - - name: Default Preset - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - - name: Away - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C - idle_action: - - logger.log: idle_action - cool_action: - - logger.log: cool_action - supplemental_cooling_action: - - logger.log: supplemental_cooling_action - heat_action: - - logger.log: heat_action - supplemental_heating_action: - - logger.log: supplemental_heating_action - dry_action: - - logger.log: dry_action - fan_only_action: - - logger.log: fan_only_action - auto_mode: - - logger.log: auto_mode - off_mode: - - logger.log: off_mode - heat_mode: - - logger.log: heat_mode - cool_mode: - - logger.log: cool_mode - dry_mode: - - logger.log: dry_mode - fan_only_mode: - - logger.log: fan_only_mode - fan_mode_auto_action: - - logger.log: fan_mode_auto_action - fan_mode_on_action: - - logger.log: fan_mode_on_action - fan_mode_off_action: - - logger.log: fan_mode_off_action - fan_mode_low_action: - - logger.log: fan_mode_low_action - fan_mode_medium_action: - - logger.log: fan_mode_medium_action - fan_mode_high_action: - - logger.log: fan_mode_high_action - fan_mode_middle_action: - - logger.log: fan_mode_middle_action - fan_mode_focus_action: - - logger.log: fan_mode_focus_action - fan_mode_diffuse_action: - - logger.log: fan_mode_diffuse_action - fan_mode_quiet_action: - - logger.log: fan_mode_quiet_action - swing_off_action: - - logger.log: swing_off_action - swing_horizontal_action: - - logger.log: swing_horizontal_action - swing_vertical_action: - - logger.log: swing_vertical_action - swing_both_action: - - logger.log: swing_both_action - startup_delay: true - supplemental_cooling_delta: 2.0 - cool_deadband: 0.5 - cool_overrun: 0.5 - min_cooling_off_time: 300s - min_cooling_run_time: 300s - max_cooling_run_time: 600s - supplemental_heating_delta: 2.0 - heat_deadband: 0.5 - heat_overrun: 0.5 - min_heating_off_time: 300s - min_heating_run_time: 300s - max_heating_run_time: 600s - min_fanning_off_time: 30s - min_fanning_run_time: 30s - min_fan_mode_switching_time: 15s - min_idle_time: 30s - set_point_minimum_differential: 0.5 - fan_only_action_uses_fan_mode_timer: true - fan_only_cooling: true - fan_with_cooling: true - fan_with_heating: true +<<: !include common.yaml diff --git a/tests/components/thermostat/test.rp2040.yaml b/tests/components/thermostat/test.rp2040.yaml index d630a93ef..dade44d14 100644 --- a/tests/components/thermostat/test.rp2040.yaml +++ b/tests/components/thermostat/test.rp2040.yaml @@ -1,93 +1 @@ -sensor: - - platform: template - id: thermostat_sensor - lambda: "return 21;" - -climate: - - platform: thermostat - name: Test Thermostat - sensor: thermostat_sensor - humidity_sensor: thermostat_sensor - preset: - - name: Default Preset - default_target_temperature_low: 18°C - default_target_temperature_high: 24°C - - name: Away - default_target_temperature_low: 16°C - default_target_temperature_high: 20°C - idle_action: - - logger.log: idle_action - cool_action: - - logger.log: cool_action - supplemental_cooling_action: - - logger.log: supplemental_cooling_action - heat_action: - - logger.log: heat_action - supplemental_heating_action: - - logger.log: supplemental_heating_action - dry_action: - - logger.log: dry_action - fan_only_action: - - logger.log: fan_only_action - auto_mode: - - logger.log: auto_mode - off_mode: - - logger.log: off_mode - heat_mode: - - logger.log: heat_mode - cool_mode: - - logger.log: cool_mode - dry_mode: - - logger.log: dry_mode - fan_only_mode: - - logger.log: fan_only_mode - fan_mode_auto_action: - - logger.log: fan_mode_auto_action - fan_mode_on_action: - - logger.log: fan_mode_on_action - fan_mode_off_action: - - logger.log: fan_mode_off_action - fan_mode_low_action: - - logger.log: fan_mode_low_action - fan_mode_medium_action: - - logger.log: fan_mode_medium_action - fan_mode_high_action: - - logger.log: fan_mode_high_action - fan_mode_middle_action: - - logger.log: fan_mode_middle_action - fan_mode_focus_action: - - logger.log: fan_mode_focus_action - fan_mode_diffuse_action: - - logger.log: fan_mode_diffuse_action - fan_mode_quiet_action: - - logger.log: fan_mode_quiet_action - swing_off_action: - - logger.log: swing_off_action - swing_horizontal_action: - - logger.log: swing_horizontal_action - swing_vertical_action: - - logger.log: swing_vertical_action - swing_both_action: - - logger.log: swing_both_action - startup_delay: true - supplemental_cooling_delta: 2.0 - cool_deadband: 0.5 - cool_overrun: 0.5 - min_cooling_off_time: 300s - min_cooling_run_time: 300s - max_cooling_run_time: 600s - supplemental_heating_delta: 2.0 - heat_deadband: 0.5 - heat_overrun: 0.5 - min_heating_off_time: 300s - min_heating_run_time: 300s - max_heating_run_time: 600s - min_fanning_off_time: 30s - min_fanning_run_time: 30s - min_fan_mode_switching_time: 15s - min_idle_time: 30s - set_point_minimum_differential: 0.5 - fan_only_action_uses_fan_mode_timer: true - fan_only_cooling: true - fan_with_cooling: true - fan_with_heating: true +<<: !include common.yaml diff --git a/tests/components/time/common.yaml b/tests/components/time/common.yaml new file mode 100644 index 000000000..465be045d --- /dev/null +++ b/tests/components/time/common.yaml @@ -0,0 +1,10 @@ +wifi: + ssid: MySSID + password: password1 + +api: + +time: + - platform: homeassistant + - platform: sntp + id: sntp_time diff --git a/tests/components/time/test.esp32-c3-idf.yaml b/tests/components/time/test.esp32-c3-idf.yaml index 465be045d..dade44d14 100644 --- a/tests/components/time/test.esp32-c3-idf.yaml +++ b/tests/components/time/test.esp32-c3-idf.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - - platform: sntp - id: sntp_time +<<: !include common.yaml diff --git a/tests/components/time/test.esp32-c3.yaml b/tests/components/time/test.esp32-c3.yaml index 465be045d..dade44d14 100644 --- a/tests/components/time/test.esp32-c3.yaml +++ b/tests/components/time/test.esp32-c3.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - - platform: sntp - id: sntp_time +<<: !include common.yaml diff --git a/tests/components/time/test.esp32-idf.yaml b/tests/components/time/test.esp32-idf.yaml index 465be045d..dade44d14 100644 --- a/tests/components/time/test.esp32-idf.yaml +++ b/tests/components/time/test.esp32-idf.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - - platform: sntp - id: sntp_time +<<: !include common.yaml diff --git a/tests/components/time/test.esp32.yaml b/tests/components/time/test.esp32.yaml index 465be045d..dade44d14 100644 --- a/tests/components/time/test.esp32.yaml +++ b/tests/components/time/test.esp32.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - - platform: sntp - id: sntp_time +<<: !include common.yaml diff --git a/tests/components/time/test.esp8266.yaml b/tests/components/time/test.esp8266.yaml index 465be045d..dade44d14 100644 --- a/tests/components/time/test.esp8266.yaml +++ b/tests/components/time/test.esp8266.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - - platform: sntp - id: sntp_time +<<: !include common.yaml diff --git a/tests/components/time/test.rp2040.yaml b/tests/components/time/test.rp2040.yaml index 465be045d..dade44d14 100644 --- a/tests/components/time/test.rp2040.yaml +++ b/tests/components/time/test.rp2040.yaml @@ -1,10 +1 @@ -wifi: - ssid: MySSID - password: password1 - -api: - -time: - - platform: homeassistant - - platform: sntp - id: sntp_time +<<: !include common.yaml diff --git a/tests/components/time_based/common.yaml b/tests/components/time_based/common.yaml new file mode 100644 index 000000000..48c86de90 --- /dev/null +++ b/tests/components/time_based/common.yaml @@ -0,0 +1,12 @@ +cover: + - platform: time_based + name: Time Based Cover + id: time_based_cover + stop_action: + - logger.log: stop_action + open_action: + - logger.log: open_action + open_duration: 5min + close_action: + - logger.log: close_action + close_duration: 4.5min diff --git a/tests/components/time_based/test.esp32-c3-idf.yaml b/tests/components/time_based/test.esp32-c3-idf.yaml index 48c86de90..dade44d14 100644 --- a/tests/components/time_based/test.esp32-c3-idf.yaml +++ b/tests/components/time_based/test.esp32-c3-idf.yaml @@ -1,12 +1 @@ -cover: - - platform: time_based - name: Time Based Cover - id: time_based_cover - stop_action: - - logger.log: stop_action - open_action: - - logger.log: open_action - open_duration: 5min - close_action: - - logger.log: close_action - close_duration: 4.5min +<<: !include common.yaml diff --git a/tests/components/time_based/test.esp32-c3.yaml b/tests/components/time_based/test.esp32-c3.yaml index 48c86de90..dade44d14 100644 --- a/tests/components/time_based/test.esp32-c3.yaml +++ b/tests/components/time_based/test.esp32-c3.yaml @@ -1,12 +1 @@ -cover: - - platform: time_based - name: Time Based Cover - id: time_based_cover - stop_action: - - logger.log: stop_action - open_action: - - logger.log: open_action - open_duration: 5min - close_action: - - logger.log: close_action - close_duration: 4.5min +<<: !include common.yaml diff --git a/tests/components/time_based/test.esp32-idf.yaml b/tests/components/time_based/test.esp32-idf.yaml index 48c86de90..dade44d14 100644 --- a/tests/components/time_based/test.esp32-idf.yaml +++ b/tests/components/time_based/test.esp32-idf.yaml @@ -1,12 +1 @@ -cover: - - platform: time_based - name: Time Based Cover - id: time_based_cover - stop_action: - - logger.log: stop_action - open_action: - - logger.log: open_action - open_duration: 5min - close_action: - - logger.log: close_action - close_duration: 4.5min +<<: !include common.yaml diff --git a/tests/components/time_based/test.esp32.yaml b/tests/components/time_based/test.esp32.yaml index 48c86de90..dade44d14 100644 --- a/tests/components/time_based/test.esp32.yaml +++ b/tests/components/time_based/test.esp32.yaml @@ -1,12 +1 @@ -cover: - - platform: time_based - name: Time Based Cover - id: time_based_cover - stop_action: - - logger.log: stop_action - open_action: - - logger.log: open_action - open_duration: 5min - close_action: - - logger.log: close_action - close_duration: 4.5min +<<: !include common.yaml diff --git a/tests/components/time_based/test.esp8266.yaml b/tests/components/time_based/test.esp8266.yaml index 48c86de90..dade44d14 100644 --- a/tests/components/time_based/test.esp8266.yaml +++ b/tests/components/time_based/test.esp8266.yaml @@ -1,12 +1 @@ -cover: - - platform: time_based - name: Time Based Cover - id: time_based_cover - stop_action: - - logger.log: stop_action - open_action: - - logger.log: open_action - open_duration: 5min - close_action: - - logger.log: close_action - close_duration: 4.5min +<<: !include common.yaml diff --git a/tests/components/time_based/test.rp2040.yaml b/tests/components/time_based/test.rp2040.yaml index 48c86de90..dade44d14 100644 --- a/tests/components/time_based/test.rp2040.yaml +++ b/tests/components/time_based/test.rp2040.yaml @@ -1,12 +1 @@ -cover: - - platform: time_based - name: Time Based Cover - id: time_based_cover - stop_action: - - logger.log: stop_action - open_action: - - logger.log: open_action - open_duration: 5min - close_action: - - logger.log: close_action - close_duration: 4.5min +<<: !include common.yaml diff --git a/tests/components/tm1638/common.yaml b/tests/components/tm1638/common.yaml new file mode 100644 index 000000000..b0c5cef52 --- /dev/null +++ b/tests/components/tm1638/common.yaml @@ -0,0 +1,118 @@ +display: + - platform: tm1638 + id: tm1638_display + stb_pin: 2 + clk_pin: 5 + dio_pin: 4 + update_interval: 5s + intensity: 5 + lambda: |- + it.print("81818181"); + +binary_sensor: + - platform: tm1638 + id: Button0 + key: 0 + filters: + - delayed_on: 10ms + on_press: + then: + - switch.turn_on: Led0 + on_release: + then: + - switch.turn_off: Led0 + - platform: tm1638 + id: Button1 + key: 1 + on_press: + then: + - switch.turn_on: Led1 + on_release: + then: + - switch.turn_off: Led1 + - platform: tm1638 + id: Button2 + key: 2 + on_press: + then: + - switch.turn_on: Led2 + on_release: + then: + - switch.turn_off: Led2 + - platform: tm1638 + id: Button3 + key: 3 + on_press: + then: + - switch.turn_on: Led3 + on_release: + then: + - switch.turn_off: Led3 + - platform: tm1638 + id: Button4 + key: 4 + on_press: + then: + - output.turn_on: Led4 + on_release: + then: + - output.turn_off: Led4 + - platform: tm1638 + id: Button5 + key: 5 + on_press: + then: + - output.turn_on: Led5 + on_release: + then: + - output.turn_off: Led5 + - platform: tm1638 + id: Button6 + key: 6 + on_press: + then: + - output.turn_on: Led6 + on_release: + then: + - output.turn_off: Led6 + - platform: tm1638 + id: Button7 + key: 7 + on_press: + then: + - output.turn_on: Led7 + on_release: + then: + - output.turn_off: Led7 + +switch: + - platform: tm1638 + id: Led0 + led: 0 + name: TM1638Led0 + - platform: tm1638 + id: Led1 + led: 1 + name: TM1638Led1 + - platform: tm1638 + id: Led2 + led: 2 + name: TM1638Led2 + - platform: tm1638 + id: Led3 + led: 3 + name: TM1638Led3 + +output: + - platform: tm1638 + id: Led4 + led: 4 + - platform: tm1638 + id: Led5 + led: 5 + - platform: tm1638 + id: Led6 + led: 6 + - platform: tm1638 + id: Led7 + led: 7 diff --git a/tests/components/tm1638/test.esp32-c3-idf.yaml b/tests/components/tm1638/test.esp32-c3-idf.yaml index b0c5cef52..dade44d14 100644 --- a/tests/components/tm1638/test.esp32-c3-idf.yaml +++ b/tests/components/tm1638/test.esp32-c3-idf.yaml @@ -1,118 +1 @@ -display: - - platform: tm1638 - id: tm1638_display - stb_pin: 2 - clk_pin: 5 - dio_pin: 4 - update_interval: 5s - intensity: 5 - lambda: |- - it.print("81818181"); - -binary_sensor: - - platform: tm1638 - id: Button0 - key: 0 - filters: - - delayed_on: 10ms - on_press: - then: - - switch.turn_on: Led0 - on_release: - then: - - switch.turn_off: Led0 - - platform: tm1638 - id: Button1 - key: 1 - on_press: - then: - - switch.turn_on: Led1 - on_release: - then: - - switch.turn_off: Led1 - - platform: tm1638 - id: Button2 - key: 2 - on_press: - then: - - switch.turn_on: Led2 - on_release: - then: - - switch.turn_off: Led2 - - platform: tm1638 - id: Button3 - key: 3 - on_press: - then: - - switch.turn_on: Led3 - on_release: - then: - - switch.turn_off: Led3 - - platform: tm1638 - id: Button4 - key: 4 - on_press: - then: - - output.turn_on: Led4 - on_release: - then: - - output.turn_off: Led4 - - platform: tm1638 - id: Button5 - key: 5 - on_press: - then: - - output.turn_on: Led5 - on_release: - then: - - output.turn_off: Led5 - - platform: tm1638 - id: Button6 - key: 6 - on_press: - then: - - output.turn_on: Led6 - on_release: - then: - - output.turn_off: Led6 - - platform: tm1638 - id: Button7 - key: 7 - on_press: - then: - - output.turn_on: Led7 - on_release: - then: - - output.turn_off: Led7 - -switch: - - platform: tm1638 - id: Led0 - led: 0 - name: TM1638Led0 - - platform: tm1638 - id: Led1 - led: 1 - name: TM1638Led1 - - platform: tm1638 - id: Led2 - led: 2 - name: TM1638Led2 - - platform: tm1638 - id: Led3 - led: 3 - name: TM1638Led3 - -output: - - platform: tm1638 - id: Led4 - led: 4 - - platform: tm1638 - id: Led5 - led: 5 - - platform: tm1638 - id: Led6 - led: 6 - - platform: tm1638 - id: Led7 - led: 7 +<<: !include common.yaml diff --git a/tests/components/tm1638/test.esp32-c3.yaml b/tests/components/tm1638/test.esp32-c3.yaml index b0c5cef52..dade44d14 100644 --- a/tests/components/tm1638/test.esp32-c3.yaml +++ b/tests/components/tm1638/test.esp32-c3.yaml @@ -1,118 +1 @@ -display: - - platform: tm1638 - id: tm1638_display - stb_pin: 2 - clk_pin: 5 - dio_pin: 4 - update_interval: 5s - intensity: 5 - lambda: |- - it.print("81818181"); - -binary_sensor: - - platform: tm1638 - id: Button0 - key: 0 - filters: - - delayed_on: 10ms - on_press: - then: - - switch.turn_on: Led0 - on_release: - then: - - switch.turn_off: Led0 - - platform: tm1638 - id: Button1 - key: 1 - on_press: - then: - - switch.turn_on: Led1 - on_release: - then: - - switch.turn_off: Led1 - - platform: tm1638 - id: Button2 - key: 2 - on_press: - then: - - switch.turn_on: Led2 - on_release: - then: - - switch.turn_off: Led2 - - platform: tm1638 - id: Button3 - key: 3 - on_press: - then: - - switch.turn_on: Led3 - on_release: - then: - - switch.turn_off: Led3 - - platform: tm1638 - id: Button4 - key: 4 - on_press: - then: - - output.turn_on: Led4 - on_release: - then: - - output.turn_off: Led4 - - platform: tm1638 - id: Button5 - key: 5 - on_press: - then: - - output.turn_on: Led5 - on_release: - then: - - output.turn_off: Led5 - - platform: tm1638 - id: Button6 - key: 6 - on_press: - then: - - output.turn_on: Led6 - on_release: - then: - - output.turn_off: Led6 - - platform: tm1638 - id: Button7 - key: 7 - on_press: - then: - - output.turn_on: Led7 - on_release: - then: - - output.turn_off: Led7 - -switch: - - platform: tm1638 - id: Led0 - led: 0 - name: TM1638Led0 - - platform: tm1638 - id: Led1 - led: 1 - name: TM1638Led1 - - platform: tm1638 - id: Led2 - led: 2 - name: TM1638Led2 - - platform: tm1638 - id: Led3 - led: 3 - name: TM1638Led3 - -output: - - platform: tm1638 - id: Led4 - led: 4 - - platform: tm1638 - id: Led5 - led: 5 - - platform: tm1638 - id: Led6 - led: 6 - - platform: tm1638 - id: Led7 - led: 7 +<<: !include common.yaml diff --git a/tests/components/tm1638/test.esp32-idf.yaml b/tests/components/tm1638/test.esp32-idf.yaml index b0c5cef52..dade44d14 100644 --- a/tests/components/tm1638/test.esp32-idf.yaml +++ b/tests/components/tm1638/test.esp32-idf.yaml @@ -1,118 +1 @@ -display: - - platform: tm1638 - id: tm1638_display - stb_pin: 2 - clk_pin: 5 - dio_pin: 4 - update_interval: 5s - intensity: 5 - lambda: |- - it.print("81818181"); - -binary_sensor: - - platform: tm1638 - id: Button0 - key: 0 - filters: - - delayed_on: 10ms - on_press: - then: - - switch.turn_on: Led0 - on_release: - then: - - switch.turn_off: Led0 - - platform: tm1638 - id: Button1 - key: 1 - on_press: - then: - - switch.turn_on: Led1 - on_release: - then: - - switch.turn_off: Led1 - - platform: tm1638 - id: Button2 - key: 2 - on_press: - then: - - switch.turn_on: Led2 - on_release: - then: - - switch.turn_off: Led2 - - platform: tm1638 - id: Button3 - key: 3 - on_press: - then: - - switch.turn_on: Led3 - on_release: - then: - - switch.turn_off: Led3 - - platform: tm1638 - id: Button4 - key: 4 - on_press: - then: - - output.turn_on: Led4 - on_release: - then: - - output.turn_off: Led4 - - platform: tm1638 - id: Button5 - key: 5 - on_press: - then: - - output.turn_on: Led5 - on_release: - then: - - output.turn_off: Led5 - - platform: tm1638 - id: Button6 - key: 6 - on_press: - then: - - output.turn_on: Led6 - on_release: - then: - - output.turn_off: Led6 - - platform: tm1638 - id: Button7 - key: 7 - on_press: - then: - - output.turn_on: Led7 - on_release: - then: - - output.turn_off: Led7 - -switch: - - platform: tm1638 - id: Led0 - led: 0 - name: TM1638Led0 - - platform: tm1638 - id: Led1 - led: 1 - name: TM1638Led1 - - platform: tm1638 - id: Led2 - led: 2 - name: TM1638Led2 - - platform: tm1638 - id: Led3 - led: 3 - name: TM1638Led3 - -output: - - platform: tm1638 - id: Led4 - led: 4 - - platform: tm1638 - id: Led5 - led: 5 - - platform: tm1638 - id: Led6 - led: 6 - - platform: tm1638 - id: Led7 - led: 7 +<<: !include common.yaml diff --git a/tests/components/tm1638/test.esp32.yaml b/tests/components/tm1638/test.esp32.yaml index b0c5cef52..dade44d14 100644 --- a/tests/components/tm1638/test.esp32.yaml +++ b/tests/components/tm1638/test.esp32.yaml @@ -1,118 +1 @@ -display: - - platform: tm1638 - id: tm1638_display - stb_pin: 2 - clk_pin: 5 - dio_pin: 4 - update_interval: 5s - intensity: 5 - lambda: |- - it.print("81818181"); - -binary_sensor: - - platform: tm1638 - id: Button0 - key: 0 - filters: - - delayed_on: 10ms - on_press: - then: - - switch.turn_on: Led0 - on_release: - then: - - switch.turn_off: Led0 - - platform: tm1638 - id: Button1 - key: 1 - on_press: - then: - - switch.turn_on: Led1 - on_release: - then: - - switch.turn_off: Led1 - - platform: tm1638 - id: Button2 - key: 2 - on_press: - then: - - switch.turn_on: Led2 - on_release: - then: - - switch.turn_off: Led2 - - platform: tm1638 - id: Button3 - key: 3 - on_press: - then: - - switch.turn_on: Led3 - on_release: - then: - - switch.turn_off: Led3 - - platform: tm1638 - id: Button4 - key: 4 - on_press: - then: - - output.turn_on: Led4 - on_release: - then: - - output.turn_off: Led4 - - platform: tm1638 - id: Button5 - key: 5 - on_press: - then: - - output.turn_on: Led5 - on_release: - then: - - output.turn_off: Led5 - - platform: tm1638 - id: Button6 - key: 6 - on_press: - then: - - output.turn_on: Led6 - on_release: - then: - - output.turn_off: Led6 - - platform: tm1638 - id: Button7 - key: 7 - on_press: - then: - - output.turn_on: Led7 - on_release: - then: - - output.turn_off: Led7 - -switch: - - platform: tm1638 - id: Led0 - led: 0 - name: TM1638Led0 - - platform: tm1638 - id: Led1 - led: 1 - name: TM1638Led1 - - platform: tm1638 - id: Led2 - led: 2 - name: TM1638Led2 - - platform: tm1638 - id: Led3 - led: 3 - name: TM1638Led3 - -output: - - platform: tm1638 - id: Led4 - led: 4 - - platform: tm1638 - id: Led5 - led: 5 - - platform: tm1638 - id: Led6 - led: 6 - - platform: tm1638 - id: Led7 - led: 7 +<<: !include common.yaml diff --git a/tests/components/tm1638/test.esp8266.yaml b/tests/components/tm1638/test.esp8266.yaml index b0c5cef52..dade44d14 100644 --- a/tests/components/tm1638/test.esp8266.yaml +++ b/tests/components/tm1638/test.esp8266.yaml @@ -1,118 +1 @@ -display: - - platform: tm1638 - id: tm1638_display - stb_pin: 2 - clk_pin: 5 - dio_pin: 4 - update_interval: 5s - intensity: 5 - lambda: |- - it.print("81818181"); - -binary_sensor: - - platform: tm1638 - id: Button0 - key: 0 - filters: - - delayed_on: 10ms - on_press: - then: - - switch.turn_on: Led0 - on_release: - then: - - switch.turn_off: Led0 - - platform: tm1638 - id: Button1 - key: 1 - on_press: - then: - - switch.turn_on: Led1 - on_release: - then: - - switch.turn_off: Led1 - - platform: tm1638 - id: Button2 - key: 2 - on_press: - then: - - switch.turn_on: Led2 - on_release: - then: - - switch.turn_off: Led2 - - platform: tm1638 - id: Button3 - key: 3 - on_press: - then: - - switch.turn_on: Led3 - on_release: - then: - - switch.turn_off: Led3 - - platform: tm1638 - id: Button4 - key: 4 - on_press: - then: - - output.turn_on: Led4 - on_release: - then: - - output.turn_off: Led4 - - platform: tm1638 - id: Button5 - key: 5 - on_press: - then: - - output.turn_on: Led5 - on_release: - then: - - output.turn_off: Led5 - - platform: tm1638 - id: Button6 - key: 6 - on_press: - then: - - output.turn_on: Led6 - on_release: - then: - - output.turn_off: Led6 - - platform: tm1638 - id: Button7 - key: 7 - on_press: - then: - - output.turn_on: Led7 - on_release: - then: - - output.turn_off: Led7 - -switch: - - platform: tm1638 - id: Led0 - led: 0 - name: TM1638Led0 - - platform: tm1638 - id: Led1 - led: 1 - name: TM1638Led1 - - platform: tm1638 - id: Led2 - led: 2 - name: TM1638Led2 - - platform: tm1638 - id: Led3 - led: 3 - name: TM1638Led3 - -output: - - platform: tm1638 - id: Led4 - led: 4 - - platform: tm1638 - id: Led5 - led: 5 - - platform: tm1638 - id: Led6 - led: 6 - - platform: tm1638 - id: Led7 - led: 7 +<<: !include common.yaml diff --git a/tests/components/tm1638/test.rp2040.yaml b/tests/components/tm1638/test.rp2040.yaml index b0c5cef52..dade44d14 100644 --- a/tests/components/tm1638/test.rp2040.yaml +++ b/tests/components/tm1638/test.rp2040.yaml @@ -1,118 +1 @@ -display: - - platform: tm1638 - id: tm1638_display - stb_pin: 2 - clk_pin: 5 - dio_pin: 4 - update_interval: 5s - intensity: 5 - lambda: |- - it.print("81818181"); - -binary_sensor: - - platform: tm1638 - id: Button0 - key: 0 - filters: - - delayed_on: 10ms - on_press: - then: - - switch.turn_on: Led0 - on_release: - then: - - switch.turn_off: Led0 - - platform: tm1638 - id: Button1 - key: 1 - on_press: - then: - - switch.turn_on: Led1 - on_release: - then: - - switch.turn_off: Led1 - - platform: tm1638 - id: Button2 - key: 2 - on_press: - then: - - switch.turn_on: Led2 - on_release: - then: - - switch.turn_off: Led2 - - platform: tm1638 - id: Button3 - key: 3 - on_press: - then: - - switch.turn_on: Led3 - on_release: - then: - - switch.turn_off: Led3 - - platform: tm1638 - id: Button4 - key: 4 - on_press: - then: - - output.turn_on: Led4 - on_release: - then: - - output.turn_off: Led4 - - platform: tm1638 - id: Button5 - key: 5 - on_press: - then: - - output.turn_on: Led5 - on_release: - then: - - output.turn_off: Led5 - - platform: tm1638 - id: Button6 - key: 6 - on_press: - then: - - output.turn_on: Led6 - on_release: - then: - - output.turn_off: Led6 - - platform: tm1638 - id: Button7 - key: 7 - on_press: - then: - - output.turn_on: Led7 - on_release: - then: - - output.turn_off: Led7 - -switch: - - platform: tm1638 - id: Led0 - led: 0 - name: TM1638Led0 - - platform: tm1638 - id: Led1 - led: 1 - name: TM1638Led1 - - platform: tm1638 - id: Led2 - led: 2 - name: TM1638Led2 - - platform: tm1638 - id: Led3 - led: 3 - name: TM1638Led3 - -output: - - platform: tm1638 - id: Led4 - led: 4 - - platform: tm1638 - id: Led5 - led: 5 - - platform: tm1638 - id: Led6 - led: 6 - - platform: tm1638 - id: Led7 - led: 7 +<<: !include common.yaml diff --git a/tests/components/tm1651/common.yaml b/tests/components/tm1651/common.yaml new file mode 100644 index 000000000..667648f4d --- /dev/null +++ b/tests/components/tm1651/common.yaml @@ -0,0 +1,21 @@ +tm1651: + id: tm1651_battery + clk_pin: 5 + dio_pin: 4 + +esphome: + on_boot: + then: + - tm1651.set_level_percent: + id: tm1651_battery + level_percent: 50 + - tm1651.set_level: + id: tm1651_battery + level: 5 + - tm1651.set_brightness: + id: tm1651_battery + brightness: 2 + - tm1651.turn_on: + id: tm1651_battery + - tm1651.turn_off: + id: tm1651_battery diff --git a/tests/components/tm1651/test.esp32-c3.yaml b/tests/components/tm1651/test.esp32-c3.yaml index 667648f4d..dade44d14 100644 --- a/tests/components/tm1651/test.esp32-c3.yaml +++ b/tests/components/tm1651/test.esp32-c3.yaml @@ -1,21 +1 @@ -tm1651: - id: tm1651_battery - clk_pin: 5 - dio_pin: 4 - -esphome: - on_boot: - then: - - tm1651.set_level_percent: - id: tm1651_battery - level_percent: 50 - - tm1651.set_level: - id: tm1651_battery - level: 5 - - tm1651.set_brightness: - id: tm1651_battery - brightness: 2 - - tm1651.turn_on: - id: tm1651_battery - - tm1651.turn_off: - id: tm1651_battery +<<: !include common.yaml diff --git a/tests/components/tm1651/test.esp32.yaml b/tests/components/tm1651/test.esp32.yaml index 667648f4d..dade44d14 100644 --- a/tests/components/tm1651/test.esp32.yaml +++ b/tests/components/tm1651/test.esp32.yaml @@ -1,21 +1 @@ -tm1651: - id: tm1651_battery - clk_pin: 5 - dio_pin: 4 - -esphome: - on_boot: - then: - - tm1651.set_level_percent: - id: tm1651_battery - level_percent: 50 - - tm1651.set_level: - id: tm1651_battery - level: 5 - - tm1651.set_brightness: - id: tm1651_battery - brightness: 2 - - tm1651.turn_on: - id: tm1651_battery - - tm1651.turn_off: - id: tm1651_battery +<<: !include common.yaml diff --git a/tests/components/tm1651/test.esp8266.yaml b/tests/components/tm1651/test.esp8266.yaml index 667648f4d..dade44d14 100644 --- a/tests/components/tm1651/test.esp8266.yaml +++ b/tests/components/tm1651/test.esp8266.yaml @@ -1,21 +1 @@ -tm1651: - id: tm1651_battery - clk_pin: 5 - dio_pin: 4 - -esphome: - on_boot: - then: - - tm1651.set_level_percent: - id: tm1651_battery - level_percent: 50 - - tm1651.set_level: - id: tm1651_battery - level: 5 - - tm1651.set_brightness: - id: tm1651_battery - brightness: 2 - - tm1651.turn_on: - id: tm1651_battery - - tm1651.turn_off: - id: tm1651_battery +<<: !include common.yaml diff --git a/tests/components/tm1651/test.rp2040.yaml b/tests/components/tm1651/test.rp2040.yaml index 667648f4d..dade44d14 100644 --- a/tests/components/tm1651/test.rp2040.yaml +++ b/tests/components/tm1651/test.rp2040.yaml @@ -1,21 +1 @@ -tm1651: - id: tm1651_battery - clk_pin: 5 - dio_pin: 4 - -esphome: - on_boot: - then: - - tm1651.set_level_percent: - id: tm1651_battery - level_percent: 50 - - tm1651.set_level: - id: tm1651_battery - level: 5 - - tm1651.set_brightness: - id: tm1651_battery - brightness: 2 - - tm1651.turn_on: - id: tm1651_battery - - tm1651.turn_off: - id: tm1651_battery +<<: !include common.yaml diff --git a/tests/components/tx20/common.yaml b/tests/components/tx20/common.yaml new file mode 100644 index 000000000..d82605932 --- /dev/null +++ b/tests/components/tx20/common.yaml @@ -0,0 +1,7 @@ +sensor: + - platform: tx20 + wind_speed: + name: Windspeed + wind_direction_degrees: + name: Winddirection Degrees + pin: 4 diff --git a/tests/components/tx20/test.esp32-c3-idf.yaml b/tests/components/tx20/test.esp32-c3-idf.yaml index d82605932..dade44d14 100644 --- a/tests/components/tx20/test.esp32-c3-idf.yaml +++ b/tests/components/tx20/test.esp32-c3-idf.yaml @@ -1,7 +1 @@ -sensor: - - platform: tx20 - wind_speed: - name: Windspeed - wind_direction_degrees: - name: Winddirection Degrees - pin: 4 +<<: !include common.yaml diff --git a/tests/components/tx20/test.esp32-c3.yaml b/tests/components/tx20/test.esp32-c3.yaml index d82605932..dade44d14 100644 --- a/tests/components/tx20/test.esp32-c3.yaml +++ b/tests/components/tx20/test.esp32-c3.yaml @@ -1,7 +1 @@ -sensor: - - platform: tx20 - wind_speed: - name: Windspeed - wind_direction_degrees: - name: Winddirection Degrees - pin: 4 +<<: !include common.yaml diff --git a/tests/components/tx20/test.esp32-idf.yaml b/tests/components/tx20/test.esp32-idf.yaml index d82605932..dade44d14 100644 --- a/tests/components/tx20/test.esp32-idf.yaml +++ b/tests/components/tx20/test.esp32-idf.yaml @@ -1,7 +1 @@ -sensor: - - platform: tx20 - wind_speed: - name: Windspeed - wind_direction_degrees: - name: Winddirection Degrees - pin: 4 +<<: !include common.yaml diff --git a/tests/components/tx20/test.esp32.yaml b/tests/components/tx20/test.esp32.yaml index d82605932..dade44d14 100644 --- a/tests/components/tx20/test.esp32.yaml +++ b/tests/components/tx20/test.esp32.yaml @@ -1,7 +1 @@ -sensor: - - platform: tx20 - wind_speed: - name: Windspeed - wind_direction_degrees: - name: Winddirection Degrees - pin: 4 +<<: !include common.yaml diff --git a/tests/components/tx20/test.esp8266.yaml b/tests/components/tx20/test.esp8266.yaml index d82605932..dade44d14 100644 --- a/tests/components/tx20/test.esp8266.yaml +++ b/tests/components/tx20/test.esp8266.yaml @@ -1,7 +1 @@ -sensor: - - platform: tx20 - wind_speed: - name: Windspeed - wind_direction_degrees: - name: Winddirection Degrees - pin: 4 +<<: !include common.yaml diff --git a/tests/components/tx20/test.rp2040.yaml b/tests/components/tx20/test.rp2040.yaml index d82605932..dade44d14 100644 --- a/tests/components/tx20/test.rp2040.yaml +++ b/tests/components/tx20/test.rp2040.yaml @@ -1,7 +1 @@ -sensor: - - platform: tx20 - wind_speed: - name: Windspeed - wind_direction_degrees: - name: Winddirection Degrees - pin: 4 +<<: !include common.yaml diff --git a/tests/components/ultrasonic/common.yaml b/tests/components/ultrasonic/common.yaml new file mode 100644 index 000000000..f1f673d91 --- /dev/null +++ b/tests/components/ultrasonic/common.yaml @@ -0,0 +1,7 @@ +sensor: + - platform: ultrasonic + id: ultrasonic_sensor1 + name: Ultrasonic Sensor + echo_pin: 4 + trigger_pin: 5 + timeout: 5.5m diff --git a/tests/components/ultrasonic/test.esp32-c3-idf.yaml b/tests/components/ultrasonic/test.esp32-c3-idf.yaml index f1f673d91..dade44d14 100644 --- a/tests/components/ultrasonic/test.esp32-c3-idf.yaml +++ b/tests/components/ultrasonic/test.esp32-c3-idf.yaml @@ -1,7 +1 @@ -sensor: - - platform: ultrasonic - id: ultrasonic_sensor1 - name: Ultrasonic Sensor - echo_pin: 4 - trigger_pin: 5 - timeout: 5.5m +<<: !include common.yaml diff --git a/tests/components/ultrasonic/test.esp32-c3.yaml b/tests/components/ultrasonic/test.esp32-c3.yaml index f1f673d91..dade44d14 100644 --- a/tests/components/ultrasonic/test.esp32-c3.yaml +++ b/tests/components/ultrasonic/test.esp32-c3.yaml @@ -1,7 +1 @@ -sensor: - - platform: ultrasonic - id: ultrasonic_sensor1 - name: Ultrasonic Sensor - echo_pin: 4 - trigger_pin: 5 - timeout: 5.5m +<<: !include common.yaml diff --git a/tests/components/ultrasonic/test.esp32-idf.yaml b/tests/components/ultrasonic/test.esp32-idf.yaml index f1f673d91..dade44d14 100644 --- a/tests/components/ultrasonic/test.esp32-idf.yaml +++ b/tests/components/ultrasonic/test.esp32-idf.yaml @@ -1,7 +1 @@ -sensor: - - platform: ultrasonic - id: ultrasonic_sensor1 - name: Ultrasonic Sensor - echo_pin: 4 - trigger_pin: 5 - timeout: 5.5m +<<: !include common.yaml diff --git a/tests/components/ultrasonic/test.esp32.yaml b/tests/components/ultrasonic/test.esp32.yaml index f1f673d91..dade44d14 100644 --- a/tests/components/ultrasonic/test.esp32.yaml +++ b/tests/components/ultrasonic/test.esp32.yaml @@ -1,7 +1 @@ -sensor: - - platform: ultrasonic - id: ultrasonic_sensor1 - name: Ultrasonic Sensor - echo_pin: 4 - trigger_pin: 5 - timeout: 5.5m +<<: !include common.yaml diff --git a/tests/components/ultrasonic/test.esp8266.yaml b/tests/components/ultrasonic/test.esp8266.yaml index f1f673d91..dade44d14 100644 --- a/tests/components/ultrasonic/test.esp8266.yaml +++ b/tests/components/ultrasonic/test.esp8266.yaml @@ -1,7 +1 @@ -sensor: - - platform: ultrasonic - id: ultrasonic_sensor1 - name: Ultrasonic Sensor - echo_pin: 4 - trigger_pin: 5 - timeout: 5.5m +<<: !include common.yaml diff --git a/tests/components/ultrasonic/test.rp2040.yaml b/tests/components/ultrasonic/test.rp2040.yaml index f1f673d91..dade44d14 100644 --- a/tests/components/ultrasonic/test.rp2040.yaml +++ b/tests/components/ultrasonic/test.rp2040.yaml @@ -1,7 +1 @@ -sensor: - - platform: ultrasonic - id: ultrasonic_sensor1 - name: Ultrasonic Sensor - echo_pin: 4 - trigger_pin: 5 - timeout: 5.5m +<<: !include common.yaml diff --git a/tests/components/uptime/common.yaml b/tests/components/uptime/common.yaml new file mode 100644 index 000000000..872a0e740 --- /dev/null +++ b/tests/components/uptime/common.yaml @@ -0,0 +1,3 @@ +sensor: + - platform: uptime + name: Uptime Sensor diff --git a/tests/components/uptime/test.esp32-c3-idf.yaml b/tests/components/uptime/test.esp32-c3-idf.yaml index 872a0e740..dade44d14 100644 --- a/tests/components/uptime/test.esp32-c3-idf.yaml +++ b/tests/components/uptime/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -sensor: - - platform: uptime - name: Uptime Sensor +<<: !include common.yaml diff --git a/tests/components/uptime/test.esp32-c3.yaml b/tests/components/uptime/test.esp32-c3.yaml index 872a0e740..dade44d14 100644 --- a/tests/components/uptime/test.esp32-c3.yaml +++ b/tests/components/uptime/test.esp32-c3.yaml @@ -1,3 +1 @@ -sensor: - - platform: uptime - name: Uptime Sensor +<<: !include common.yaml diff --git a/tests/components/uptime/test.esp32-idf.yaml b/tests/components/uptime/test.esp32-idf.yaml index 872a0e740..dade44d14 100644 --- a/tests/components/uptime/test.esp32-idf.yaml +++ b/tests/components/uptime/test.esp32-idf.yaml @@ -1,3 +1 @@ -sensor: - - platform: uptime - name: Uptime Sensor +<<: !include common.yaml diff --git a/tests/components/uptime/test.esp32.yaml b/tests/components/uptime/test.esp32.yaml index 872a0e740..dade44d14 100644 --- a/tests/components/uptime/test.esp32.yaml +++ b/tests/components/uptime/test.esp32.yaml @@ -1,3 +1 @@ -sensor: - - platform: uptime - name: Uptime Sensor +<<: !include common.yaml diff --git a/tests/components/uptime/test.esp8266.yaml b/tests/components/uptime/test.esp8266.yaml index 872a0e740..dade44d14 100644 --- a/tests/components/uptime/test.esp8266.yaml +++ b/tests/components/uptime/test.esp8266.yaml @@ -1,3 +1 @@ -sensor: - - platform: uptime - name: Uptime Sensor +<<: !include common.yaml diff --git a/tests/components/uptime/test.rp2040.yaml b/tests/components/uptime/test.rp2040.yaml index 872a0e740..dade44d14 100644 --- a/tests/components/uptime/test.rp2040.yaml +++ b/tests/components/uptime/test.rp2040.yaml @@ -1,3 +1 @@ -sensor: - - platform: uptime - name: Uptime Sensor +<<: !include common.yaml diff --git a/tests/components/version/common.yaml b/tests/components/version/common.yaml new file mode 100644 index 000000000..7713afc37 --- /dev/null +++ b/tests/components/version/common.yaml @@ -0,0 +1,3 @@ +text_sensor: + - platform: version + name: "ESPHome Version" diff --git a/tests/components/version/test.esp32-c3-idf.yaml b/tests/components/version/test.esp32-c3-idf.yaml index 7713afc37..dade44d14 100644 --- a/tests/components/version/test.esp32-c3-idf.yaml +++ b/tests/components/version/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -text_sensor: - - platform: version - name: "ESPHome Version" +<<: !include common.yaml diff --git a/tests/components/version/test.esp32-c3.yaml b/tests/components/version/test.esp32-c3.yaml index 7713afc37..dade44d14 100644 --- a/tests/components/version/test.esp32-c3.yaml +++ b/tests/components/version/test.esp32-c3.yaml @@ -1,3 +1 @@ -text_sensor: - - platform: version - name: "ESPHome Version" +<<: !include common.yaml diff --git a/tests/components/version/test.esp32-idf.yaml b/tests/components/version/test.esp32-idf.yaml index 7713afc37..dade44d14 100644 --- a/tests/components/version/test.esp32-idf.yaml +++ b/tests/components/version/test.esp32-idf.yaml @@ -1,3 +1 @@ -text_sensor: - - platform: version - name: "ESPHome Version" +<<: !include common.yaml diff --git a/tests/components/version/test.esp32.yaml b/tests/components/version/test.esp32.yaml index 7713afc37..dade44d14 100644 --- a/tests/components/version/test.esp32.yaml +++ b/tests/components/version/test.esp32.yaml @@ -1,3 +1 @@ -text_sensor: - - platform: version - name: "ESPHome Version" +<<: !include common.yaml diff --git a/tests/components/version/test.esp8266.yaml b/tests/components/version/test.esp8266.yaml index 7713afc37..dade44d14 100644 --- a/tests/components/version/test.esp8266.yaml +++ b/tests/components/version/test.esp8266.yaml @@ -1,3 +1 @@ -text_sensor: - - platform: version - name: "ESPHome Version" +<<: !include common.yaml diff --git a/tests/components/version/test.rp2040.yaml b/tests/components/version/test.rp2040.yaml index 7713afc37..dade44d14 100644 --- a/tests/components/version/test.rp2040.yaml +++ b/tests/components/version/test.rp2040.yaml @@ -1,3 +1 @@ -text_sensor: - - platform: version - name: "ESPHome Version" +<<: !include common.yaml diff --git a/tests/components/wake_on_lan/common.yaml b/tests/components/wake_on_lan/common.yaml new file mode 100644 index 000000000..6a5351b62 --- /dev/null +++ b/tests/components/wake_on_lan/common.yaml @@ -0,0 +1,9 @@ +wifi: + ssid: MySSID + password: password1 + +button: + - platform: wake_on_lan + id: wol_1 + name: wol_test_1 + target_mac_address: 12:34:56:78:90:ab diff --git a/tests/components/wake_on_lan/test.esp32-c3.yaml b/tests/components/wake_on_lan/test.esp32-c3.yaml index 6a5351b62..dade44d14 100644 --- a/tests/components/wake_on_lan/test.esp32-c3.yaml +++ b/tests/components/wake_on_lan/test.esp32-c3.yaml @@ -1,9 +1 @@ -wifi: - ssid: MySSID - password: password1 - -button: - - platform: wake_on_lan - id: wol_1 - name: wol_test_1 - target_mac_address: 12:34:56:78:90:ab +<<: !include common.yaml diff --git a/tests/components/wake_on_lan/test.esp32.yaml b/tests/components/wake_on_lan/test.esp32.yaml index 6a5351b62..dade44d14 100644 --- a/tests/components/wake_on_lan/test.esp32.yaml +++ b/tests/components/wake_on_lan/test.esp32.yaml @@ -1,9 +1 @@ -wifi: - ssid: MySSID - password: password1 - -button: - - platform: wake_on_lan - id: wol_1 - name: wol_test_1 - target_mac_address: 12:34:56:78:90:ab +<<: !include common.yaml diff --git a/tests/components/wake_on_lan/test.esp8266.yaml b/tests/components/wake_on_lan/test.esp8266.yaml index 6a5351b62..dade44d14 100644 --- a/tests/components/wake_on_lan/test.esp8266.yaml +++ b/tests/components/wake_on_lan/test.esp8266.yaml @@ -1,9 +1 @@ -wifi: - ssid: MySSID - password: password1 - -button: - - platform: wake_on_lan - id: wol_1 - name: wol_test_1 - target_mac_address: 12:34:56:78:90:ab +<<: !include common.yaml diff --git a/tests/components/wake_on_lan/test.rp2040.yaml b/tests/components/wake_on_lan/test.rp2040.yaml index 6a5351b62..dade44d14 100644 --- a/tests/components/wake_on_lan/test.rp2040.yaml +++ b/tests/components/wake_on_lan/test.rp2040.yaml @@ -1,9 +1 @@ -wifi: - ssid: MySSID - password: password1 - -button: - - platform: wake_on_lan - id: wol_1 - name: wol_test_1 - target_mac_address: 12:34:56:78:90:ab +<<: !include common.yaml diff --git a/tests/components/web_server/common.yaml b/tests/components/web_server/common.yaml new file mode 100644 index 000000000..94388726c --- /dev/null +++ b/tests/components/web_server/common.yaml @@ -0,0 +1,7 @@ +wifi: + ssid: MySSID + password: password1 + +web_server: + port: 8080 + version: 2 diff --git a/tests/components/web_server/test.esp32-c3-idf.yaml b/tests/components/web_server/test.esp32-c3-idf.yaml index 94388726c..dade44d14 100644 --- a/tests/components/web_server/test.esp32-c3-idf.yaml +++ b/tests/components/web_server/test.esp32-c3-idf.yaml @@ -1,7 +1 @@ -wifi: - ssid: MySSID - password: password1 - -web_server: - port: 8080 - version: 2 +<<: !include common.yaml diff --git a/tests/components/web_server/test.esp32-c3.yaml b/tests/components/web_server/test.esp32-c3.yaml index 94388726c..dade44d14 100644 --- a/tests/components/web_server/test.esp32-c3.yaml +++ b/tests/components/web_server/test.esp32-c3.yaml @@ -1,7 +1 @@ -wifi: - ssid: MySSID - password: password1 - -web_server: - port: 8080 - version: 2 +<<: !include common.yaml diff --git a/tests/components/web_server/test.esp32-idf.yaml b/tests/components/web_server/test.esp32-idf.yaml index 94388726c..dade44d14 100644 --- a/tests/components/web_server/test.esp32-idf.yaml +++ b/tests/components/web_server/test.esp32-idf.yaml @@ -1,7 +1 @@ -wifi: - ssid: MySSID - password: password1 - -web_server: - port: 8080 - version: 2 +<<: !include common.yaml diff --git a/tests/components/web_server/test.esp32.yaml b/tests/components/web_server/test.esp32.yaml index 94388726c..dade44d14 100644 --- a/tests/components/web_server/test.esp32.yaml +++ b/tests/components/web_server/test.esp32.yaml @@ -1,7 +1 @@ -wifi: - ssid: MySSID - password: password1 - -web_server: - port: 8080 - version: 2 +<<: !include common.yaml diff --git a/tests/components/web_server/test.esp8266.yaml b/tests/components/web_server/test.esp8266.yaml index 94388726c..dade44d14 100644 --- a/tests/components/web_server/test.esp8266.yaml +++ b/tests/components/web_server/test.esp8266.yaml @@ -1,7 +1 @@ -wifi: - ssid: MySSID - password: password1 - -web_server: - port: 8080 - version: 2 +<<: !include common.yaml diff --git a/tests/components/wiegand/common.yaml b/tests/components/wiegand/common.yaml new file mode 100644 index 000000000..4e15a44b8 --- /dev/null +++ b/tests/components/wiegand/common.yaml @@ -0,0 +1,10 @@ +wiegand: + - id: test_wiegand + d0: 5 + d1: 4 + on_key: + - lambda: ESP_LOGI("KEY", "Received key %d", x); + on_tag: + - lambda: ESP_LOGI("TAG", "Received tag %s", x.c_str()); + on_raw: + - lambda: ESP_LOGI("RAW", "Received raw %d bits, value %llx", bits, value); diff --git a/tests/components/wiegand/test.esp32-c3-idf.yaml b/tests/components/wiegand/test.esp32-c3-idf.yaml index 4e15a44b8..dade44d14 100644 --- a/tests/components/wiegand/test.esp32-c3-idf.yaml +++ b/tests/components/wiegand/test.esp32-c3-idf.yaml @@ -1,10 +1 @@ -wiegand: - - id: test_wiegand - d0: 5 - d1: 4 - on_key: - - lambda: ESP_LOGI("KEY", "Received key %d", x); - on_tag: - - lambda: ESP_LOGI("TAG", "Received tag %s", x.c_str()); - on_raw: - - lambda: ESP_LOGI("RAW", "Received raw %d bits, value %llx", bits, value); +<<: !include common.yaml diff --git a/tests/components/wiegand/test.esp32-c3.yaml b/tests/components/wiegand/test.esp32-c3.yaml index 4e15a44b8..dade44d14 100644 --- a/tests/components/wiegand/test.esp32-c3.yaml +++ b/tests/components/wiegand/test.esp32-c3.yaml @@ -1,10 +1 @@ -wiegand: - - id: test_wiegand - d0: 5 - d1: 4 - on_key: - - lambda: ESP_LOGI("KEY", "Received key %d", x); - on_tag: - - lambda: ESP_LOGI("TAG", "Received tag %s", x.c_str()); - on_raw: - - lambda: ESP_LOGI("RAW", "Received raw %d bits, value %llx", bits, value); +<<: !include common.yaml diff --git a/tests/components/wiegand/test.esp32-idf.yaml b/tests/components/wiegand/test.esp32-idf.yaml index 4e15a44b8..dade44d14 100644 --- a/tests/components/wiegand/test.esp32-idf.yaml +++ b/tests/components/wiegand/test.esp32-idf.yaml @@ -1,10 +1 @@ -wiegand: - - id: test_wiegand - d0: 5 - d1: 4 - on_key: - - lambda: ESP_LOGI("KEY", "Received key %d", x); - on_tag: - - lambda: ESP_LOGI("TAG", "Received tag %s", x.c_str()); - on_raw: - - lambda: ESP_LOGI("RAW", "Received raw %d bits, value %llx", bits, value); +<<: !include common.yaml diff --git a/tests/components/wiegand/test.esp32.yaml b/tests/components/wiegand/test.esp32.yaml index 4e15a44b8..dade44d14 100644 --- a/tests/components/wiegand/test.esp32.yaml +++ b/tests/components/wiegand/test.esp32.yaml @@ -1,10 +1 @@ -wiegand: - - id: test_wiegand - d0: 5 - d1: 4 - on_key: - - lambda: ESP_LOGI("KEY", "Received key %d", x); - on_tag: - - lambda: ESP_LOGI("TAG", "Received tag %s", x.c_str()); - on_raw: - - lambda: ESP_LOGI("RAW", "Received raw %d bits, value %llx", bits, value); +<<: !include common.yaml diff --git a/tests/components/wiegand/test.esp8266.yaml b/tests/components/wiegand/test.esp8266.yaml index 4e15a44b8..dade44d14 100644 --- a/tests/components/wiegand/test.esp8266.yaml +++ b/tests/components/wiegand/test.esp8266.yaml @@ -1,10 +1 @@ -wiegand: - - id: test_wiegand - d0: 5 - d1: 4 - on_key: - - lambda: ESP_LOGI("KEY", "Received key %d", x); - on_tag: - - lambda: ESP_LOGI("TAG", "Received tag %s", x.c_str()); - on_raw: - - lambda: ESP_LOGI("RAW", "Received raw %d bits, value %llx", bits, value); +<<: !include common.yaml diff --git a/tests/components/wiegand/test.rp2040.yaml b/tests/components/wiegand/test.rp2040.yaml index 4e15a44b8..dade44d14 100644 --- a/tests/components/wiegand/test.rp2040.yaml +++ b/tests/components/wiegand/test.rp2040.yaml @@ -1,10 +1 @@ -wiegand: - - id: test_wiegand - d0: 5 - d1: 4 - on_key: - - lambda: ESP_LOGI("KEY", "Received key %d", x); - on_tag: - - lambda: ESP_LOGI("TAG", "Received tag %s", x.c_str()); - on_raw: - - lambda: ESP_LOGI("RAW", "Received raw %d bits, value %llx", bits, value); +<<: !include common.yaml diff --git a/tests/components/wifi/common.yaml b/tests/components/wifi/common.yaml new file mode 100644 index 000000000..003f6347b --- /dev/null +++ b/tests/components/wifi/common.yaml @@ -0,0 +1,9 @@ +esphome: + on_boot: + then: + - wifi.disable + - wifi.enable + +wifi: + ssid: MySSID + password: password1 diff --git a/tests/components/wifi/test.esp32-c3-idf.yaml b/tests/components/wifi/test.esp32-c3-idf.yaml index 003f6347b..dade44d14 100644 --- a/tests/components/wifi/test.esp32-c3-idf.yaml +++ b/tests/components/wifi/test.esp32-c3-idf.yaml @@ -1,9 +1 @@ -esphome: - on_boot: - then: - - wifi.disable - - wifi.enable - -wifi: - ssid: MySSID - password: password1 +<<: !include common.yaml diff --git a/tests/components/wifi/test.esp32-c3.yaml b/tests/components/wifi/test.esp32-c3.yaml index 003f6347b..dade44d14 100644 --- a/tests/components/wifi/test.esp32-c3.yaml +++ b/tests/components/wifi/test.esp32-c3.yaml @@ -1,9 +1 @@ -esphome: - on_boot: - then: - - wifi.disable - - wifi.enable - -wifi: - ssid: MySSID - password: password1 +<<: !include common.yaml diff --git a/tests/components/wifi/test.esp32-idf.yaml b/tests/components/wifi/test.esp32-idf.yaml index 003f6347b..dade44d14 100644 --- a/tests/components/wifi/test.esp32-idf.yaml +++ b/tests/components/wifi/test.esp32-idf.yaml @@ -1,9 +1 @@ -esphome: - on_boot: - then: - - wifi.disable - - wifi.enable - -wifi: - ssid: MySSID - password: password1 +<<: !include common.yaml diff --git a/tests/components/wifi/test.esp32.yaml b/tests/components/wifi/test.esp32.yaml index 003f6347b..dade44d14 100644 --- a/tests/components/wifi/test.esp32.yaml +++ b/tests/components/wifi/test.esp32.yaml @@ -1,9 +1 @@ -esphome: - on_boot: - then: - - wifi.disable - - wifi.enable - -wifi: - ssid: MySSID - password: password1 +<<: !include common.yaml diff --git a/tests/components/wifi/test.esp8266.yaml b/tests/components/wifi/test.esp8266.yaml index 003f6347b..dade44d14 100644 --- a/tests/components/wifi/test.esp8266.yaml +++ b/tests/components/wifi/test.esp8266.yaml @@ -1,9 +1 @@ -esphome: - on_boot: - then: - - wifi.disable - - wifi.enable - -wifi: - ssid: MySSID - password: password1 +<<: !include common.yaml diff --git a/tests/components/wifi/test.rp2040.yaml b/tests/components/wifi/test.rp2040.yaml index 003f6347b..dade44d14 100644 --- a/tests/components/wifi/test.rp2040.yaml +++ b/tests/components/wifi/test.rp2040.yaml @@ -1,9 +1 @@ -esphome: - on_boot: - then: - - wifi.disable - - wifi.enable - -wifi: - ssid: MySSID - password: password1 +<<: !include common.yaml diff --git a/tests/components/wifi_info/common.yaml b/tests/components/wifi_info/common.yaml new file mode 100644 index 000000000..cf5ea563b --- /dev/null +++ b/tests/components/wifi_info/common.yaml @@ -0,0 +1,18 @@ +wifi: + ssid: MySSID + password: password1 + +text_sensor: + - platform: wifi_info + scan_results: + name: Scan Results + ip_address: + name: IP Address + ssid: + name: SSID + bssid: + name: BSSID + mac_address: + name: Mac Address + dns_address: + name: DNS ADdress diff --git a/tests/components/wifi_info/test.esp32-c3-idf.yaml b/tests/components/wifi_info/test.esp32-c3-idf.yaml index cf5ea563b..dade44d14 100644 --- a/tests/components/wifi_info/test.esp32-c3-idf.yaml +++ b/tests/components/wifi_info/test.esp32-c3-idf.yaml @@ -1,18 +1 @@ -wifi: - ssid: MySSID - password: password1 - -text_sensor: - - platform: wifi_info - scan_results: - name: Scan Results - ip_address: - name: IP Address - ssid: - name: SSID - bssid: - name: BSSID - mac_address: - name: Mac Address - dns_address: - name: DNS ADdress +<<: !include common.yaml diff --git a/tests/components/wifi_info/test.esp32-c3.yaml b/tests/components/wifi_info/test.esp32-c3.yaml index cf5ea563b..dade44d14 100644 --- a/tests/components/wifi_info/test.esp32-c3.yaml +++ b/tests/components/wifi_info/test.esp32-c3.yaml @@ -1,18 +1 @@ -wifi: - ssid: MySSID - password: password1 - -text_sensor: - - platform: wifi_info - scan_results: - name: Scan Results - ip_address: - name: IP Address - ssid: - name: SSID - bssid: - name: BSSID - mac_address: - name: Mac Address - dns_address: - name: DNS ADdress +<<: !include common.yaml diff --git a/tests/components/wifi_info/test.esp32-idf.yaml b/tests/components/wifi_info/test.esp32-idf.yaml index cf5ea563b..dade44d14 100644 --- a/tests/components/wifi_info/test.esp32-idf.yaml +++ b/tests/components/wifi_info/test.esp32-idf.yaml @@ -1,18 +1 @@ -wifi: - ssid: MySSID - password: password1 - -text_sensor: - - platform: wifi_info - scan_results: - name: Scan Results - ip_address: - name: IP Address - ssid: - name: SSID - bssid: - name: BSSID - mac_address: - name: Mac Address - dns_address: - name: DNS ADdress +<<: !include common.yaml diff --git a/tests/components/wifi_info/test.esp32.yaml b/tests/components/wifi_info/test.esp32.yaml index cf5ea563b..dade44d14 100644 --- a/tests/components/wifi_info/test.esp32.yaml +++ b/tests/components/wifi_info/test.esp32.yaml @@ -1,18 +1 @@ -wifi: - ssid: MySSID - password: password1 - -text_sensor: - - platform: wifi_info - scan_results: - name: Scan Results - ip_address: - name: IP Address - ssid: - name: SSID - bssid: - name: BSSID - mac_address: - name: Mac Address - dns_address: - name: DNS ADdress +<<: !include common.yaml diff --git a/tests/components/wifi_info/test.esp8266.yaml b/tests/components/wifi_info/test.esp8266.yaml index cf5ea563b..dade44d14 100644 --- a/tests/components/wifi_info/test.esp8266.yaml +++ b/tests/components/wifi_info/test.esp8266.yaml @@ -1,18 +1 @@ -wifi: - ssid: MySSID - password: password1 - -text_sensor: - - platform: wifi_info - scan_results: - name: Scan Results - ip_address: - name: IP Address - ssid: - name: SSID - bssid: - name: BSSID - mac_address: - name: Mac Address - dns_address: - name: DNS ADdress +<<: !include common.yaml diff --git a/tests/components/wifi_info/test.rp2040.yaml b/tests/components/wifi_info/test.rp2040.yaml index cf5ea563b..dade44d14 100644 --- a/tests/components/wifi_info/test.rp2040.yaml +++ b/tests/components/wifi_info/test.rp2040.yaml @@ -1,18 +1 @@ -wifi: - ssid: MySSID - password: password1 - -text_sensor: - - platform: wifi_info - scan_results: - name: Scan Results - ip_address: - name: IP Address - ssid: - name: SSID - bssid: - name: BSSID - mac_address: - name: Mac Address - dns_address: - name: DNS ADdress +<<: !include common.yaml diff --git a/tests/components/wifi_signal/common.yaml b/tests/components/wifi_signal/common.yaml new file mode 100644 index 000000000..58d1cab24 --- /dev/null +++ b/tests/components/wifi_signal/common.yaml @@ -0,0 +1,8 @@ +wifi: + ssid: MySSID + password: password1 + +sensor: + - platform: wifi_signal + name: WiFi Signal Sensor + update_interval: 15s diff --git a/tests/components/wifi_signal/test.esp32-c3-idf.yaml b/tests/components/wifi_signal/test.esp32-c3-idf.yaml index 58d1cab24..dade44d14 100644 --- a/tests/components/wifi_signal/test.esp32-c3-idf.yaml +++ b/tests/components/wifi_signal/test.esp32-c3-idf.yaml @@ -1,8 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: wifi_signal - name: WiFi Signal Sensor - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/wifi_signal/test.esp32-c3.yaml b/tests/components/wifi_signal/test.esp32-c3.yaml index 58d1cab24..dade44d14 100644 --- a/tests/components/wifi_signal/test.esp32-c3.yaml +++ b/tests/components/wifi_signal/test.esp32-c3.yaml @@ -1,8 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: wifi_signal - name: WiFi Signal Sensor - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/wifi_signal/test.esp32-idf.yaml b/tests/components/wifi_signal/test.esp32-idf.yaml index 58d1cab24..dade44d14 100644 --- a/tests/components/wifi_signal/test.esp32-idf.yaml +++ b/tests/components/wifi_signal/test.esp32-idf.yaml @@ -1,8 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: wifi_signal - name: WiFi Signal Sensor - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/wifi_signal/test.esp32.yaml b/tests/components/wifi_signal/test.esp32.yaml index 58d1cab24..dade44d14 100644 --- a/tests/components/wifi_signal/test.esp32.yaml +++ b/tests/components/wifi_signal/test.esp32.yaml @@ -1,8 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: wifi_signal - name: WiFi Signal Sensor - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/wifi_signal/test.esp8266.yaml b/tests/components/wifi_signal/test.esp8266.yaml index 58d1cab24..dade44d14 100644 --- a/tests/components/wifi_signal/test.esp8266.yaml +++ b/tests/components/wifi_signal/test.esp8266.yaml @@ -1,8 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: wifi_signal - name: WiFi Signal Sensor - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/wifi_signal/test.rp2040.yaml b/tests/components/wifi_signal/test.rp2040.yaml index 58d1cab24..dade44d14 100644 --- a/tests/components/wifi_signal/test.rp2040.yaml +++ b/tests/components/wifi_signal/test.rp2040.yaml @@ -1,8 +1 @@ -wifi: - ssid: MySSID - password: password1 - -sensor: - - platform: wifi_signal - name: WiFi Signal Sensor - update_interval: 15s +<<: !include common.yaml diff --git a/tests/components/xiaomi_ble/common.yaml b/tests/components/xiaomi_ble/common.yaml new file mode 100644 index 000000000..9d1039317 --- /dev/null +++ b/tests/components/xiaomi_ble/common.yaml @@ -0,0 +1,3 @@ +esp32_ble_tracker: + +xiaomi_ble: diff --git a/tests/components/xiaomi_ble/test.esp32-c3-idf.yaml b/tests/components/xiaomi_ble/test.esp32-c3-idf.yaml index 9d1039317..dade44d14 100644 --- a/tests/components/xiaomi_ble/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_ble/test.esp32-c3-idf.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -xiaomi_ble: +<<: !include common.yaml diff --git a/tests/components/xiaomi_ble/test.esp32-c3.yaml b/tests/components/xiaomi_ble/test.esp32-c3.yaml index 9d1039317..dade44d14 100644 --- a/tests/components/xiaomi_ble/test.esp32-c3.yaml +++ b/tests/components/xiaomi_ble/test.esp32-c3.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -xiaomi_ble: +<<: !include common.yaml diff --git a/tests/components/xiaomi_ble/test.esp32-idf.yaml b/tests/components/xiaomi_ble/test.esp32-idf.yaml index 9d1039317..dade44d14 100644 --- a/tests/components/xiaomi_ble/test.esp32-idf.yaml +++ b/tests/components/xiaomi_ble/test.esp32-idf.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -xiaomi_ble: +<<: !include common.yaml diff --git a/tests/components/xiaomi_ble/test.esp32.yaml b/tests/components/xiaomi_ble/test.esp32.yaml index 9d1039317..dade44d14 100644 --- a/tests/components/xiaomi_ble/test.esp32.yaml +++ b/tests/components/xiaomi_ble/test.esp32.yaml @@ -1,3 +1 @@ -esp32_ble_tracker: - -xiaomi_ble: +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgd1/common.yaml b/tests/components/xiaomi_cgd1/common.yaml new file mode 100644 index 000000000..94ed09e8f --- /dev/null +++ b/tests/components/xiaomi_cgd1/common.yaml @@ -0,0 +1,12 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_cgd1 + mac_address: A4:C1:38:D1:61:7D + bindkey: c99d2313182473b38001086febf781bd + temperature: + name: Xiaomi CGD1 Temperature + humidity: + name: Xiaomi CGD1 Humidity + battery_level: + name: Xiaomi CGD1 Battery Level diff --git a/tests/components/xiaomi_cgd1/test.esp32-c3-idf.yaml b/tests/components/xiaomi_cgd1/test.esp32-c3-idf.yaml index 94ed09e8f..dade44d14 100644 --- a/tests/components/xiaomi_cgd1/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_cgd1/test.esp32-c3-idf.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgd1 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgd1/test.esp32-c3.yaml b/tests/components/xiaomi_cgd1/test.esp32-c3.yaml index 94ed09e8f..dade44d14 100644 --- a/tests/components/xiaomi_cgd1/test.esp32-c3.yaml +++ b/tests/components/xiaomi_cgd1/test.esp32-c3.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgd1 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgd1/test.esp32-idf.yaml b/tests/components/xiaomi_cgd1/test.esp32-idf.yaml index 94ed09e8f..dade44d14 100644 --- a/tests/components/xiaomi_cgd1/test.esp32-idf.yaml +++ b/tests/components/xiaomi_cgd1/test.esp32-idf.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgd1 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgd1/test.esp32.yaml b/tests/components/xiaomi_cgd1/test.esp32.yaml index 94ed09e8f..dade44d14 100644 --- a/tests/components/xiaomi_cgd1/test.esp32.yaml +++ b/tests/components/xiaomi_cgd1/test.esp32.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgd1 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgdk2/common.yaml b/tests/components/xiaomi_cgdk2/common.yaml new file mode 100644 index 000000000..dddca5622 --- /dev/null +++ b/tests/components/xiaomi_cgdk2/common.yaml @@ -0,0 +1,12 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_cgdk2 + mac_address: A4:C1:38:D1:61:7D + bindkey: c99d2313182473b38001086febf781bd + temperature: + name: Xiaomi CGD1 Temperature + humidity: + name: Xiaomi CGD1 Humidity + battery_level: + name: Xiaomi CGD1 Battery Level diff --git a/tests/components/xiaomi_cgdk2/test.esp32-c3-idf.yaml b/tests/components/xiaomi_cgdk2/test.esp32-c3-idf.yaml index dddca5622..dade44d14 100644 --- a/tests/components/xiaomi_cgdk2/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_cgdk2/test.esp32-c3-idf.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgdk2 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgdk2/test.esp32-c3.yaml b/tests/components/xiaomi_cgdk2/test.esp32-c3.yaml index dddca5622..dade44d14 100644 --- a/tests/components/xiaomi_cgdk2/test.esp32-c3.yaml +++ b/tests/components/xiaomi_cgdk2/test.esp32-c3.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgdk2 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgdk2/test.esp32-idf.yaml b/tests/components/xiaomi_cgdk2/test.esp32-idf.yaml index dddca5622..dade44d14 100644 --- a/tests/components/xiaomi_cgdk2/test.esp32-idf.yaml +++ b/tests/components/xiaomi_cgdk2/test.esp32-idf.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgdk2 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgdk2/test.esp32.yaml b/tests/components/xiaomi_cgdk2/test.esp32.yaml index dddca5622..dade44d14 100644 --- a/tests/components/xiaomi_cgdk2/test.esp32.yaml +++ b/tests/components/xiaomi_cgdk2/test.esp32.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgdk2 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgg1/common.yaml b/tests/components/xiaomi_cgg1/common.yaml new file mode 100644 index 000000000..170aebfbd --- /dev/null +++ b/tests/components/xiaomi_cgg1/common.yaml @@ -0,0 +1,12 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_cgg1 + mac_address: A4:C1:38:D1:61:7D + bindkey: c99d2313182473b38001086febf781bd + temperature: + name: Xiaomi CGD1 Temperature + humidity: + name: Xiaomi CGD1 Humidity + battery_level: + name: Xiaomi CGD1 Battery Level diff --git a/tests/components/xiaomi_cgg1/test.esp32-c3-idf.yaml b/tests/components/xiaomi_cgg1/test.esp32-c3-idf.yaml index 170aebfbd..dade44d14 100644 --- a/tests/components/xiaomi_cgg1/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_cgg1/test.esp32-c3-idf.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgg1 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgg1/test.esp32-c3.yaml b/tests/components/xiaomi_cgg1/test.esp32-c3.yaml index 170aebfbd..dade44d14 100644 --- a/tests/components/xiaomi_cgg1/test.esp32-c3.yaml +++ b/tests/components/xiaomi_cgg1/test.esp32-c3.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgg1 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgg1/test.esp32-idf.yaml b/tests/components/xiaomi_cgg1/test.esp32-idf.yaml index 170aebfbd..dade44d14 100644 --- a/tests/components/xiaomi_cgg1/test.esp32-idf.yaml +++ b/tests/components/xiaomi_cgg1/test.esp32-idf.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgg1 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgg1/test.esp32.yaml b/tests/components/xiaomi_cgg1/test.esp32.yaml index 170aebfbd..dade44d14 100644 --- a/tests/components/xiaomi_cgg1/test.esp32.yaml +++ b/tests/components/xiaomi_cgg1/test.esp32.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_cgg1 - mac_address: A4:C1:38:D1:61:7D - bindkey: c99d2313182473b38001086febf781bd - temperature: - name: Xiaomi CGD1 Temperature - humidity: - name: Xiaomi CGD1 Humidity - battery_level: - name: Xiaomi CGD1 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgpr1/common.yaml b/tests/components/xiaomi_cgpr1/common.yaml new file mode 100644 index 000000000..48082a886 --- /dev/null +++ b/tests/components/xiaomi_cgpr1/common.yaml @@ -0,0 +1,13 @@ +esp32_ble_tracker: + +binary_sensor: + - platform: xiaomi_cgpr1 + name: CGPR1 Motion + mac_address: "12:34:56:12:34:56" + bindkey: 48403ebe2d385db8d0c187f81e62cb64 + battery_level: + name: CGPR1 battery Level + idle_time: + name: CGPR1 Idle Time + illuminance: + name: CGPR1 Illuminance diff --git a/tests/components/xiaomi_cgpr1/test.esp32-c3-idf.yaml b/tests/components/xiaomi_cgpr1/test.esp32-c3-idf.yaml index 48082a886..dade44d14 100644 --- a/tests/components/xiaomi_cgpr1/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_cgpr1/test.esp32-c3-idf.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_cgpr1 - name: CGPR1 Motion - mac_address: "12:34:56:12:34:56" - bindkey: 48403ebe2d385db8d0c187f81e62cb64 - battery_level: - name: CGPR1 battery Level - idle_time: - name: CGPR1 Idle Time - illuminance: - name: CGPR1 Illuminance +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgpr1/test.esp32-c3.yaml b/tests/components/xiaomi_cgpr1/test.esp32-c3.yaml index 48082a886..dade44d14 100644 --- a/tests/components/xiaomi_cgpr1/test.esp32-c3.yaml +++ b/tests/components/xiaomi_cgpr1/test.esp32-c3.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_cgpr1 - name: CGPR1 Motion - mac_address: "12:34:56:12:34:56" - bindkey: 48403ebe2d385db8d0c187f81e62cb64 - battery_level: - name: CGPR1 battery Level - idle_time: - name: CGPR1 Idle Time - illuminance: - name: CGPR1 Illuminance +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgpr1/test.esp32-idf.yaml b/tests/components/xiaomi_cgpr1/test.esp32-idf.yaml index 48082a886..dade44d14 100644 --- a/tests/components/xiaomi_cgpr1/test.esp32-idf.yaml +++ b/tests/components/xiaomi_cgpr1/test.esp32-idf.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_cgpr1 - name: CGPR1 Motion - mac_address: "12:34:56:12:34:56" - bindkey: 48403ebe2d385db8d0c187f81e62cb64 - battery_level: - name: CGPR1 battery Level - idle_time: - name: CGPR1 Idle Time - illuminance: - name: CGPR1 Illuminance +<<: !include common.yaml diff --git a/tests/components/xiaomi_cgpr1/test.esp32.yaml b/tests/components/xiaomi_cgpr1/test.esp32.yaml index 48082a886..dade44d14 100644 --- a/tests/components/xiaomi_cgpr1/test.esp32.yaml +++ b/tests/components/xiaomi_cgpr1/test.esp32.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_cgpr1 - name: CGPR1 Motion - mac_address: "12:34:56:12:34:56" - bindkey: 48403ebe2d385db8d0c187f81e62cb64 - battery_level: - name: CGPR1 battery Level - idle_time: - name: CGPR1 Idle Time - illuminance: - name: CGPR1 Illuminance +<<: !include common.yaml diff --git a/tests/components/xiaomi_gcls002/common.yaml b/tests/components/xiaomi_gcls002/common.yaml new file mode 100644 index 000000000..32990708c --- /dev/null +++ b/tests/components/xiaomi_gcls002/common.yaml @@ -0,0 +1,13 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_gcls002 + mac_address: 94:2B:FF:5C:91:61 + temperature: + name: GCLS02 Temperature + moisture: + name: GCLS02 Moisture + conductivity: + name: GCLS02 Soil Conductivity + illuminance: + name: GCLS02 Illuminance diff --git a/tests/components/xiaomi_gcls002/test.esp32-c3-idf.yaml b/tests/components/xiaomi_gcls002/test.esp32-c3-idf.yaml index 32990708c..dade44d14 100644 --- a/tests/components/xiaomi_gcls002/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_gcls002/test.esp32-c3-idf.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_gcls002 - mac_address: 94:2B:FF:5C:91:61 - temperature: - name: GCLS02 Temperature - moisture: - name: GCLS02 Moisture - conductivity: - name: GCLS02 Soil Conductivity - illuminance: - name: GCLS02 Illuminance +<<: !include common.yaml diff --git a/tests/components/xiaomi_gcls002/test.esp32-c3.yaml b/tests/components/xiaomi_gcls002/test.esp32-c3.yaml index 32990708c..dade44d14 100644 --- a/tests/components/xiaomi_gcls002/test.esp32-c3.yaml +++ b/tests/components/xiaomi_gcls002/test.esp32-c3.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_gcls002 - mac_address: 94:2B:FF:5C:91:61 - temperature: - name: GCLS02 Temperature - moisture: - name: GCLS02 Moisture - conductivity: - name: GCLS02 Soil Conductivity - illuminance: - name: GCLS02 Illuminance +<<: !include common.yaml diff --git a/tests/components/xiaomi_gcls002/test.esp32-idf.yaml b/tests/components/xiaomi_gcls002/test.esp32-idf.yaml index 32990708c..dade44d14 100644 --- a/tests/components/xiaomi_gcls002/test.esp32-idf.yaml +++ b/tests/components/xiaomi_gcls002/test.esp32-idf.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_gcls002 - mac_address: 94:2B:FF:5C:91:61 - temperature: - name: GCLS02 Temperature - moisture: - name: GCLS02 Moisture - conductivity: - name: GCLS02 Soil Conductivity - illuminance: - name: GCLS02 Illuminance +<<: !include common.yaml diff --git a/tests/components/xiaomi_gcls002/test.esp32.yaml b/tests/components/xiaomi_gcls002/test.esp32.yaml index 32990708c..dade44d14 100644 --- a/tests/components/xiaomi_gcls002/test.esp32.yaml +++ b/tests/components/xiaomi_gcls002/test.esp32.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_gcls002 - mac_address: 94:2B:FF:5C:91:61 - temperature: - name: GCLS02 Temperature - moisture: - name: GCLS02 Moisture - conductivity: - name: GCLS02 Soil Conductivity - illuminance: - name: GCLS02 Illuminance +<<: !include common.yaml diff --git a/tests/components/xiaomi_hhccjcy01/common.yaml b/tests/components/xiaomi_hhccjcy01/common.yaml new file mode 100644 index 000000000..0def90948 --- /dev/null +++ b/tests/components/xiaomi_hhccjcy01/common.yaml @@ -0,0 +1,15 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_hhccjcy01 + mac_address: 94:2B:FF:5C:91:61 + temperature: + name: Xiaomi HHCCJCY01 Temperature + moisture: + name: Xiaomi HHCCJCY01 Moisture + illuminance: + name: Xiaomi HHCCJCY01 Illuminance + conductivity: + name: Xiaomi HHCCJCY01 Soil Conductivity + battery_level: + name: Xiaomi HHCCJCY01 Battery Level diff --git a/tests/components/xiaomi_hhccjcy01/test.esp32-c3-idf.yaml b/tests/components/xiaomi_hhccjcy01/test.esp32-c3-idf.yaml index 0def90948..dade44d14 100644 --- a/tests/components/xiaomi_hhccjcy01/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_hhccjcy01/test.esp32-c3-idf.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_hhccjcy01 - mac_address: 94:2B:FF:5C:91:61 - temperature: - name: Xiaomi HHCCJCY01 Temperature - moisture: - name: Xiaomi HHCCJCY01 Moisture - illuminance: - name: Xiaomi HHCCJCY01 Illuminance - conductivity: - name: Xiaomi HHCCJCY01 Soil Conductivity - battery_level: - name: Xiaomi HHCCJCY01 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_hhccjcy01/test.esp32-c3.yaml b/tests/components/xiaomi_hhccjcy01/test.esp32-c3.yaml index 0def90948..dade44d14 100644 --- a/tests/components/xiaomi_hhccjcy01/test.esp32-c3.yaml +++ b/tests/components/xiaomi_hhccjcy01/test.esp32-c3.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_hhccjcy01 - mac_address: 94:2B:FF:5C:91:61 - temperature: - name: Xiaomi HHCCJCY01 Temperature - moisture: - name: Xiaomi HHCCJCY01 Moisture - illuminance: - name: Xiaomi HHCCJCY01 Illuminance - conductivity: - name: Xiaomi HHCCJCY01 Soil Conductivity - battery_level: - name: Xiaomi HHCCJCY01 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_hhccjcy01/test.esp32-idf.yaml b/tests/components/xiaomi_hhccjcy01/test.esp32-idf.yaml index 0def90948..dade44d14 100644 --- a/tests/components/xiaomi_hhccjcy01/test.esp32-idf.yaml +++ b/tests/components/xiaomi_hhccjcy01/test.esp32-idf.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_hhccjcy01 - mac_address: 94:2B:FF:5C:91:61 - temperature: - name: Xiaomi HHCCJCY01 Temperature - moisture: - name: Xiaomi HHCCJCY01 Moisture - illuminance: - name: Xiaomi HHCCJCY01 Illuminance - conductivity: - name: Xiaomi HHCCJCY01 Soil Conductivity - battery_level: - name: Xiaomi HHCCJCY01 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_hhccjcy01/test.esp32.yaml b/tests/components/xiaomi_hhccjcy01/test.esp32.yaml index 0def90948..dade44d14 100644 --- a/tests/components/xiaomi_hhccjcy01/test.esp32.yaml +++ b/tests/components/xiaomi_hhccjcy01/test.esp32.yaml @@ -1,15 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_hhccjcy01 - mac_address: 94:2B:FF:5C:91:61 - temperature: - name: Xiaomi HHCCJCY01 Temperature - moisture: - name: Xiaomi HHCCJCY01 Moisture - illuminance: - name: Xiaomi HHCCJCY01 Illuminance - conductivity: - name: Xiaomi HHCCJCY01 Soil Conductivity - battery_level: - name: Xiaomi HHCCJCY01 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_hhccpot002/common.yaml b/tests/components/xiaomi_hhccpot002/common.yaml new file mode 100644 index 000000000..2e5fa1462 --- /dev/null +++ b/tests/components/xiaomi_hhccpot002/common.yaml @@ -0,0 +1,9 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_hhccpot002 + mac_address: 94:2B:FF:5C:91:61 + moisture: + name: HHCCPOT002 Moisture + conductivity: + name: HHCCPOT002 Soil Conductivity diff --git a/tests/components/xiaomi_hhccpot002/test.esp32-c3-idf.yaml b/tests/components/xiaomi_hhccpot002/test.esp32-c3-idf.yaml index 2e5fa1462..dade44d14 100644 --- a/tests/components/xiaomi_hhccpot002/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_hhccpot002/test.esp32-c3-idf.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_hhccpot002 - mac_address: 94:2B:FF:5C:91:61 - moisture: - name: HHCCPOT002 Moisture - conductivity: - name: HHCCPOT002 Soil Conductivity +<<: !include common.yaml diff --git a/tests/components/xiaomi_hhccpot002/test.esp32-c3.yaml b/tests/components/xiaomi_hhccpot002/test.esp32-c3.yaml index 2e5fa1462..dade44d14 100644 --- a/tests/components/xiaomi_hhccpot002/test.esp32-c3.yaml +++ b/tests/components/xiaomi_hhccpot002/test.esp32-c3.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_hhccpot002 - mac_address: 94:2B:FF:5C:91:61 - moisture: - name: HHCCPOT002 Moisture - conductivity: - name: HHCCPOT002 Soil Conductivity +<<: !include common.yaml diff --git a/tests/components/xiaomi_hhccpot002/test.esp32-idf.yaml b/tests/components/xiaomi_hhccpot002/test.esp32-idf.yaml index 2e5fa1462..dade44d14 100644 --- a/tests/components/xiaomi_hhccpot002/test.esp32-idf.yaml +++ b/tests/components/xiaomi_hhccpot002/test.esp32-idf.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_hhccpot002 - mac_address: 94:2B:FF:5C:91:61 - moisture: - name: HHCCPOT002 Moisture - conductivity: - name: HHCCPOT002 Soil Conductivity +<<: !include common.yaml diff --git a/tests/components/xiaomi_hhccpot002/test.esp32.yaml b/tests/components/xiaomi_hhccpot002/test.esp32.yaml index 2e5fa1462..dade44d14 100644 --- a/tests/components/xiaomi_hhccpot002/test.esp32.yaml +++ b/tests/components/xiaomi_hhccpot002/test.esp32.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_hhccpot002 - mac_address: 94:2B:FF:5C:91:61 - moisture: - name: HHCCPOT002 Moisture - conductivity: - name: HHCCPOT002 Soil Conductivity +<<: !include common.yaml diff --git a/tests/components/xiaomi_jqjcy01ym/common.yaml b/tests/components/xiaomi_jqjcy01ym/common.yaml new file mode 100644 index 000000000..54c4b33dc --- /dev/null +++ b/tests/components/xiaomi_jqjcy01ym/common.yaml @@ -0,0 +1,13 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_jqjcy01ym + mac_address: 7A:80:8E:19:36:BA + temperature: + name: JQJCY01YM Temperature + humidity: + name: JQJCY01YM Humidity + formaldehyde: + name: JQJCY01YM Formaldehyde + battery_level: + name: JQJCY01YM Battery Level diff --git a/tests/components/xiaomi_jqjcy01ym/test.esp32-c3-idf.yaml b/tests/components/xiaomi_jqjcy01ym/test.esp32-c3-idf.yaml index 54c4b33dc..dade44d14 100644 --- a/tests/components/xiaomi_jqjcy01ym/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_jqjcy01ym/test.esp32-c3-idf.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_jqjcy01ym - mac_address: 7A:80:8E:19:36:BA - temperature: - name: JQJCY01YM Temperature - humidity: - name: JQJCY01YM Humidity - formaldehyde: - name: JQJCY01YM Formaldehyde - battery_level: - name: JQJCY01YM Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_jqjcy01ym/test.esp32-c3.yaml b/tests/components/xiaomi_jqjcy01ym/test.esp32-c3.yaml index 54c4b33dc..dade44d14 100644 --- a/tests/components/xiaomi_jqjcy01ym/test.esp32-c3.yaml +++ b/tests/components/xiaomi_jqjcy01ym/test.esp32-c3.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_jqjcy01ym - mac_address: 7A:80:8E:19:36:BA - temperature: - name: JQJCY01YM Temperature - humidity: - name: JQJCY01YM Humidity - formaldehyde: - name: JQJCY01YM Formaldehyde - battery_level: - name: JQJCY01YM Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_jqjcy01ym/test.esp32-idf.yaml b/tests/components/xiaomi_jqjcy01ym/test.esp32-idf.yaml index 54c4b33dc..dade44d14 100644 --- a/tests/components/xiaomi_jqjcy01ym/test.esp32-idf.yaml +++ b/tests/components/xiaomi_jqjcy01ym/test.esp32-idf.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_jqjcy01ym - mac_address: 7A:80:8E:19:36:BA - temperature: - name: JQJCY01YM Temperature - humidity: - name: JQJCY01YM Humidity - formaldehyde: - name: JQJCY01YM Formaldehyde - battery_level: - name: JQJCY01YM Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_jqjcy01ym/test.esp32.yaml b/tests/components/xiaomi_jqjcy01ym/test.esp32.yaml index 54c4b33dc..dade44d14 100644 --- a/tests/components/xiaomi_jqjcy01ym/test.esp32.yaml +++ b/tests/components/xiaomi_jqjcy01ym/test.esp32.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_jqjcy01ym - mac_address: 7A:80:8E:19:36:BA - temperature: - name: JQJCY01YM Temperature - humidity: - name: JQJCY01YM Humidity - formaldehyde: - name: JQJCY01YM Formaldehyde - battery_level: - name: JQJCY01YM Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd02/common.yaml b/tests/components/xiaomi_lywsd02/common.yaml new file mode 100644 index 000000000..3e40ab8d7 --- /dev/null +++ b/tests/components/xiaomi_lywsd02/common.yaml @@ -0,0 +1,11 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_lywsd02 + mac_address: 3F:5B:7D:82:58:4E + temperature: + name: Xiaomi LYWSD02 Temperature + humidity: + name: Xiaomi LYWSD02 Humidity + battery_level: + name: Xiaomi LYWSD02 Battery Level diff --git a/tests/components/xiaomi_lywsd02/test.esp32-c3-idf.yaml b/tests/components/xiaomi_lywsd02/test.esp32-c3-idf.yaml index 3e40ab8d7..dade44d14 100644 --- a/tests/components/xiaomi_lywsd02/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_lywsd02/test.esp32-c3-idf.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsd02 - mac_address: 3F:5B:7D:82:58:4E - temperature: - name: Xiaomi LYWSD02 Temperature - humidity: - name: Xiaomi LYWSD02 Humidity - battery_level: - name: Xiaomi LYWSD02 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd02/test.esp32-c3.yaml b/tests/components/xiaomi_lywsd02/test.esp32-c3.yaml index 3e40ab8d7..dade44d14 100644 --- a/tests/components/xiaomi_lywsd02/test.esp32-c3.yaml +++ b/tests/components/xiaomi_lywsd02/test.esp32-c3.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsd02 - mac_address: 3F:5B:7D:82:58:4E - temperature: - name: Xiaomi LYWSD02 Temperature - humidity: - name: Xiaomi LYWSD02 Humidity - battery_level: - name: Xiaomi LYWSD02 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd02/test.esp32-idf.yaml b/tests/components/xiaomi_lywsd02/test.esp32-idf.yaml index 3e40ab8d7..dade44d14 100644 --- a/tests/components/xiaomi_lywsd02/test.esp32-idf.yaml +++ b/tests/components/xiaomi_lywsd02/test.esp32-idf.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsd02 - mac_address: 3F:5B:7D:82:58:4E - temperature: - name: Xiaomi LYWSD02 Temperature - humidity: - name: Xiaomi LYWSD02 Humidity - battery_level: - name: Xiaomi LYWSD02 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd02/test.esp32.yaml b/tests/components/xiaomi_lywsd02/test.esp32.yaml index 3e40ab8d7..dade44d14 100644 --- a/tests/components/xiaomi_lywsd02/test.esp32.yaml +++ b/tests/components/xiaomi_lywsd02/test.esp32.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsd02 - mac_address: 3F:5B:7D:82:58:4E - temperature: - name: Xiaomi LYWSD02 Temperature - humidity: - name: Xiaomi LYWSD02 Humidity - battery_level: - name: Xiaomi LYWSD02 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd03mmc/common.yaml b/tests/components/xiaomi_lywsd03mmc/common.yaml new file mode 100644 index 000000000..d10a859c5 --- /dev/null +++ b/tests/components/xiaomi_lywsd03mmc/common.yaml @@ -0,0 +1,12 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_lywsd03mmc + mac_address: A4:C1:38:4E:16:78 + bindkey: e9efaa6873f9f9c87a5e75a5f814801c + temperature: + name: Xiaomi LYWSD03MMC Temperature + humidity: + name: Xiaomi LYWSD03MMC Humidity + battery_level: + name: Xiaomi LYWSD03MMC Battery Level diff --git a/tests/components/xiaomi_lywsd03mmc/test.esp32-c3-idf.yaml b/tests/components/xiaomi_lywsd03mmc/test.esp32-c3-idf.yaml index d10a859c5..dade44d14 100644 --- a/tests/components/xiaomi_lywsd03mmc/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_lywsd03mmc/test.esp32-c3-idf.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsd03mmc - mac_address: A4:C1:38:4E:16:78 - bindkey: e9efaa6873f9f9c87a5e75a5f814801c - temperature: - name: Xiaomi LYWSD03MMC Temperature - humidity: - name: Xiaomi LYWSD03MMC Humidity - battery_level: - name: Xiaomi LYWSD03MMC Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd03mmc/test.esp32-c3.yaml b/tests/components/xiaomi_lywsd03mmc/test.esp32-c3.yaml index d10a859c5..dade44d14 100644 --- a/tests/components/xiaomi_lywsd03mmc/test.esp32-c3.yaml +++ b/tests/components/xiaomi_lywsd03mmc/test.esp32-c3.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsd03mmc - mac_address: A4:C1:38:4E:16:78 - bindkey: e9efaa6873f9f9c87a5e75a5f814801c - temperature: - name: Xiaomi LYWSD03MMC Temperature - humidity: - name: Xiaomi LYWSD03MMC Humidity - battery_level: - name: Xiaomi LYWSD03MMC Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd03mmc/test.esp32-idf.yaml b/tests/components/xiaomi_lywsd03mmc/test.esp32-idf.yaml index d10a859c5..dade44d14 100644 --- a/tests/components/xiaomi_lywsd03mmc/test.esp32-idf.yaml +++ b/tests/components/xiaomi_lywsd03mmc/test.esp32-idf.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsd03mmc - mac_address: A4:C1:38:4E:16:78 - bindkey: e9efaa6873f9f9c87a5e75a5f814801c - temperature: - name: Xiaomi LYWSD03MMC Temperature - humidity: - name: Xiaomi LYWSD03MMC Humidity - battery_level: - name: Xiaomi LYWSD03MMC Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd03mmc/test.esp32.yaml b/tests/components/xiaomi_lywsd03mmc/test.esp32.yaml index d10a859c5..dade44d14 100644 --- a/tests/components/xiaomi_lywsd03mmc/test.esp32.yaml +++ b/tests/components/xiaomi_lywsd03mmc/test.esp32.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsd03mmc - mac_address: A4:C1:38:4E:16:78 - bindkey: e9efaa6873f9f9c87a5e75a5f814801c - temperature: - name: Xiaomi LYWSD03MMC Temperature - humidity: - name: Xiaomi LYWSD03MMC Humidity - battery_level: - name: Xiaomi LYWSD03MMC Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsdcgq/common.yaml b/tests/components/xiaomi_lywsdcgq/common.yaml new file mode 100644 index 000000000..d8422b4c0 --- /dev/null +++ b/tests/components/xiaomi_lywsdcgq/common.yaml @@ -0,0 +1,11 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_lywsdcgq + mac_address: 7A:80:8E:19:36:BA + temperature: + name: Xiaomi LYWSDCGQ Temperature + humidity: + name: Xiaomi LYWSDCGQ Humidity + battery_level: + name: Xiaomi LYWSDCGQ Battery Level diff --git a/tests/components/xiaomi_lywsdcgq/test.esp32-c3-idf.yaml b/tests/components/xiaomi_lywsdcgq/test.esp32-c3-idf.yaml index d8422b4c0..dade44d14 100644 --- a/tests/components/xiaomi_lywsdcgq/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_lywsdcgq/test.esp32-c3-idf.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsdcgq - mac_address: 7A:80:8E:19:36:BA - temperature: - name: Xiaomi LYWSDCGQ Temperature - humidity: - name: Xiaomi LYWSDCGQ Humidity - battery_level: - name: Xiaomi LYWSDCGQ Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsdcgq/test.esp32-c3.yaml b/tests/components/xiaomi_lywsdcgq/test.esp32-c3.yaml index d8422b4c0..dade44d14 100644 --- a/tests/components/xiaomi_lywsdcgq/test.esp32-c3.yaml +++ b/tests/components/xiaomi_lywsdcgq/test.esp32-c3.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsdcgq - mac_address: 7A:80:8E:19:36:BA - temperature: - name: Xiaomi LYWSDCGQ Temperature - humidity: - name: Xiaomi LYWSDCGQ Humidity - battery_level: - name: Xiaomi LYWSDCGQ Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsdcgq/test.esp32-idf.yaml b/tests/components/xiaomi_lywsdcgq/test.esp32-idf.yaml index d8422b4c0..dade44d14 100644 --- a/tests/components/xiaomi_lywsdcgq/test.esp32-idf.yaml +++ b/tests/components/xiaomi_lywsdcgq/test.esp32-idf.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsdcgq - mac_address: 7A:80:8E:19:36:BA - temperature: - name: Xiaomi LYWSDCGQ Temperature - humidity: - name: Xiaomi LYWSDCGQ Humidity - battery_level: - name: Xiaomi LYWSDCGQ Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_lywsdcgq/test.esp32.yaml b/tests/components/xiaomi_lywsdcgq/test.esp32.yaml index d8422b4c0..dade44d14 100644 --- a/tests/components/xiaomi_lywsdcgq/test.esp32.yaml +++ b/tests/components/xiaomi_lywsdcgq/test.esp32.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_lywsdcgq - mac_address: 7A:80:8E:19:36:BA - temperature: - name: Xiaomi LYWSDCGQ Temperature - humidity: - name: Xiaomi LYWSDCGQ Humidity - battery_level: - name: Xiaomi LYWSDCGQ Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc303/common.yaml b/tests/components/xiaomi_mhoc303/common.yaml new file mode 100644 index 000000000..e4353d3c6 --- /dev/null +++ b/tests/components/xiaomi_mhoc303/common.yaml @@ -0,0 +1,11 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_mhoc303 + mac_address: E7:50:59:32:A0:1C + temperature: + name: MHO-C303 Temperature + humidity: + name: MHO-C303 Humidity + battery_level: + name: MHO-C303 Battery Level diff --git a/tests/components/xiaomi_mhoc303/test.esp32-c3-idf.yaml b/tests/components/xiaomi_mhoc303/test.esp32-c3-idf.yaml index e4353d3c6..dade44d14 100644 --- a/tests/components/xiaomi_mhoc303/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_mhoc303/test.esp32-c3-idf.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_mhoc303 - mac_address: E7:50:59:32:A0:1C - temperature: - name: MHO-C303 Temperature - humidity: - name: MHO-C303 Humidity - battery_level: - name: MHO-C303 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc303/test.esp32-c3.yaml b/tests/components/xiaomi_mhoc303/test.esp32-c3.yaml index e4353d3c6..dade44d14 100644 --- a/tests/components/xiaomi_mhoc303/test.esp32-c3.yaml +++ b/tests/components/xiaomi_mhoc303/test.esp32-c3.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_mhoc303 - mac_address: E7:50:59:32:A0:1C - temperature: - name: MHO-C303 Temperature - humidity: - name: MHO-C303 Humidity - battery_level: - name: MHO-C303 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc303/test.esp32-idf.yaml b/tests/components/xiaomi_mhoc303/test.esp32-idf.yaml index e4353d3c6..dade44d14 100644 --- a/tests/components/xiaomi_mhoc303/test.esp32-idf.yaml +++ b/tests/components/xiaomi_mhoc303/test.esp32-idf.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_mhoc303 - mac_address: E7:50:59:32:A0:1C - temperature: - name: MHO-C303 Temperature - humidity: - name: MHO-C303 Humidity - battery_level: - name: MHO-C303 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc303/test.esp32.yaml b/tests/components/xiaomi_mhoc303/test.esp32.yaml index e4353d3c6..dade44d14 100644 --- a/tests/components/xiaomi_mhoc303/test.esp32.yaml +++ b/tests/components/xiaomi_mhoc303/test.esp32.yaml @@ -1,11 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_mhoc303 - mac_address: E7:50:59:32:A0:1C - temperature: - name: MHO-C303 Temperature - humidity: - name: MHO-C303 Humidity - battery_level: - name: MHO-C303 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc401/common.yaml b/tests/components/xiaomi_mhoc401/common.yaml new file mode 100644 index 000000000..ae378f560 --- /dev/null +++ b/tests/components/xiaomi_mhoc401/common.yaml @@ -0,0 +1,12 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_mhoc401 + mac_address: E7:50:59:32:A0:1C + bindkey: "eef418daf699a0c188f3bfd17e4565d9" + temperature: + name: MHO-C303 Temperature + humidity: + name: MHO-C303 Humidity + battery_level: + name: MHO-C303 Battery Level diff --git a/tests/components/xiaomi_mhoc401/test.esp32-c3-idf.yaml b/tests/components/xiaomi_mhoc401/test.esp32-c3-idf.yaml index ae378f560..dade44d14 100644 --- a/tests/components/xiaomi_mhoc401/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_mhoc401/test.esp32-c3-idf.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_mhoc401 - mac_address: E7:50:59:32:A0:1C - bindkey: "eef418daf699a0c188f3bfd17e4565d9" - temperature: - name: MHO-C303 Temperature - humidity: - name: MHO-C303 Humidity - battery_level: - name: MHO-C303 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc401/test.esp32-c3.yaml b/tests/components/xiaomi_mhoc401/test.esp32-c3.yaml index ae378f560..dade44d14 100644 --- a/tests/components/xiaomi_mhoc401/test.esp32-c3.yaml +++ b/tests/components/xiaomi_mhoc401/test.esp32-c3.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_mhoc401 - mac_address: E7:50:59:32:A0:1C - bindkey: "eef418daf699a0c188f3bfd17e4565d9" - temperature: - name: MHO-C303 Temperature - humidity: - name: MHO-C303 Humidity - battery_level: - name: MHO-C303 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc401/test.esp32-idf.yaml b/tests/components/xiaomi_mhoc401/test.esp32-idf.yaml index ae378f560..dade44d14 100644 --- a/tests/components/xiaomi_mhoc401/test.esp32-idf.yaml +++ b/tests/components/xiaomi_mhoc401/test.esp32-idf.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_mhoc401 - mac_address: E7:50:59:32:A0:1C - bindkey: "eef418daf699a0c188f3bfd17e4565d9" - temperature: - name: MHO-C303 Temperature - humidity: - name: MHO-C303 Humidity - battery_level: - name: MHO-C303 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc401/test.esp32.yaml b/tests/components/xiaomi_mhoc401/test.esp32.yaml index ae378f560..dade44d14 100644 --- a/tests/components/xiaomi_mhoc401/test.esp32.yaml +++ b/tests/components/xiaomi_mhoc401/test.esp32.yaml @@ -1,12 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_mhoc401 - mac_address: E7:50:59:32:A0:1C - bindkey: "eef418daf699a0c188f3bfd17e4565d9" - temperature: - name: MHO-C303 Temperature - humidity: - name: MHO-C303 Humidity - battery_level: - name: MHO-C303 Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale copy/common.yaml b/tests/components/xiaomi_miscale copy/common.yaml new file mode 100644 index 000000000..89f32ad19 --- /dev/null +++ b/tests/components/xiaomi_miscale copy/common.yaml @@ -0,0 +1,9 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_miscale + mac_address: '5C:CA:D3:70:D4:A2' + weight: + name: "Xiaomi Mi Scale Weight" + impedance: + name: "Xiaomi Mi Scale Impedance" diff --git a/tests/components/xiaomi_miscale copy/test.esp32-c3-idf.yaml b/tests/components/xiaomi_miscale copy/test.esp32-c3-idf.yaml index 89f32ad19..dade44d14 100644 --- a/tests/components/xiaomi_miscale copy/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_miscale copy/test.esp32-c3-idf.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_miscale - mac_address: '5C:CA:D3:70:D4:A2' - weight: - name: "Xiaomi Mi Scale Weight" - impedance: - name: "Xiaomi Mi Scale Impedance" +<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale copy/test.esp32-c3.yaml b/tests/components/xiaomi_miscale copy/test.esp32-c3.yaml index 89f32ad19..dade44d14 100644 --- a/tests/components/xiaomi_miscale copy/test.esp32-c3.yaml +++ b/tests/components/xiaomi_miscale copy/test.esp32-c3.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_miscale - mac_address: '5C:CA:D3:70:D4:A2' - weight: - name: "Xiaomi Mi Scale Weight" - impedance: - name: "Xiaomi Mi Scale Impedance" +<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale copy/test.esp32-idf.yaml b/tests/components/xiaomi_miscale copy/test.esp32-idf.yaml index 89f32ad19..dade44d14 100644 --- a/tests/components/xiaomi_miscale copy/test.esp32-idf.yaml +++ b/tests/components/xiaomi_miscale copy/test.esp32-idf.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_miscale - mac_address: '5C:CA:D3:70:D4:A2' - weight: - name: "Xiaomi Mi Scale Weight" - impedance: - name: "Xiaomi Mi Scale Impedance" +<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale copy/test.esp32.yaml b/tests/components/xiaomi_miscale copy/test.esp32.yaml index 89f32ad19..dade44d14 100644 --- a/tests/components/xiaomi_miscale copy/test.esp32.yaml +++ b/tests/components/xiaomi_miscale copy/test.esp32.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_miscale - mac_address: '5C:CA:D3:70:D4:A2' - weight: - name: "Xiaomi Mi Scale Weight" - impedance: - name: "Xiaomi Mi Scale Impedance" +<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale/common.yaml b/tests/components/xiaomi_miscale/common.yaml new file mode 100644 index 000000000..89f32ad19 --- /dev/null +++ b/tests/components/xiaomi_miscale/common.yaml @@ -0,0 +1,9 @@ +esp32_ble_tracker: + +sensor: + - platform: xiaomi_miscale + mac_address: '5C:CA:D3:70:D4:A2' + weight: + name: "Xiaomi Mi Scale Weight" + impedance: + name: "Xiaomi Mi Scale Impedance" diff --git a/tests/components/xiaomi_miscale/test.esp32-c3-idf.yaml b/tests/components/xiaomi_miscale/test.esp32-c3-idf.yaml index 89f32ad19..dade44d14 100644 --- a/tests/components/xiaomi_miscale/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_miscale/test.esp32-c3-idf.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_miscale - mac_address: '5C:CA:D3:70:D4:A2' - weight: - name: "Xiaomi Mi Scale Weight" - impedance: - name: "Xiaomi Mi Scale Impedance" +<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale/test.esp32-c3.yaml b/tests/components/xiaomi_miscale/test.esp32-c3.yaml index 89f32ad19..dade44d14 100644 --- a/tests/components/xiaomi_miscale/test.esp32-c3.yaml +++ b/tests/components/xiaomi_miscale/test.esp32-c3.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_miscale - mac_address: '5C:CA:D3:70:D4:A2' - weight: - name: "Xiaomi Mi Scale Weight" - impedance: - name: "Xiaomi Mi Scale Impedance" +<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale/test.esp32-idf.yaml b/tests/components/xiaomi_miscale/test.esp32-idf.yaml index 89f32ad19..dade44d14 100644 --- a/tests/components/xiaomi_miscale/test.esp32-idf.yaml +++ b/tests/components/xiaomi_miscale/test.esp32-idf.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_miscale - mac_address: '5C:CA:D3:70:D4:A2' - weight: - name: "Xiaomi Mi Scale Weight" - impedance: - name: "Xiaomi Mi Scale Impedance" +<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale/test.esp32.yaml b/tests/components/xiaomi_miscale/test.esp32.yaml index 89f32ad19..dade44d14 100644 --- a/tests/components/xiaomi_miscale/test.esp32.yaml +++ b/tests/components/xiaomi_miscale/test.esp32.yaml @@ -1,9 +1 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_miscale - mac_address: '5C:CA:D3:70:D4:A2' - weight: - name: "Xiaomi Mi Scale Weight" - impedance: - name: "Xiaomi Mi Scale Impedance" +<<: !include common.yaml diff --git a/tests/components/xiaomi_mjyd02yla/common.yaml b/tests/components/xiaomi_mjyd02yla/common.yaml new file mode 100644 index 000000000..dffcef84c --- /dev/null +++ b/tests/components/xiaomi_mjyd02yla/common.yaml @@ -0,0 +1,13 @@ +esp32_ble_tracker: + +binary_sensor: + - platform: xiaomi_mjyd02yla + name: MJYD02YL-A Motion + mac_address: 50:EC:50:CD:32:02 + bindkey: 48403ebe2d385db8d0c187f81e62cb64 + idle_time: + name: MJYD02YL-A Idle Time + light: + name: MJYD02YL-A Light Status + battery_level: + name: MJYD02YL-A Battery Level diff --git a/tests/components/xiaomi_mjyd02yla/test.esp32-c3-idf.yaml b/tests/components/xiaomi_mjyd02yla/test.esp32-c3-idf.yaml index dffcef84c..dade44d14 100644 --- a/tests/components/xiaomi_mjyd02yla/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_mjyd02yla/test.esp32-c3-idf.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_mjyd02yla - name: MJYD02YL-A Motion - mac_address: 50:EC:50:CD:32:02 - bindkey: 48403ebe2d385db8d0c187f81e62cb64 - idle_time: - name: MJYD02YL-A Idle Time - light: - name: MJYD02YL-A Light Status - battery_level: - name: MJYD02YL-A Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mjyd02yla/test.esp32-c3.yaml b/tests/components/xiaomi_mjyd02yla/test.esp32-c3.yaml index dffcef84c..dade44d14 100644 --- a/tests/components/xiaomi_mjyd02yla/test.esp32-c3.yaml +++ b/tests/components/xiaomi_mjyd02yla/test.esp32-c3.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_mjyd02yla - name: MJYD02YL-A Motion - mac_address: 50:EC:50:CD:32:02 - bindkey: 48403ebe2d385db8d0c187f81e62cb64 - idle_time: - name: MJYD02YL-A Idle Time - light: - name: MJYD02YL-A Light Status - battery_level: - name: MJYD02YL-A Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mjyd02yla/test.esp32-idf.yaml b/tests/components/xiaomi_mjyd02yla/test.esp32-idf.yaml index dffcef84c..dade44d14 100644 --- a/tests/components/xiaomi_mjyd02yla/test.esp32-idf.yaml +++ b/tests/components/xiaomi_mjyd02yla/test.esp32-idf.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_mjyd02yla - name: MJYD02YL-A Motion - mac_address: 50:EC:50:CD:32:02 - bindkey: 48403ebe2d385db8d0c187f81e62cb64 - idle_time: - name: MJYD02YL-A Idle Time - light: - name: MJYD02YL-A Light Status - battery_level: - name: MJYD02YL-A Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mjyd02yla/test.esp32.yaml b/tests/components/xiaomi_mjyd02yla/test.esp32.yaml index dffcef84c..dade44d14 100644 --- a/tests/components/xiaomi_mjyd02yla/test.esp32.yaml +++ b/tests/components/xiaomi_mjyd02yla/test.esp32.yaml @@ -1,13 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_mjyd02yla - name: MJYD02YL-A Motion - mac_address: 50:EC:50:CD:32:02 - bindkey: 48403ebe2d385db8d0c187f81e62cb64 - idle_time: - name: MJYD02YL-A Idle Time - light: - name: MJYD02YL-A Light Status - battery_level: - name: MJYD02YL-A Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_mue4094rt/common.yaml b/tests/components/xiaomi_mue4094rt/common.yaml new file mode 100644 index 000000000..4f0e5ccba --- /dev/null +++ b/tests/components/xiaomi_mue4094rt/common.yaml @@ -0,0 +1,7 @@ +esp32_ble_tracker: + +binary_sensor: + - platform: xiaomi_mue4094rt + name: MUE4094RT Motion + mac_address: 7A:80:8E:19:36:BA + timeout: 5s diff --git a/tests/components/xiaomi_mue4094rt/test.esp32-c3-idf.yaml b/tests/components/xiaomi_mue4094rt/test.esp32-c3-idf.yaml index 4f0e5ccba..dade44d14 100644 --- a/tests/components/xiaomi_mue4094rt/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_mue4094rt/test.esp32-c3-idf.yaml @@ -1,7 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_mue4094rt - name: MUE4094RT Motion - mac_address: 7A:80:8E:19:36:BA - timeout: 5s +<<: !include common.yaml diff --git a/tests/components/xiaomi_mue4094rt/test.esp32-c3.yaml b/tests/components/xiaomi_mue4094rt/test.esp32-c3.yaml index 4f0e5ccba..dade44d14 100644 --- a/tests/components/xiaomi_mue4094rt/test.esp32-c3.yaml +++ b/tests/components/xiaomi_mue4094rt/test.esp32-c3.yaml @@ -1,7 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_mue4094rt - name: MUE4094RT Motion - mac_address: 7A:80:8E:19:36:BA - timeout: 5s +<<: !include common.yaml diff --git a/tests/components/xiaomi_mue4094rt/test.esp32-idf.yaml b/tests/components/xiaomi_mue4094rt/test.esp32-idf.yaml index 4f0e5ccba..dade44d14 100644 --- a/tests/components/xiaomi_mue4094rt/test.esp32-idf.yaml +++ b/tests/components/xiaomi_mue4094rt/test.esp32-idf.yaml @@ -1,7 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_mue4094rt - name: MUE4094RT Motion - mac_address: 7A:80:8E:19:36:BA - timeout: 5s +<<: !include common.yaml diff --git a/tests/components/xiaomi_mue4094rt/test.esp32.yaml b/tests/components/xiaomi_mue4094rt/test.esp32.yaml index 4f0e5ccba..dade44d14 100644 --- a/tests/components/xiaomi_mue4094rt/test.esp32.yaml +++ b/tests/components/xiaomi_mue4094rt/test.esp32.yaml @@ -1,7 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_mue4094rt - name: MUE4094RT Motion - mac_address: 7A:80:8E:19:36:BA - timeout: 5s +<<: !include common.yaml diff --git a/tests/components/xiaomi_rtcgq02lm/common.yaml b/tests/components/xiaomi_rtcgq02lm/common.yaml new file mode 100644 index 000000000..a2e0c66ba --- /dev/null +++ b/tests/components/xiaomi_rtcgq02lm/common.yaml @@ -0,0 +1,22 @@ +esp32_ble_tracker: + +xiaomi_rtcgq02lm: + - id: motion_rtcgq02lm + mac_address: 01:02:03:04:05:06 + bindkey: "48403ebe2d385db8d0c187f81e62cb64" + +binary_sensor: + - platform: xiaomi_rtcgq02lm + id: motion_rtcgq02lm + motion: + name: Mi Motion Sensor 2 + light: + name: Mi Motion Sensor 2 Light + button: + name: Mi Motion Sensor 2 Button + +sensor: + - platform: xiaomi_rtcgq02lm + id: motion_rtcgq02lm + battery_level: + name: Mi Motion Sensor 2 Battery level diff --git a/tests/components/xiaomi_rtcgq02lm/test.esp32-c3-idf.yaml b/tests/components/xiaomi_rtcgq02lm/test.esp32-c3-idf.yaml index a2e0c66ba..dade44d14 100644 --- a/tests/components/xiaomi_rtcgq02lm/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_rtcgq02lm/test.esp32-c3-idf.yaml @@ -1,22 +1 @@ -esp32_ble_tracker: - -xiaomi_rtcgq02lm: - - id: motion_rtcgq02lm - mac_address: 01:02:03:04:05:06 - bindkey: "48403ebe2d385db8d0c187f81e62cb64" - -binary_sensor: - - platform: xiaomi_rtcgq02lm - id: motion_rtcgq02lm - motion: - name: Mi Motion Sensor 2 - light: - name: Mi Motion Sensor 2 Light - button: - name: Mi Motion Sensor 2 Button - -sensor: - - platform: xiaomi_rtcgq02lm - id: motion_rtcgq02lm - battery_level: - name: Mi Motion Sensor 2 Battery level +<<: !include common.yaml diff --git a/tests/components/xiaomi_rtcgq02lm/test.esp32-c3.yaml b/tests/components/xiaomi_rtcgq02lm/test.esp32-c3.yaml index a2e0c66ba..dade44d14 100644 --- a/tests/components/xiaomi_rtcgq02lm/test.esp32-c3.yaml +++ b/tests/components/xiaomi_rtcgq02lm/test.esp32-c3.yaml @@ -1,22 +1 @@ -esp32_ble_tracker: - -xiaomi_rtcgq02lm: - - id: motion_rtcgq02lm - mac_address: 01:02:03:04:05:06 - bindkey: "48403ebe2d385db8d0c187f81e62cb64" - -binary_sensor: - - platform: xiaomi_rtcgq02lm - id: motion_rtcgq02lm - motion: - name: Mi Motion Sensor 2 - light: - name: Mi Motion Sensor 2 Light - button: - name: Mi Motion Sensor 2 Button - -sensor: - - platform: xiaomi_rtcgq02lm - id: motion_rtcgq02lm - battery_level: - name: Mi Motion Sensor 2 Battery level +<<: !include common.yaml diff --git a/tests/components/xiaomi_rtcgq02lm/test.esp32-idf.yaml b/tests/components/xiaomi_rtcgq02lm/test.esp32-idf.yaml index a2e0c66ba..dade44d14 100644 --- a/tests/components/xiaomi_rtcgq02lm/test.esp32-idf.yaml +++ b/tests/components/xiaomi_rtcgq02lm/test.esp32-idf.yaml @@ -1,22 +1 @@ -esp32_ble_tracker: - -xiaomi_rtcgq02lm: - - id: motion_rtcgq02lm - mac_address: 01:02:03:04:05:06 - bindkey: "48403ebe2d385db8d0c187f81e62cb64" - -binary_sensor: - - platform: xiaomi_rtcgq02lm - id: motion_rtcgq02lm - motion: - name: Mi Motion Sensor 2 - light: - name: Mi Motion Sensor 2 Light - button: - name: Mi Motion Sensor 2 Button - -sensor: - - platform: xiaomi_rtcgq02lm - id: motion_rtcgq02lm - battery_level: - name: Mi Motion Sensor 2 Battery level +<<: !include common.yaml diff --git a/tests/components/xiaomi_rtcgq02lm/test.esp32.yaml b/tests/components/xiaomi_rtcgq02lm/test.esp32.yaml index a2e0c66ba..dade44d14 100644 --- a/tests/components/xiaomi_rtcgq02lm/test.esp32.yaml +++ b/tests/components/xiaomi_rtcgq02lm/test.esp32.yaml @@ -1,22 +1 @@ -esp32_ble_tracker: - -xiaomi_rtcgq02lm: - - id: motion_rtcgq02lm - mac_address: 01:02:03:04:05:06 - bindkey: "48403ebe2d385db8d0c187f81e62cb64" - -binary_sensor: - - platform: xiaomi_rtcgq02lm - id: motion_rtcgq02lm - motion: - name: Mi Motion Sensor 2 - light: - name: Mi Motion Sensor 2 Light - button: - name: Mi Motion Sensor 2 Button - -sensor: - - platform: xiaomi_rtcgq02lm - id: motion_rtcgq02lm - battery_level: - name: Mi Motion Sensor 2 Battery level +<<: !include common.yaml diff --git a/tests/components/xiaomi_wx08zm/common.yaml b/tests/components/xiaomi_wx08zm/common.yaml new file mode 100644 index 000000000..3e83ad3e9 --- /dev/null +++ b/tests/components/xiaomi_wx08zm/common.yaml @@ -0,0 +1,10 @@ +esp32_ble_tracker: + +binary_sensor: + - platform: xiaomi_wx08zm + name: WX08ZM Activation State + mac_address: 74:a3:4a:b5:07:34 + tablet: + name: WX08ZM Tablet Resource + battery_level: + name: WX08ZM Battery Level diff --git a/tests/components/xiaomi_wx08zm/test.esp32-c3-idf.yaml b/tests/components/xiaomi_wx08zm/test.esp32-c3-idf.yaml index 3e83ad3e9..dade44d14 100644 --- a/tests/components/xiaomi_wx08zm/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_wx08zm/test.esp32-c3-idf.yaml @@ -1,10 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_wx08zm - name: WX08ZM Activation State - mac_address: 74:a3:4a:b5:07:34 - tablet: - name: WX08ZM Tablet Resource - battery_level: - name: WX08ZM Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_wx08zm/test.esp32-c3.yaml b/tests/components/xiaomi_wx08zm/test.esp32-c3.yaml index 3e83ad3e9..dade44d14 100644 --- a/tests/components/xiaomi_wx08zm/test.esp32-c3.yaml +++ b/tests/components/xiaomi_wx08zm/test.esp32-c3.yaml @@ -1,10 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_wx08zm - name: WX08ZM Activation State - mac_address: 74:a3:4a:b5:07:34 - tablet: - name: WX08ZM Tablet Resource - battery_level: - name: WX08ZM Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_wx08zm/test.esp32-idf.yaml b/tests/components/xiaomi_wx08zm/test.esp32-idf.yaml index 3e83ad3e9..dade44d14 100644 --- a/tests/components/xiaomi_wx08zm/test.esp32-idf.yaml +++ b/tests/components/xiaomi_wx08zm/test.esp32-idf.yaml @@ -1,10 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_wx08zm - name: WX08ZM Activation State - mac_address: 74:a3:4a:b5:07:34 - tablet: - name: WX08ZM Tablet Resource - battery_level: - name: WX08ZM Battery Level +<<: !include common.yaml diff --git a/tests/components/xiaomi_wx08zm/test.esp32.yaml b/tests/components/xiaomi_wx08zm/test.esp32.yaml index 3e83ad3e9..dade44d14 100644 --- a/tests/components/xiaomi_wx08zm/test.esp32.yaml +++ b/tests/components/xiaomi_wx08zm/test.esp32.yaml @@ -1,10 +1 @@ -esp32_ble_tracker: - -binary_sensor: - - platform: xiaomi_wx08zm - name: WX08ZM Activation State - mac_address: 74:a3:4a:b5:07:34 - tablet: - name: WX08ZM Tablet Resource - battery_level: - name: WX08ZM Battery Level +<<: !include common.yaml