lsismeiro / awesome-ha-blueprints

A curated collection of automation blueprints for Home Assistant.
https://epmatt.github.io/awesome-ha-blueprints
GNU General Public License v3.0
78 stars 16 forks source link

Light.yaml custom mappings #18

Open botastic opened 3 months ago

botastic commented 3 months ago

Thank you for taking the time to work on a Pull Request. Your contribution is really appreciated! :tada: Please don't delete any part of the template, since keeping the provided structure will help maintainers to review your work more rapidly.

Sections marked as * are required and need to be filled in.

Breaking change

If your PR contains a breaking change for existing users, it is important to describe what breaks, how to make it work again and why we did this. This section will be used to craft the changelog entry, after your PR gets approved and merged.

Note: Remove this section if this PR is NOT a breaking change.

Proposed change*

Hey, I recently wanted to change the mapping for one of my lights. Unfortunately, that currently requires me to change the lights.yaml and adjusting/merging it every time I want to update the blueprint. So I did what any sane person would do and spent hours creating a prototype :D

How it works:

so the file structure for my branch would look something like this: blueprints/automation/botastic/ahb_tmp/

└── blueprints
    └── automation
        └── botastic
            ├── light.yaml
            └── ahb_custom_mappings
                └── ikea_e1524_1.yaml

I did not update the documentation yet, because I wanted to first see if you'd be interested in this feature.

Also the ikea_e1524_1.yaml file is currently listed as a blueprint with an error. So far, I have not been able to fix this. Personally, it doesn't bother me, but it might be irritating to others. This could be fixed by moving the ahb_custom_mappings to a different location, e.g. blueprints/ahb_custom_mappings, and adjusting the include path accordingly (../../ahb_custom_mappings). Not sure whether this would be against any convention.

Cheers

Checklist*

LewisSpring commented 1 week ago

Hi @botastic As per #19, please accept my apologies for the delay.

For this one I am slightly reticent as it increases complexity for the gain of few users. It's a great idea and a clever implementation (your yaml/template skills are better than mine!) but for mainstream users I think the new "Take Control" feature would be better suited this use case where a few mappings need to be switched around.

I am ignoring the scene selection as that is now in #19, I am happy to treat that separately.

Please let me know your thoughts.