Skip to content

Commit

Permalink
fix(ui): show warning if manualDiscovery is enabled
Browse files Browse the repository at this point in the history
Fixes #2733
  • Loading branch information
robertsLando committed Oct 24, 2022
1 parent d6c7867 commit bbb16db
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/components/nodes-table/HomeAssistant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
<v-col>
<v-subheader>Home Assistant - Devices</v-subheader>

<v-alert
max-width="1150"
v-if="gateway.manualDiscovery"
text
type="warning"
>
<small
>Manual discovery is enabled, you have to select an entity in
the table and then press on `REDISCOVER` button on the top of
JSON input in order to publish the discovery payload to
MQTT</small
>
</v-alert>

<!-- HASS DEVICES -->
<v-row v-if="hassDevices.length > 0">
<v-col cols="12" md="6" pa-1>
Expand Down Expand Up @@ -169,6 +183,9 @@

<script>
import { inboundEvents as socketActions } from '@/../server/lib/SocketEvents'
import { mapState } from 'pinia'
import useBaseStore from '../../stores/base'
export default {
props: {
node: Object,
Expand All @@ -189,6 +206,7 @@ export default {
}
},
computed: {
...mapState(useBaseStore, ['gateway']),
hassDevices() {
const devices = []
if (this.node && this.node.hassDevices) {
Expand Down

0 comments on commit bbb16db

Please sign in to comment.