Load trigger from bangle
parent
33dc0c566d
commit
e9ddfb06f3
|
|
@ -17,17 +17,18 @@
|
||||||
<script src="../../core/lib/customize.js"></script>
|
<script src="../../core/lib/customize.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
var stored = localStorage.getItem('ha.trigger.json')
|
||||||
|
console.log(stored);
|
||||||
|
|
||||||
|
|
||||||
// When the 'upload' button is clicked...
|
// When the 'upload' button is clicked...
|
||||||
document.getElementById("upload").addEventListener("click", function() {
|
document.getElementById("upload").addEventListener("click", function() {
|
||||||
// get the text to add
|
// get the text to add
|
||||||
var text = document.getElementById("triggers").value;
|
var triggers = document.getElementById("triggers").value;
|
||||||
console.log(text);
|
|
||||||
// build the app's text using a templated String
|
|
||||||
var app = text;
|
|
||||||
// send finished app (in addition to contents of app.json)
|
// send finished app (in addition to contents of app.json)
|
||||||
sendCustomizedApp({
|
sendCustomizedApp({
|
||||||
storage:[
|
storage:[
|
||||||
{name:"ha.trigger.json", url:"ha.trigger.json", content:app},
|
{name:"ha.trigger.json", url:"ha.trigger.json", content:triggers},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
console.log("Sent ha.trigger.json!");
|
console.log("Sent ha.trigger.json!");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue