This commit is contained in:
Proddy
2023-02-04 14:25:29 +01:00
parent 6dc63907f1
commit 6c46770330
25 changed files with 506 additions and 410 deletions

View File

@@ -942,7 +942,10 @@ rest_server.post(EMSESP_DEVICEENTITIES_ENDPOINT, (req, res) => {
function updateMask(entity, de, dd) {
const current_mask = parseInt(entity.slice(0, 2), 16)
const shortname_with_customname = entity.slice(2)
// strip of any min/max ranges
const shortname_with_customname = entity.slice(2).split('>')[0]
const shortname = shortname_with_customname.split('|')[0]
const new_custom_name = shortname_with_customname.split('|')[1]