Skip to content

Commit

Permalink
Fix regression from previous release
Browse files Browse the repository at this point in the history
  • Loading branch information
BigThunderSR committed Mar 30, 2024
1 parent ceb7a4e commit 772aa4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/mqtt.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class MQTT {

createCommandStatusSensorConfigPayload(command) {
let topic = `${this.prefix}/sensor/${this.instance}/${command}_status_monitor/config`;
let commandStatusTopic = `${this.prefix}/sensor/${this.instance}/${MQTT.convertName(command)}/state`;
let commandStatusTopic = `${this.prefix}/${this.instance}/command/${command}/state`;
let payload = {
"device": {
"identifiers": [this.vehicle.vin + "_Command_Status_Monitor"],
Expand All @@ -168,7 +168,7 @@ class MQTT {

createCommandStatusSensorTimestampConfigPayload(command) {
let topic = `${this.prefix}/sensor/${this.instance}/${command}_status_timestamp/config`;
let commandStatusTopic = `${this.prefix}/sensor/${this.instance}/${MQTT.convertName(command)}/state`;
let commandStatusTopic = `${this.prefix}/${this.instance}/command/${command}/state`;
let payload = {
"device": {
"identifiers": [this.vehicle.vin + "_Command_Status_Monitor"],
Expand Down
4 changes: 2 additions & 2 deletions test/mqtt.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ describe('MQTT', () => {
},
icon: 'mdi:message-alert',
name: 'Command lock Status Monitor',
state_topic: 'homeassistant/sensor/XXX/lock/state',
state_topic: 'homeassistant/XXX/command/lock/state',
unique_id: 'xxx_lock_command_status_monitor',
value_template: '{{ value_json.command.error.message }}',
}
Expand Down Expand Up @@ -683,7 +683,7 @@ describe('MQTT', () => {
device_class: "timestamp",
icon: "mdi:calendar-clock",
name: 'Command lock Status Monitor Timestamp',
state_topic: 'homeassistant/sensor/XXX/lock/state',
state_topic: 'homeassistant/XXX/command/lock/state',
unique_id: 'xxx_lock_command_status_timestamp_monitor',
value_template: '{{ value_json.completionTimestamp }}',
}
Expand Down

0 comments on commit 772aa4c

Please sign in to comment.