* always set entity_id and not only when field exists

This commit is contained in:
Ingo Fischer
2021-09-03 14:01:38 +02:00
parent 338c36de70
commit 9b64278109
+1
View File
@@ -47,6 +47,7 @@ function startAdapter(options) {
serviceData[field] = state.val; serviceData[field] = state.val;
} }
} }
serviceData.entity_id = hassObjects[id].native.entity_id
adapter.log.debug(`Send to HASS for service ${hassObjects[id].native.attr} with ${hassObjects[id].native.domain || hassObjects[id].native.type} and data ${JSON.stringify(serviceData)}`) adapter.log.debug(`Send to HASS for service ${hassObjects[id].native.attr} with ${hassObjects[id].native.domain || hassObjects[id].native.type} and data ${JSON.stringify(serviceData)}`)
hass.callService(hassObjects[id].native.attr, hassObjects[id].native.domain || hassObjects[id].native.type, serviceData, err => hass.callService(hassObjects[id].native.attr, hassObjects[id].native.domain || hassObjects[id].native.type, serviceData, err =>