Skip to content

Commit

Permalink
fix id for update
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Dec 17, 2023
1 parent 41cb5f2 commit 7a52da8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class Tedee extends utils.Adapter {

for (const device of res.data) {
const id = device.id.toString().replace(this.FORBIDDEN_CHARS, '_');

const name = device.name;
this.deviceArray.push(device);

Expand Down Expand Up @@ -305,7 +306,8 @@ class Tedee extends utils.Adapter {
.then(async (res) => {
this.log.debug(JSON.stringify(res.data));
for (const device of res.data) {
this.json2iob.parse(device.id, device, { forceIndex: true, states: this.states });
const id = device.id.toString().replace(this.FORBIDDEN_CHARS, '_');
this.json2iob.parse(id, device, { forceIndex: true, states: this.states });
}
})
.catch((error) => {
Expand Down

0 comments on commit 7a52da8

Please sign in to comment.