Pruebas consumos con integración
This commit is contained in:
		| @@ -8,7 +8,7 @@ sensor: | ||||
| FROM  | ||||
| ((SELECT DATE(created) as ayer, (AVG(CAST ( state AS numeric ))*12*0.082/1000) AS avr_day_0_12,0 as avr_day_12_22,0 as avr_day_22_23, 0 as avr_day_full | ||||
|                 FROM states | ||||
|                 WHERE entity_id = 'sensor.qubino_zmnhtdx_smart_meter_s4_s5_s6_power' | ||||
|                 WHERE entity_id = 'sensor.consumo_general' | ||||
|                 AND state != 'unknown' | ||||
|                 AND state != '' | ||||
|                 AND CAST(state AS numeric) >= 0 | ||||
| @@ -20,7 +20,7 @@ FROM | ||||
| UNION | ||||
| (SELECT DATE(created),0,(AVG(CAST ( state AS numeric ))*10*0.161/1000) AS avr_day_12_22,0,0 | ||||
|                 FROM states | ||||
|                 WHERE entity_id = 'sensor.qubino_zmnhtdx_smart_meter_s4_s5_s6_power' | ||||
|                 WHERE entity_id = 'sensor.consumo_general' | ||||
|                 AND state != 'unknown' | ||||
|                 AND state != '' | ||||
|                 AND CAST(state AS numeric) >= 0 | ||||
| @@ -32,7 +32,7 @@ UNION | ||||
| UNION | ||||
| (SELECT DATE(created),0,0, (AVG(CAST ( state AS numeric ))*2*0.082/1000) AS avr_day_23_00, 0 | ||||
|                 FROM states | ||||
|                 WHERE entity_id = 'sensor.qubino_zmnhtdx_smart_meter_s4_s5_s6_power' | ||||
|                 WHERE entity_id = 'sensor.consumo_general' | ||||
|                 AND state != 'unknown' | ||||
|                 AND state != '' | ||||
|                 AND CAST(state AS numeric) >= 0 | ||||
| @@ -44,7 +44,7 @@ UNION | ||||
| UNION | ||||
| (SELECT DATE(created),0,0,0, (AVG(CAST ( state AS numeric ))*24*0.139/1000) AS avr_day_full | ||||
|                 FROM states | ||||
|                 WHERE entity_id = 'sensor.qubino_zmnhtdx_smart_meter_s4_s5_s6_power' | ||||
|                 WHERE entity_id = 'sensor.consumo_general' | ||||
|                 AND state != 'unknown' | ||||
|                 AND state != '' | ||||
|                 AND CAST(state AS numeric) >= 0 | ||||
| @@ -60,7 +60,7 @@ group by ayer;" | ||||
|       - name: Coste Ayer TSDH | ||||
|         query: "SELECT DATE(created), (AVG(CAST ( state AS numeric ))*24*0.139/1000) AS total | ||||
|                 FROM states | ||||
|                 WHERE entity_id = 'sensor.qubino_zmnhtdx_smart_meter_s4_s5_s6_power' | ||||
|                 WHERE entity_id = 'sensor.consumo_general' | ||||
|                 AND state != 'unknown' | ||||
|                 AND state != '' | ||||
|                 AND CAST(state AS numeric) >= 0 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 dfcarvajal
					dfcarvajal