# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-04-30 09:12
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('MainAPP', '0005_thermostats'),
    ]

    operations = [
        migrations.CreateModel(
            name='AutomationVarWeeklySchedules',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Label', models.CharField(max_length=100)),
                ('Active', models.BooleanField(default=False)),
                ('LValue', models.DecimalField(decimal_places=2, max_digits=6)),
                ('HValue', models.DecimalField(decimal_places=2, max_digits=6)),
            ],
            options={
                'verbose_name': 'Main device var weekly schedule',
                'verbose_name_plural': 'Main device var weekly schedules',
                'permissions': (('view_AutomationVarWeeklySchedules', 'Can see available automation schedules'), ('activate_AutomationVarWeeklySchedules', 'Can change the state of the schedules')),
            },
        ),
        migrations.CreateModel(
            name='inlineDaily',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Day', models.PositiveSmallIntegerField(choices=[(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')])),
                ('Hour0', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour1', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour2', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour3', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour4', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour5', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour6', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour7', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour8', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour9', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour10', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour11', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour12', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour13', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour14', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour15', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour16', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour17', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour18', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour19', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour20', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour21', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour22', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Hour23', models.PositiveSmallIntegerField(choices=[(0, 'LOW'), (1, 'HIGH')], default=0)),
                ('Weekly', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='MainAPP.AutomationVarWeeklySchedules')),
            ],
            options={
                'verbose_name': 'Main device var hourly schedule',
                'verbose_name_plural': 'Main device var hourly schedules',
            },
        ),
        migrations.AddField(
            model_name='automationvarweeklyschedules',
            name='Days',
            field=models.ManyToManyField(blank=True, to='MainAPP.inlineDaily'),
        ),
        migrations.AddField(
            model_name='automationvarweeklyschedules',
            name='Var',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='MainAPP.AutomationVariables'),
        ),
        migrations.AlterUniqueTogether(
            name='inlinedaily',
            unique_together=set([('Day', 'Weekly')]),
        ),
        migrations.AlterUniqueTogether(
            name='automationvarweeklyschedules',
            unique_together=set([('Label', 'Var')]),
        ),
    ]
