Check if state is not null. #2450

This commit is contained in:
Koen Kanters
2019-12-07 17:45:00 +01:00
parent e00dbbf4a9
commit 17560ca885
+1 -1
View File
@@ -167,7 +167,7 @@ class EntityPublish extends BaseExtension {
if (topic.type === 'set' && converter && converter.convertSet) {
logger.debug(`Publishing '${topic.type}' '${key}' to '${entity.name}'`);
const result = await converter.convertSet(actualTarget, key, value, meta);
if (result && result.hasOwnProperty('state')) {
if (result && result.state) {
const msg = result.state;
if (postfix) {