From db62d59f67c547af8a33c3597d682243ed213ff4 Mon Sep 17 00:00:00 2001 From: Ranlvor Date: Thu, 29 Apr 2021 20:05:40 +0200 Subject: [PATCH] uwap-home, NAS: revert to LWL based nas-online-check Because the network topology changed and now the nas is on an non-MQTT-switchport --- config/uwap-home/index.js | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/config/uwap-home/index.js b/config/uwap-home/index.js index bba5e95..dffb109 100644 --- a/config/uwap-home/index.js +++ b/config/uwap-home/index.js @@ -323,21 +323,14 @@ const config: Config = { }, nasPower: { state: { - name: "home-rust/switch/office/3", - type: types.option({ - "0": "Link Down", - "6": "1000M", - "5": "100M", - "4": "100M (Half Duplex)", - "3": "10M", - "2": "10M (Half Duplex)" - }) + name: "nas/online", + type: types.string }, command: { name: "home-rust/wake/nas", type: types.string }, - defaultValue: "0" + defaultValue: "OFF" }, ...topicHeating("diningroom"), @@ -845,24 +838,13 @@ const config: Config = { name: "NAS", position: [310, 500], icon: svg(icons.mdiNas).color(({nasPower}) => - ({ - "Link Down": hex("#888888"), - "1000M": hex("#00ff00"), - "10M": hex("#000000") - })[nasPower] || hex("#ff0000")), + (nasPower === "on" ? hex("#00FF00") : hex("#000000"))), ui: [ { type: "toggle", topic: "nasPower", text: "Einschalten", icon: svg(icons.mdiPower), - on: "1000M" - }, - { - type: "text", - text: "Link Speed", - icon: svg(icons.mdiEthernet), - topic: "nasPower" } ] },