+
Schlitze
-
diff --git a/src/main/angular/src/app/pages/device-list/device-list.component.ts b/src/main/angular/src/app/pages/device-list/device-list.component.ts
index c605019..3c01a1b 100644
--- a/src/main/angular/src/app/pages/device-list/device-list.component.ts
+++ b/src/main/angular/src/app/pages/device-list/device-list.component.ts
@@ -41,18 +41,18 @@ export class DeviceListComponent implements OnInit {
setSwitchState(d: Device, value: boolean): void {
const device: DeviceSwitch = d as DeviceSwitch;
- if (!device.setState) {
+ if (!device.stateProperty) {
throw new Error("Property 'setState' not set for: " + device);
}
- this.propertyService.set(device.setState, value ? 1 : 0);
+ this.propertyService.set(device.stateProperty, value ? 1 : 0);
}
- setShutterPercent(d: Device, value: number): void {
+ setShutterPosition(d: Device, value: number): void {
const device: DeviceShutter = d as DeviceShutter;
- if (!device.setPercent) {
- throw new Error("Property 'setPercent' not set for: " + device);
+ if (!device.positionProperty) {
+ throw new Error("Property 'setPosition' not set for: " + device);
}
- this.propertyService.set(device.setPercent, value);
+ this.propertyService.set(device.positionProperty, value);
}
create(): void {
@@ -75,16 +75,16 @@ export class DeviceListComponent implements OnInit {
}
getSwitchClassList(device: Device): object {
- const value: boolean | null | undefined = (device as DeviceSwitch).state;
+ const value: number | null | undefined = (device as DeviceSwitch).stateProperty?.value;
return {
- switchOn: value === true,
- switchOff: value === false,
+ switchOn: value === 1,
+ switchOff: value === 0,
switchUnknown: value === null || value === undefined,
};
}
getShutterClassList(device: Device): object {
- const value: number | null | undefined = (device as DeviceShutter).percent;
+ const value: number | null | undefined = (device as DeviceShutter).positionProperty?.value;
return {
shutterOpen: value === 0,
shutterBetween: value !== null && value !== undefined && value > 0 && value < 100,
diff --git a/src/main/angular/src/app/pages/device/device.component.html b/src/main/angular/src/app/pages/device/device.component.html
index 9c202c1..da3f1bf 100644
--- a/src/main/angular/src/app/pages/device/device.component.html
+++ b/src/main/angular/src/app/pages/device/device.component.html
@@ -11,15 +11,9 @@
- | Zustand Lesen |
+ Eigenschaft |
-
- |
-
-
- | Zustand Schreiben |
-
-
+
|
@@ -34,15 +28,9 @@
- | Position Lesen |
+ Eigenschaft |
-
- |
-
-
- | Position Schreiben |
-
-
+
|
diff --git a/src/main/angular/src/app/pages/schedule/schedule.component.html b/src/main/angular/src/app/pages/schedule/schedule.component.html
index 90e7b4f..d3c65eb 100644
--- a/src/main/angular/src/app/pages/schedule/schedule.component.html
+++ b/src/main/angular/src/app/pages/schedule/schedule.component.html
@@ -18,7 +18,7 @@
|