Skip to content

Commit

Permalink
add raw json
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Nov 28, 2024
1 parent af88a91 commit 1be412c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,18 @@ class Bmw extends utils.Adapter {
res.data.state.electricChargingState.remainingChargingMinutes = 0;
}
this.json2iob.parse(vin, res.data, { forceIndex: true, descriptions: this.description });
await this.extendObject(vin + '.state.rawJSON', {
type: 'state',
common: {
name: 'Raw Data as JSON',
type: 'string',
role: 'json',
write: false,
read: true,
},
native: {},
});
this.setState(vin + '.state.rawJSON', JSON.stringify(res.data), true);
})
.catch(async (error) => {
if (error.response && error.response.status === 429) {
Expand Down

0 comments on commit 1be412c

Please sign in to comment.