mhemeryck / hausmaus

hausmaus
MIT License
0 stars 0 forks source link

Covers #5

Open mhemeryck opened 1 year ago

mhemeryck commented 1 year ago

Implement a completely stand-alone covers solution for unipi.

mhemeryck commented 9 months ago

Next steps

Based on the discussion, here are the suggested next steps:

Refactor the current code:

Modify the code to use device IDs when passing them around in events instead of references or clones of devices. Ensure that the list of devices is constructed once and passed as an immutable reference to the relevant functions and tasks that need it. Implement local hashmaps within the functions and tasks where necessary for efficient lookups. Design a simple config format for evaluation rules:

Determine the required properties and parameters for each evaluation rule, such as conditions, actions, and device associations. Choose a suitable configuration format, such as YAML, JSON, or TOML, to express the evaluation rules. Define the structure and syntax of the configuration format to represent the evaluation rules in a human-readable and understandable way. Define higher-level models:

Identify the various components and interactions in your home automation system that need to be modeled, such as push buttons, lights, covers, and their behaviors. Define higher-level models for these components, considering their properties, states, and the rules that govern their behavior. Determine the relationships and dependencies between the models and how they interact with each other. These steps will help you refactor and improve your existing codebase, introduce a configuration mechanism for evaluation rules, and define higher-level models for the components in your home automation system. By following these steps, you can create a more organized and maintainable system architecture.