mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2025-09-13 07:37:09 +00:00
Override 'optimistic' for entities in demo mode
This commit is contained in:
parent
d9eca294e3
commit
cf6914ed49
@ -1,6 +1,6 @@
|
||||
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
||||
name: Futurehome
|
||||
version: "0.0.35"
|
||||
version: "0.0.36"
|
||||
slug: futurehome
|
||||
description: Local Futurehome Smarthub integration
|
||||
url: "https://github.com/adrianjagielak/home-assistant-futurehome"
|
||||
|
@ -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`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user