forked from openWB/openwb-ui-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathripple_control_receiver.vue
53 lines (52 loc) · 1.29 KB
/
ripple_control_receiver.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<template>
<div class="ripple-control-receiver-dimm-kit">
<openwb-base-alert subtype="info">
Wenn mindestens ein Kontakt offen ist, wird die Ladung gesperrt.
Wenn beide Kontakte geschlossen sind, darf geladen werden.
</openwb-base-alert>
<openwb-base-text-input
title="IP oder Hostname"
subtype="host"
required
:model-value="rippleControlReceiver.configuration.ip_address"
@update:model-value="
updateConfiguration($event, 'configuration.ip_address')
"
/>
<openwb-base-number-input
title="Port"
required
:model-value="rippleControlReceiver.configuration.port"
@update:model-value="
updateConfiguration($event, 'configuration.port')
"
/>
<openwb-base-number-input
title="Modbus-ID"
required
:min="1"
:max="255"
:model-value="rippleControlReceiver.configuration.modbus_id"
@update:model-value="
updateConfiguration($event, 'configuration.modbus_id')
"
/>
</div>
</template>
<script>
export default {
name: "RippleControlReceiverDimmKit",
emits: ["update:configuration"],
props: {
rippleControlReceiver: { type: Object, required: true },
},
data() {
return {};
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>