forked from openWB/openwb-ui-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevice.vue
More file actions
53 lines (52 loc) · 1.2 KB
/
device.vue
File metadata and controls
53 lines (52 loc) · 1.2 KB
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="device-kostal-sem">
<openwb-base-heading>
Einstellungen für Kostal Smart Energy Meter oder TQ EM 410
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
<openwb-base-text-input
title="IP oder Hostname"
subtype="host"
required
:model-value="configuration.ip_address"
@update:model-value="
updateConfiguration($event, 'configuration.ip_address')
"
/>
<openwb-base-number-input
title="Port"
required
:min="1"
:max="65535"
:model-value="configuration.port"
@update:model-value="
updateConfiguration($event, 'configuration.port')
"
/>
<openwb-base-number-input
title="Modbus ID"
required
:model-value="configuration.modbus_id"
min="1"
max="255"
@update:model-value="
updateConfiguration($event, 'configuration.modbus_id')
"
/>
</div>
</template>
<script>
export default {
name: "DeviceKostalSEM",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
deviceId: { default: undefined },
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>