From 862e6d452ce0555eabd2504de8d49a111e0ee93f Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 19 Jun 2025 17:18:26 +1200 Subject: [PATCH] Detect if addon using different method --- puppet/ha-puppet/const.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/puppet/ha-puppet/const.js b/puppet/ha-puppet/const.js index 98042fd..65e6fba 100644 --- a/puppet/ha-puppet/const.js +++ b/puppet/ha-puppet/const.js @@ -10,7 +10,8 @@ if (!optionsFile) { ); process.exit(1); } -export const isAddOn = optionsFile === "/data/options.json"; +// If `homeassistant_api: true` is removed from config.yaml then this detection will stop working +export const isAddOn = process.env.SUPERVISOR_TOKEN !== undefined; const options = JSON.parse(readFileSync(optionsFile)); export const hassUrl = isAddOn