mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	[CI] Consolidate some tests (M) (#8202)
This commit is contained in:
		
							
								
								
									
										36
									
								
								tests/components/mqtt_subscribe/common-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								tests/components/mqtt_subscribe/common-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| wifi: | ||||
|   ssid: MySSID | ||||
|   password: password1 | ||||
|  | ||||
| mqtt: | ||||
|   broker: test.mosquitto.org | ||||
|   port: 1883 | ||||
|   discovery: true | ||||
|   discovery_prefix: homeassistant | ||||
|   log_topic: | ||||
|   on_message: | ||||
|     topic: testing/sensor/testing_sensor/state | ||||
|     qos: 0 | ||||
|     then: | ||||
|       - logger.log: Mqtt Test | ||||
|  | ||||
| sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Sensor | ||||
|     topic: mqtt/topic | ||||
|     id: the_sensor | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - mqtt.publish_json: | ||||
|           topic: the/topic | ||||
|           payload: |- | ||||
|             root["key"] = id(the_sensor).state; | ||||
|             root["greeting"] = "Hello World"; | ||||
|  | ||||
| text_sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Text | ||||
|     topic: "the/topic" | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - logger.log: "Text sensor got value" | ||||
							
								
								
									
										37
									
								
								tests/components/mqtt_subscribe/common-idf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								tests/components/mqtt_subscribe/common-idf.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,37 @@ | ||||
| wifi: | ||||
|   ssid: MySSID | ||||
|   password: password1 | ||||
|  | ||||
| mqtt: | ||||
|   broker: test.mosquitto.org | ||||
|   port: 1883 | ||||
|   discovery: true | ||||
|   discovery_prefix: homeassistant | ||||
|   idf_send_async: false | ||||
|   log_topic: | ||||
|   on_message: | ||||
|     topic: testing/sensor/testing_sensor/state | ||||
|     qos: 0 | ||||
|     then: | ||||
|       - logger.log: Mqtt Test | ||||
|  | ||||
| sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Sensor | ||||
|     topic: mqtt/topic | ||||
|     id: the_sensor | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - mqtt.publish_json: | ||||
|           topic: the/topic | ||||
|           payload: |- | ||||
|             root["key"] = id(the_sensor).state; | ||||
|             root["greeting"] = "Hello World"; | ||||
|  | ||||
| text_sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Text | ||||
|     topic: "the/topic" | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - logger.log: "Text sensor got value" | ||||
| @@ -1,36 +1 @@ | ||||
| wifi: | ||||
|   ssid: MySSID | ||||
|   password: password1 | ||||
|  | ||||
| mqtt: | ||||
|   broker: test.mosquitto.org | ||||
|   port: 1883 | ||||
|   discovery: true | ||||
|   discovery_prefix: homeassistant | ||||
|   log_topic: | ||||
|   on_message: | ||||
|     topic: testing/sensor/testing_sensor/state | ||||
|     qos: 0 | ||||
|     then: | ||||
|       - logger.log: Mqtt Test | ||||
|  | ||||
| sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Sensor | ||||
|     topic: mqtt/topic | ||||
|     id: the_sensor | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - mqtt.publish_json: | ||||
|           topic: the/topic | ||||
|           payload: |- | ||||
|             root["key"] = id(the_sensor).state; | ||||
|             root["greeting"] = "Hello World"; | ||||
|  | ||||
| text_sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Text | ||||
|     topic: "the/topic" | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - logger.log: "Text sensor got value" | ||||
| <<: !include common-ard.yaml | ||||
|   | ||||
| @@ -1,36 +1 @@ | ||||
| wifi: | ||||
|   ssid: MySSID | ||||
|   password: password1 | ||||
|  | ||||
| mqtt: | ||||
|   broker: test.mosquitto.org | ||||
|   port: 1883 | ||||
|   discovery: true | ||||
|   discovery_prefix: homeassistant | ||||
|   log_topic: | ||||
|   on_message: | ||||
|     topic: testing/sensor/testing_sensor/state | ||||
|     qos: 0 | ||||
|     then: | ||||
|       - logger.log: Mqtt Test | ||||
|  | ||||
| sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Sensor | ||||
|     topic: mqtt/topic | ||||
|     id: the_sensor | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - mqtt.publish_json: | ||||
|           topic: the/topic | ||||
|           payload: |- | ||||
|             root["key"] = id(the_sensor).state; | ||||
|             root["greeting"] = "Hello World"; | ||||
|  | ||||
| text_sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Text | ||||
|     topic: "the/topic" | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - logger.log: "Text sensor got value" | ||||
| <<: !include common-ard.yaml | ||||
|   | ||||
| @@ -1,37 +1 @@ | ||||
| wifi: | ||||
|   ssid: MySSID | ||||
|   password: password1 | ||||
|  | ||||
| mqtt: | ||||
|   broker: test.mosquitto.org | ||||
|   port: 1883 | ||||
|   discovery: true | ||||
|   discovery_prefix: homeassistant | ||||
|   idf_send_async: false | ||||
|   log_topic: | ||||
|   on_message: | ||||
|     topic: testing/sensor/testing_sensor/state | ||||
|     qos: 0 | ||||
|     then: | ||||
|       - logger.log: Mqtt Test | ||||
|  | ||||
| sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Sensor | ||||
|     topic: mqtt/topic | ||||
|     id: the_sensor | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - mqtt.publish_json: | ||||
|           topic: the/topic | ||||
|           payload: |- | ||||
|             root["key"] = id(the_sensor).state; | ||||
|             root["greeting"] = "Hello World"; | ||||
|  | ||||
| text_sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Text | ||||
|     topic: "the/topic" | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - logger.log: "Text sensor got value" | ||||
| <<: !include common-idf.yaml | ||||
|   | ||||
| @@ -1,37 +1 @@ | ||||
| wifi: | ||||
|   ssid: MySSID | ||||
|   password: password1 | ||||
|  | ||||
| mqtt: | ||||
|   broker: test.mosquitto.org | ||||
|   port: 1883 | ||||
|   discovery: true | ||||
|   discovery_prefix: homeassistant | ||||
|   idf_send_async: false | ||||
|   log_topic: | ||||
|   on_message: | ||||
|     topic: testing/sensor/testing_sensor/state | ||||
|     qos: 0 | ||||
|     then: | ||||
|       - logger.log: Mqtt Test | ||||
|  | ||||
| sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Sensor | ||||
|     topic: mqtt/topic | ||||
|     id: the_sensor | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - mqtt.publish_json: | ||||
|           topic: the/topic | ||||
|           payload: |- | ||||
|             root["key"] = id(the_sensor).state; | ||||
|             root["greeting"] = "Hello World"; | ||||
|  | ||||
| text_sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Text | ||||
|     topic: "the/topic" | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - logger.log: "Text sensor got value" | ||||
| <<: !include common-idf.yaml | ||||
|   | ||||
| @@ -1,36 +1 @@ | ||||
| wifi: | ||||
|   ssid: MySSID | ||||
|   password: password1 | ||||
|  | ||||
| mqtt: | ||||
|   broker: test.mosquitto.org | ||||
|   port: 1883 | ||||
|   discovery: true | ||||
|   discovery_prefix: homeassistant | ||||
|   log_topic: | ||||
|   on_message: | ||||
|     topic: testing/sensor/testing_sensor/state | ||||
|     qos: 0 | ||||
|     then: | ||||
|       - logger.log: Mqtt Test | ||||
|  | ||||
| sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Sensor | ||||
|     topic: mqtt/topic | ||||
|     id: the_sensor | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - mqtt.publish_json: | ||||
|           topic: the/topic | ||||
|           payload: |- | ||||
|             root["key"] = id(the_sensor).state; | ||||
|             root["greeting"] = "Hello World"; | ||||
|  | ||||
| text_sensor: | ||||
|   - platform: mqtt_subscribe | ||||
|     name: MQTT Subscribe Text | ||||
|     topic: "the/topic" | ||||
|     qos: 2 | ||||
|     on_value: | ||||
|       - logger.log: "Text sensor got value" | ||||
| <<: !include common-ard.yaml | ||||
|   | ||||
		Reference in New Issue
	
	Block a user