niemyjski / homeassistant-kohler

Kohler Integration for Home Assistant
Apache License 2.0
14 stars 3 forks source link

Convert SUPPORT_* Constants to Feature enums and Improved Unique IDs #19

Closed dcmeglio closed 1 year ago

dcmeglio commented 1 year ago

Resolves #15 and #7

niemyjski commented 1 year ago

Thanks a million for contributing. I'll review this and all comments sometime this weekend at my earliest availability.

dcmeglio commented 1 year ago

I made some additional updates here to add unique_id support to the water heater. At the same time I also made the unique_ids actually unique by adding the MAC address to them for other entities. This way we don't have an entity with a unique id of just "shower" which isn't exactly unique.

dcmeglio commented 1 year ago

I have the config flow fully working now. However, because this PR changes everything to actually use real unique ids, this causes an issue where there will be duplicated entities. I don't know any way around that since the IDs generated by the original version were not unique.

Edit: Figured it out. There is a way to update the unique ids so I fixed the duplications. If you're good with this PR. then I'll submit the one to support config flow.

dcmeglio commented 1 year ago

@niemyjski made most of your changes. I don't mind changing the other files but I'm not sure what the recommendation is. This is what vscode did automatically. Happy to change it to match your formatting though