mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
service live configslop
This commit is contained in:
@@ -8,7 +8,7 @@ const { isAdmin, isLockdownAdmin } = require('../roleService');
|
||||
function registerHomeAssistantHooks(deps) {
|
||||
const {
|
||||
logger,
|
||||
haConfig,
|
||||
getHaConfig,
|
||||
isLightControlLocked,
|
||||
setLightsLockedOn,
|
||||
toggleEntity,
|
||||
@@ -110,7 +110,9 @@ function registerHomeAssistantHooks(deps) {
|
||||
}
|
||||
try {
|
||||
if (!entityId) throw new Error('entityId required');
|
||||
await setLightWhite(entityId, haConfig?.whiteKelvin);
|
||||
// Resolve configuration at interaction time because the socket handler
|
||||
// is intentionally registered once and survives service reloads.
|
||||
await setLightWhite(entityId, getHaConfig()?.whiteKelvin);
|
||||
cb({ success: true });
|
||||
} catch (err) {
|
||||
cb({ error: err.message });
|
||||
|
||||
Reference in New Issue
Block a user