Home Assistant: support multiendpoint for enum sensor

This commit is contained in:
Koen Kanters 2020-11-01 11:02:35 +01:00
parent 4d3e6eb11f
commit a09bb3bc00

View File

@ -603,7 +603,7 @@ class HomeAssistant extends Extension {
discoveryEntry = { discoveryEntry = {
type: 'sensor', type: 'sensor',
object_id: expose.endpoint ? `sensor_${expose.endpoint}` : expose.name, object_id: expose.property,
discovery_payload: { discovery_payload: {
value_template: `{{ value_json.${expose.property} }}`, value_template: `{{ value_json.${expose.property} }}`,
...lookup[expose.name], ...lookup[expose.name],