Fixed bug from upstream update preventing publishing of location to MQTT
This commit is contained in:
parent
6fb09602d7
commit
f1c167668a
@ -88,9 +88,9 @@ const configureMQTT = async (commands, client, mqttHA) => {
|
||||
.then(data => {
|
||||
// TODO refactor the response handling for commands
|
||||
logger.info('Command completed', { command });
|
||||
data = _.get(data, 'response.data');
|
||||
if (data) {
|
||||
logger.info('Command response data', {data});
|
||||
const responseData = _.get(data, 'response.data');
|
||||
if (responseData) {
|
||||
logger.info('Command response data', { responseData });
|
||||
const location = _.get(data, 'response.data.commandResponse.body.location');
|
||||
if (location) {
|
||||
const topic = mqttHA.getStateTopic({ name: command });
|
||||
|
Loading…
Reference in New Issue
Block a user