implemented actions get_zone_list and get_pipeline

This commit is contained in:
schrom01
2022-08-23 23:47:43 +02:00
parent 8c861b3cbd
commit 2747b79f37
5 changed files with 109 additions and 61 deletions
+7 -13
View File
@@ -6,19 +6,12 @@
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/switch.css') }}">
<meta charset="UTF-8">
<meta http-equiv="refresh" content="5" >
<script>
function executeAction(command, index, value) {
send_web_request('{{url_for("executeAction")}}/' + command + '/' + index + '/' + value, 'no', 'variable');
}
function executeActionByValueID(command, index, valueID, valueFactor){
var value = document.getElementById(valueID).value * valueFactor;
executeAction(command, index, value);
}
function switchZoneMode(autoMode, zone) {
executeAction('switch_zone_mode' ,zone, (autoMode ? 'automatic' : 'manual'))
}
</script>
<script>
function executeAction(command, index, value) {
send_web_request('{{url_for("executeAction")}}', 'no', 'command=' + command + '&index=' + index + '&value=' + value);
}
</script>
</head>
<body>
<header>
@@ -43,6 +36,7 @@
<img src="{{ url_for('static', filename='img/header/blumenbeet.jpg') }}" alt="" class="header-img">
</header>
<script src="{{ url_for('static', filename='js/action.js') }}"></script>
<script src="{{ url_for('static', filename='js/webhook.js') }}"></script>
</body>
</html>