Multiple Product names
Opened this issue · 1 comments
Hi there!
Found this script and has been working great! I recently had to purchase a few TRVs from amazon and, even though it was the same seller, the devices I got had different manufacturer info (still same device 🤦♂ )
I changed this line: https://github.com/jmarsik/ad-eurotronic-trv-valvepos/blob/master/apps/eurotronic-trv-valvepos/eurotronic-trv-valvepos.py#L33
to this alternative:
if (v["attributes"]["product_name"] in self.args.get("look_for_productname", ["EUR_SPIRITZ Wall Radiator Thermostat"])):
so that on the app.yaml
file I could just add:
look_for_productname:
- "EUR_SPIRITZ Wall Radiator Thermostat"
- "ZWA021 Thermostatic Valve"
I'd be happy to open a PR (over the weekend) but wanted to check up with you: as in theory it should be backwards compatible when look_for_productname
could be both a string or an array, and both works with the in
operator
Hello,
if it works with old style configuration (just string), then I will of course welcome your contribution. Could you also change the documentation (README)?
Another way would be to simply create 2 instances of the AppDaemon application.