Skip to content

Commit

Permalink
Nachrichten
Browse files Browse the repository at this point in the history
  • Loading branch information
Homemade-Disaster committed Apr 2, 2022
1 parent 1b83bbb commit 1da32be
Show file tree
Hide file tree
Showing 3 changed files with 289 additions and 238 deletions.
34 changes: 33 additions & 1 deletion lib/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,39 @@ const _glob = {

//Battery status
'battery_low': 'low',
'battery_medium': 'medium'
'battery_medium': 'medium',

//payload strings
'payload_away_temp': '&away_temp=',
'payload_client_id': '&client_id=',
'payload_client_secret': '&client_secret=',
'payload_date_begin': '&date_begin=',
'payload_date_end': '&date_end=',
'payload_device_id': '&device_id=',
'payload_device_types': '&device_types=',
'payload_endtime': '&endtime=',
'payload_gateway_types': '&gateway_types=',
'payload_hg_temp': '&hg_temp=',
'payload_home_id': '&home_id=',
'payload_limit': '&limit=',
'payload_mode': '&mode=',
'payload_optimize': '&optimize=',
'payload_password': '&password=',
'payload_real_time': '&real_time=',
'payload_refresh_token': '&refresh_token=',
'payload_room_id': '&room_id=',
'payload_scale': '&scale=',
'payload_schedule_id': '&schedule_id=',
'payload_scope': '&scope=',
'payload_temp': '&temp=',
'payload_timetable': '&timetable=',
'payload_type': '&type=',
'payload_username': '&username=',
'payload_zones': '&zones=',

//divers
'blank': ' ',
'dot': '.'
};


Expand Down
11 changes: 11 additions & 0 deletions lib/mytools.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
const words = require('../admin/words');

//split id
function splitID(id) {
const actState = id.substring(id.lastIndexOf('.') + 1);
const actPath = id.substring(0,id.lastIndexOf('.'));
const actParent = actPath.substring(0,actPath.lastIndexOf('.'));
const actFolder = actPath.substring(actPath.lastIndexOf('.') + 1);

return {path: actPath, parent: actParent, state:actState, folder: actFolder};
}

//insert not relevant tags
function netatmoTags(obj_name) {
switch(obj_name) {
Expand Down Expand Up @@ -52,6 +62,7 @@ function tl(word, systemLang) {
}

module.exports = {
splitID,
netatmoTags,
netatmoTagsDetail,
getPrefixPath,
Expand Down
Loading

0 comments on commit 1da32be

Please sign in to comment.