DemoData for Schedule "Dekoration"

This commit is contained in:
Patrick Haßel 2021-11-04 13:15:55 +01:00
parent a42cb9f915
commit d8ad608afa
2 changed files with 14 additions and 0 deletions

View File

@ -62,6 +62,11 @@
<ng-container *ngIf="entry.type === 'SUNRISE' || entry.type === 'SUNSET'">
<td>
<select [(ngModel)]="entry.zenith" (ngModelChange)="set(entry, 'zenith', entry.zenith)">
<option value="87">
[&nbsp;87°]
<ng-container *ngIf="entry.type === 'SUNRISE'">Nach Sonnenaufgang</ng-container>
<ng-container *ngIf="entry.type === 'SUNSET'">Vor Sonnenuntergang</ng-container>
</option>
<option value="90.8333">
[&nbsp;90°]
<ng-container *ngIf="entry.type === 'SUNRISE'">Sonnenaufgang</ng-container>

View File

@ -67,6 +67,8 @@ public class DemoDataService {
final KnxGroupDto helligkeit = createKnxGroupIfNotExists("Helligkeit", 0, 5, 6, "9.004", PropertyType.LUX, false, true);
final KnxGroupDto szene_haus = createKnxGroupIfNotExists("Szene Haus", 0, 0, 21, "17.004", PropertyType.LUX, false, true);
if (deviceRepository.count() == 0) {
createDeviceSwitch("Ambiente EG", ambiente_eg_status.getProperty(), ambiente_eg_schalten.getProperty());
createDeviceSwitch("Ambiente OG", ambiente_og_status.getProperty(), ambiente_og_schalten.getProperty());
@ -127,6 +129,13 @@ public class DemoDataService {
createTime(scheduleBadLichtMitte, true, 0, 0, 0, MIN30, true);
createTime(scheduleBadLichtMitte, true, 1, 0, 0, MIN30, false);
scheduleRepository.save(scheduleBadLichtMitte);
final Schedule scheduleSzeneHaus = createSchedule(true, "Dekoration", szene_haus.getProperty());
createSunrise(scheduleSzeneHaus, true, Zenith.ASTRONOMICAL, 0, 31);
createTime(scheduleSzeneHaus, true, 8, 30, 0, 0, 30);
createSunset(scheduleSzeneHaus, true, Zenith.OFFICIAL, 0, 31);
createSunset(scheduleSzeneHaus, true, Zenith.ASTRONOMICAL, 0, 30);
scheduleRepository.save(scheduleSzeneHaus);
}
}