Skip to content

Commit

Permalink
fix(ui): rearrange settings
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Feb 8, 2021
1 parent b9d066b commit 3e7a6ac
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
4 changes: 2 additions & 2 deletions docs/usage/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Properties of a **valueId configuration**:

- **Serial port**: The serial port where your controller is connected
- **Network key** (Optional): Zwave network key if security is enabled. The correct format is like the OZW key but without `0x` `,` and spaces: OZW: `0x5C, 0x14, 0x89, 0x74, 0x67, 0xC4, 0x25, 0x98, 0x51, 0x8A, 0xF1, 0x55, 0xDE, 0x6C, 0xCE, 0xA8` Zwavejs: `5C14897467C42598518AF155DE6CCEA8`
- **WS Server**: Enable [zwave-js websocket server](https://github.com/zwave-js/zwave-js-server)
- **Log enabled**: Enable logging for zwave-js websocket server
- **Log level**: Set the log level (Error, Warn, Info, Verbose, Debug, Silly)
- **Log to file**: Enable this to store the logs to a file
Expand Down Expand Up @@ -190,7 +189,8 @@ Enable this to use Z2M only as a Control Panel

## Home Assistant

- :star:**Hass discovery**:star:: Enable this to automatically create entities on Hass using MQTT auto discovery (more about this [here](/guide/homeassistant))
- **WS Server**: Enable [zwave-js websocket server](https://github.com/zwave-js/zwave-js-server). This can be used by HASS [zwave-js integration](https://www.home-assistant.io/integrations/zwave_js) to automatically create entities
- **MQTT discovery**: Enable this to use MQTT discovery. This is an alternative to Hass Zwave-js integration. (more about this [here](/guide/homeassistant))
- **Discovery Prefix**: The prefix to use to send MQTT discovery messages to HASS
- **Retain Discovery**: Set retain flag to true in discovery messages
- **Entity name template**: Custom Entity name based on placeholders. Default is `%ln_%o`
Expand Down
44 changes: 23 additions & 21 deletions src/components/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,6 @@
@click:append-outer="randomKey"
></v-text-field>
</v-col>
<v-col cols="12" sm="6">
<v-switch
hint="Enable zwave-js websocket server"
persistent-hint
label="WS Server"
v-model="zwave.serverEnabled"
></v-switch>
</v-col>
<v-col v-if="zwave.serverEnabled" cols="12" sm="6">
<v-text-field
v-model.number="zwave.serverPort"
label="Server Port"
:rules="[rules.required]"
required
hint="The port to bind the Zwave Server. Default: 3000"
type="number"
></v-text-field>
</v-col>
<v-col cols="12" sm="6">
<v-switch
hint="Enable zwave-js logging"
Expand Down Expand Up @@ -433,18 +415,38 @@

<v-divider></v-divider>

<v-expansion-panel key="Hass" v-if="!mqtt.disabled">
<v-expansion-panel key="Hass">
<v-expansion-panel-header
>Home Assistant</v-expansion-panel-header
>
<v-expansion-panel-content>
<v-card flat>
<v-card-text>
<v-row>
<v-col cols="12" sm="6">
<v-switch
hint="Enable zwave-js websocket server. This can be used with HASS Zwave-js integration to discover entities"
persistent-hint
label="WS Server"
v-model="zwave.serverEnabled"
></v-switch>
</v-col>
<v-col v-if="zwave.serverEnabled" cols="12" sm="6">
<v-text-field
v-model.number="zwave.serverPort"
label="Server Port"
:rules="[rules.required]"
required
hint="The port to bind the Zwave Server. Default: 3000"
type="number"
></v-text-field>
</v-col>
</v-row>
<v-row v-if="!mqtt.disabled">
<v-col cols="6">
<v-switch
label="Hass Discovery"
hint="BETA: Automatically create devices in Hass using MQTT auto-discovery"
label="MQTT Discovery"
hint="Create devices in Hass using MQTT discovery. This is an alternative to Hass Zwave-js integration"
v-model="gateway.hassDiscovery"
persistent-hint
></v-switch>
Expand Down

0 comments on commit 3e7a6ac

Please sign in to comment.