From 201d0c15c6bf261305b038835b4f403ac189bac5 Mon Sep 17 00:00:00 2001 From: Andreas Madsack Date: Sat, 16 Apr 2016 20:04:20 +0200 Subject: [PATCH] moar fields for PPD42NS firmware ... --- .../migrations/0017_auto_20160416_1803.py | 20 +++++++++++++++++++ feinstaub/sensors/models.py | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 feinstaub/sensors/migrations/0017_auto_20160416_1803.py diff --git a/feinstaub/sensors/migrations/0017_auto_20160416_1803.py b/feinstaub/sensors/migrations/0017_auto_20160416_1803.py new file mode 100644 index 0000000..c711e15 --- /dev/null +++ b/feinstaub/sensors/migrations/0017_auto_20160416_1803.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9 on 2016-04-16 18:03 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('sensors', '0016_auto_20160209_2030'), + ] + + operations = [ + migrations.AlterField( + model_name='sensordatavalue', + name='value_type', + field=models.CharField(choices=[('P1', '1µm particles'), ('P2', '2.5µm particles'), ('durP1', 'duration 1µm'), ('durP2', 'duration 2.5µm'), ('ratioP1', 'ratio 1µm in percent'), ('ratioP2', 'ratio 2.5µm in percent'), ('samples', 'samples'), ('min_micro', 'min_micro'), ('max_micro', 'max_micro'), ('temperature', 'Temperature'), ('humidity', 'Humidity'), ('pressure', 'Pa'), ('altitude', 'meter'), ('pressure_sealevel', 'Pa (sealevel)'), ('brightness', 'Brightness'), ('dust_density', 'Dust density in mg/m3'), ('vo_raw', 'Dust voltage raw'), ('voltage', 'Dust voltage calculated'), ('P10', '1µm particles'), ('P25', '2.5µm particles'), ('durP10', 'duration 1µm'), ('durP25', 'duration 2.5µm'), ('ratioP10', 'ratio 1µm in percent'), ('ratioP25', 'ratio 2.5µm in percent'), ('door_state', 'door state (open/closed)')], db_index=True, max_length=100), + ), + ] diff --git a/feinstaub/sensors/models.py b/feinstaub/sensors/models.py index 2030394..328323a 100644 --- a/feinstaub/sensors/models.py +++ b/feinstaub/sensors/models.py @@ -67,6 +67,9 @@ def __str__(self): ('durP2', 'duration 2.5µm'), ('ratioP1', 'ratio 1µm in percent'), ('ratioP2', 'ratio 2.5µm in percent'), + ('samples', 'samples'), + ('min_micro', 'min_micro'), + ('max_micro', 'max_micro'), # sht10-sht15; dht11, dht22; bmp180 ('temperature', 'Temperature'), # sht10-sht15; dht11, dht22