doudz / zigate

python lib for zigate
MIT License
46 stars 22 forks source link

feat: allow template based on endpoint list (with profile and device id) #120

Closed jBouyoud closed 4 years ago

jBouyoud commented 5 years ago

Hello,

My primary devices has no type so i can't rely on templeting for discovery.

This PR allow templating based on manufactorer_code and list of endpoints with device-idand profile of this endpoints. This doesn't break the current templating on type which is the default, but if not available the library will switch on the following templating style.

As I see those informations seems to be always present (for my devices : Ikea Lights, Profalux BSO, Xiaomi sensors)

doudz commented 5 years ago

Could you also provide a template ?

jBouyoud commented 5 years ago

Yes of course. There it is. Please note that the last template is based on type attribute (not really on link with this PR intent). If you want I can make another PR for that.

doudz commented 5 years ago

Looks good, do you use it on prod ?

jBouyoud commented 5 years ago

Yes. It works as expected. Is there anything left to be done before we can merge this PR?