queries and migrations
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@ -45,6 +45,13 @@ create or replace view temperature_v as
|
||||
from measurements
|
||||
where application in ('Temperature Multisensor', 'Temperature Shelly Plus HT');
|
||||
|
||||
create or replace view temperature2_v as
|
||||
select time,
|
||||
cast(values->'Value'->>'value' as float) as temperature,
|
||||
device
|
||||
from measurements
|
||||
where application = 'Temperature Wago';
|
||||
|
||||
create or replace view humidity_v as
|
||||
select time,
|
||||
cast(values->'Value'->>'value' as float) as humidity,
|
||||
@ -52,3 +59,11 @@ create or replace view humidity_v as
|
||||
from measurements
|
||||
where application in ('Humidity Multisensor');
|
||||
|
||||
create or replace view soil_v as
|
||||
select time,
|
||||
cast(values->'Water'->>'value' as float) as water,
|
||||
cast(values->'Conductance'->>'value' as float) as conductance,
|
||||
cast(values->'Temperature'->>'value' as float) as temperature,
|
||||
device
|
||||
from measurements
|
||||
where application = 'de-hottis-app01' and attributes->>'DeviceType' = 'dragino-lse01';
|
||||
|
Reference in New Issue
Block a user