Skip to content

Commit

Permalink
update remotes
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Nov 28, 2024
1 parent 075f12c commit 011e87e
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,17 +463,17 @@ class Bmw extends utils.Adapter {
});

const remoteArray = [
{ command: 'door-lock' },
{ command: 'door-unlock' },
{ command: 'door-lock', name: 'Lock Doors (Not updated)' },
{ command: 'door-unlock', name: 'Unlock Doors (Not updated)' },
{ command: 'door', name: 'Door Lock True=Lock, False=Unlock' },
{ command: 'horn-blow' },
{ command: 'light-flash' },
{ command: 'vehicle-finder' },
{ command: 'climate-now_START' },
{ command: 'climate-now_STOP' },
{ command: 'horn-blow', name: 'Horn Blow' },
{ command: 'light-flash', name: 'Light Flash' },
{ command: 'vehicle-finder', name: 'Trigger Vehicle Finder' },
{ command: 'climate-now_START', name: 'Start Climate (Not updated)' },
{ command: 'climate-now_STOP', name: 'Stop Climate (Not updated)' },
{ command: 'climate-now', name: 'Climate True=Start, False=Stop' },
{ command: 'start-charging' },
{ command: 'stop-charging' },
{ command: 'start-charging', name: 'Start Charging (Not updated)' },
{ command: 'stop-charging', name: 'Stop Charging (Not updated)' },
{ command: 'charging', name: 'Charging True=Start, False=Stop' },
{ command: 'force-refresh', name: 'Force Refresh' },
{
Expand Down Expand Up @@ -1070,7 +1070,14 @@ class Bmw extends utils.Adapter {
const vin = id.split('.')[2];
if (resultDict[stateName]) {
let value = true;
if (!state.val || state.val === 'INVALID' || state.val === 'NOT_CHARGING' || state.val === 'ERROR' || state.val === 'UNLOCKED') {
if (
!state.val ||
state.val === 'INVALID' ||
state.val === 'INACTIVE' ||
state.val === 'NOT_CHARGING' ||
state.val === 'ERROR' ||
state.val === 'UNLOCKED'
) {
value = false;
}
await this.setState(vin + '.remotev2.' + resultDict[stateName], value, true);
Expand Down

0 comments on commit 011e87e

Please sign in to comment.