Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
deconz: allow setting both entity and field in deconz.configure #17722
Why setting states via
Two examples of why it's necessary to use this:
However, I'm going to submit a separate WIP PR to introduce that feature (fading brightness/temperature) on the
I also considered introducing a new service such as
Related issue (if applicable): N/A
Example entry for
Also don't forget to update services.yaml and component documentation to reflect these changes.
changed the title from
WIP: deconz: allow setting both entity+path
WIP: deconz: allow setting both entity and field in deconz.configure
Oct 23, 2018
Commit amended and comments addressed.
Regarding documentation, I would appreciate suggestions for the wording to be used. I'm not a native English speaker.
Pushed tentative unit tests.
I have to be honest and say I they are completely based on cargo cult. I know exactly what needs to be done in abstract terms, but I'm not a Python developer and I have no previous exposure to (Python) async, mock testing and the HASS codebase (and how much of HASS gets mocked during testing). I do not really know if those tests are actually technically correct (for example, free of race conditions between invoking the service and asserting), or they only happen to pass due to luck. I made them after lots of trial and error, bashing my head against the wall, fighting with
Usually I prefer to have small test methods, so each test would be in its own, but in order to cut down the amount of setup boilerplate I ended up testing all cases within the same method.
To improve these tests beyond the state they're in, I really need to be spoon fed and told exactly what needs to be done and where. I'm afraid we reached the limit of what I can currently do unassisted.