fix(magnet): change internal model
This commit is contained in:
@@ -41,5 +41,5 @@ exports.default = (RED, type) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RED.nodes.registerType(`${constants_1.Constants.NODES_PREFIX}-${type}`, GatewayDevice);
|
RED.nodes.registerType(`${constants_1.Constants.NODES_PREFIX}-mi.${type}`, GatewayDevice);
|
||||||
};
|
};
|
||||||
|
|||||||
8
dist/nodes/gateway-subdevices/index.html
vendored
8
dist/nodes/gateway-subdevices/index.html
vendored
@@ -253,7 +253,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('mi-devices-magnet', {
|
RED.nodes.registerType('mi-devices-mi.magnet', {
|
||||||
category: 'xiaomi',
|
category: 'xiaomi',
|
||||||
color: '#3FADB5',
|
color: '#3FADB5',
|
||||||
defaults: {
|
defaults: {
|
||||||
@@ -266,7 +266,7 @@
|
|||||||
paletteLabel: "magnet",
|
paletteLabel: "magnet",
|
||||||
icon: "door-icon.png",
|
icon: "door-icon.png",
|
||||||
label: function () {
|
label: function () {
|
||||||
return this.name || "mi-devices magnet";
|
return this.name || "mi-devices mi.magnet";
|
||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
var node = this;
|
var node = this;
|
||||||
@@ -310,7 +310,7 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="mi-devices-magnet">
|
<script type="text/x-red" data-template-name="mi-devices-mi.magnet">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-gateway"><i class="icon-tag"></i> Gateway</label>
|
<label for="node-input-gateway"><i class="icon-tag"></i> Gateway</label>
|
||||||
<input type="text" id="node-input-gateway" placeholder="xiaomi gateway">
|
<input type="text" id="node-input-gateway" placeholder="xiaomi gateway">
|
||||||
@@ -325,7 +325,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="mi-devices-magnet">
|
<script type="text/x-red" data-help-name="mi-devices-mi.magnet">
|
||||||
<p>The Xiaomi contact sensor node</p>
|
<p>The Xiaomi contact sensor node</p>
|
||||||
|
|
||||||
<h3>Inputs</h3>
|
<h3>Inputs</h3>
|
||||||
|
|||||||
@@ -48,6 +48,5 @@ export default (RED:Red, type:string) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
RED.nodes.registerType(`${Constants.NODES_PREFIX}-mi.${type}`, <any> GatewayDevice);
|
||||||
RED.nodes.registerType(`${Constants.NODES_PREFIX}-${type}`, <any> GatewayDevice);
|
|
||||||
};
|
};
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<%# ---------------------------------- Magnet ---------------------------------- %>
|
<%# ---------------------------------- Magnet ---------------------------------- %>
|
||||||
<%- include('./GatewaySubdevice', {
|
<%- include('./GatewaySubdevice', {
|
||||||
type: "magnet",
|
type: "mi.magnet",
|
||||||
label: "magnet",
|
label: "magnet",
|
||||||
icon: "door-icon",
|
icon: "door-icon",
|
||||||
filterType: "mi.magnet",
|
filterType: "mi.magnet",
|
||||||
|
|||||||
Reference in New Issue
Block a user