From e9f748d1a9c29fd9fb812d1a79b35e265b7651e0 Mon Sep 17 00:00:00 2001 From: Arem Draft Date: Tue, 3 Dec 2024 06:26:11 +0300 Subject: [PATCH] fix coverage --- lib/extension/homeassistant.ts | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/extension/homeassistant.ts b/lib/extension/homeassistant.ts index 0aef7f9f0e..47975edd8e 100644 --- a/lib/extension/homeassistant.ts +++ b/lib/extension/homeassistant.ts @@ -1131,18 +1131,16 @@ export default class HomeAssistant extends Extension { /** * Otherwise expose as SENSOR entity. */ - if (firstExpose.access & ACCESS_STATE) { - discoveryEntries.push({ - type: 'sensor', - object_id: firstExpose.property, - mockProperties: [{property: firstExpose.property, value: null}], - discovery_payload: { - name: endpoint ? `${firstExpose.label} ${endpoint}` : firstExpose.label, - value_template: valueTemplate, - ...ENUM_DISCOVERY_LOOKUP[firstExpose.name], - }, - }); - } + discoveryEntries.push({ + type: 'sensor', + object_id: firstExpose.property, + mockProperties: [{property: firstExpose.property, value: null}], + discovery_payload: { + name: endpoint ? `${firstExpose.label} ${endpoint}` : firstExpose.label, + value_template: valueTemplate, + ...ENUM_DISCOVERY_LOOKUP[firstExpose.name], + }, + }); break; } case 'text':