mi sensor
This commit is contained in:
@ -43,7 +43,15 @@ create or replace view temperature_v as
|
||||
cast(values->'Value'->>'value' as float) as temperature,
|
||||
device
|
||||
from measurements
|
||||
where application in ('Temperature Multisensor', 'Temperature Shelly Plus HT');
|
||||
where application in ('Temperature Multisensor', 'Temperature Shelly Plus HT')
|
||||
union
|
||||
select time,
|
||||
cast(values->'Temperature'->>'value' as float) as temperature,
|
||||
device
|
||||
from measurements
|
||||
where application = 'Zigbee2MQTT Hottis Eupenstr.' and
|
||||
attributes->>'DeviceModel' in ('WSDCGQ11LM', 'WSDCGQ01LM');
|
||||
|
||||
|
||||
create or replace view temperature2_v as
|
||||
select time,
|
||||
@ -57,7 +65,14 @@ create or replace view humidity_v as
|
||||
cast(values->'Value'->>'value' as float) as humidity,
|
||||
device
|
||||
from measurements
|
||||
where application in ('Humidity Multisensor');
|
||||
where application in ('Humidity Multisensor')
|
||||
union
|
||||
select time,
|
||||
cast(values->'Humidity'->>'value' as float) as temperature,
|
||||
device
|
||||
from measurements
|
||||
where application = 'Zigbee2MQTT Hottis Eupenstr.' and
|
||||
attributes->>'DeviceModel' in ('WSDCGQ11LM', 'WSDCGQ01LM');
|
||||
|
||||
create or replace view soil_v as
|
||||
select time,
|
||||
|
Reference in New Issue
Block a user