diff --git a/src/nodes/gateway-subdevices/GatewaySubdevice.ts b/src/nodes/gateway-subdevices/GatewaySubdevice.ts index 62fd00a..b8894bf 100644 --- a/src/nodes/gateway-subdevices/GatewaySubdevice.ts +++ b/src/nodes/gateway-subdevices/GatewaySubdevice.ts @@ -9,6 +9,7 @@ export default (RED:Red, type:string) => { constructor(props:NodeProperties) { RED.nodes.createNode( this, props); this.gateway = RED.nodes.getNode(( props).gateway); + this.sid = ( props).sid; ( this).status({fill:"grey", shape:"ring", text:"battery - na"}); @@ -19,7 +20,7 @@ export default (RED:Red, type:string) => { // Input from gateway if (payload.sid) { if (payload.sid == this.sid) { - let batteryLevel = payload.getBatteryPercentage(); + let batteryLevel = payload.batteryLevel; var status:NodeStatus = { fill: "green", shape: "dot", text: "battery - " + batteryLevel + "%"