mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2025-11-18 09:09:03 +00:00
Override 'optimistic' for entities in demo mode
This commit is contained in:
@@ -249,6 +249,15 @@ export function haPublishDevice(parameters: {
|
||||
Object.assign(handlers, result.commandHandlers);
|
||||
}
|
||||
|
||||
if (demoMode) {
|
||||
// Apply optimistic override
|
||||
for (const component of Object.values(components)) {
|
||||
if ((component as any).optimistic === false) {
|
||||
(component as any).optimistic = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const configTopic = `${topicPrefix}/config`;
|
||||
const stateTopic = `${topicPrefix}/state`;
|
||||
const availabilityTopic = `${topicPrefix}/availability`;
|
||||
|
||||
Reference in New Issue
Block a user