Skip to content

Multiple Product names #4

@hmagrini

Description

@hmagrini

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions