InventoCasa / ha-advanced-blueprints

Advanced Blueprints combined with pyscript for extra useful automations
139 stars 33 forks source link

Bugfix: Apply the changes for updates #67

Closed Maik7 closed 3 weeks ago

Maik7 commented 1 month ago

If an automation updated its settings, the changes were ignored :-(

Maik7 commented 1 month ago

the fix is not working. If the first instance is "updated", the time trigger will still trigger the old instance, which is not longer identical to the first one. Need to update the instance instead of replacing it with a new one...

Maik7 commented 1 month ago

I've updated the fix. Now it should work as expected

InventoCasa commented 3 weeks ago

@Maik7 Can you explain a bit, what excatly the problem was? Normally if settings in the blueprint-based automation are changed and the automation is manually executed again, it should overwrite the previously existing instance right here in the code: PvExcessControl.instances[self.automation_id] = {'instance': self, 'priority': self.appliance_priority}

Maik7 commented 3 weeks ago

Hi,That line is not reached, if you update the parameters, asself.automation_id not in PvExcessControl.instancesIs not true GrüßeMaik

InventoCasa commented 3 weeks ago

Hi,That line is not reached, if you update the parameters, asself.automation_id not in PvExcessControl.instancesIs not true GrüßeMaik

Ah, you're right. Merging the changes now.