* Move tests to device-type specific test files to make improvements more approachable
* protocol: remove the port parameter from query, as there are no other known ports, fix docstrings
* Revise docstrings, remove superfluous information and remove unused methods ({set,get_icon} and set_time)
* cli: indent device output to make it more easily readable when having multiple devices
* remove adjust flake8 ignores (we have no setup.py anymore)
* pyproject: include cli tool to coverage, add config for interrogate (docstring coverage)
* bulb: raise exception on color_temp error cases instead of returning zero values
* improve bulb tests, simplify conftest
* strip: rename plugs property to children and move it to smartdevice
* Optimize I/O access
A single update() will now fetch information from all interesting modules,
including the current device state and the emeter information.
In practice, this will allow dropping the number of I/O reqs per homeassistant update cycle to 1,
which is paramount at least for bulbs which are very picky about sequential accesses.
This can be further extend to other modules/methods, if needed.
Currently fetched data:
* sysinfo
* realtime, today's and this months emeter stats
New properties:
* emeter_realtime: return the most recent emeter information, update()-version of get_emeter_realtime()
* emeter_today: returning today's energy consumption
* emeter_this_month: same for this month
Other changes:
* Accessing @requires_update properties will cause SmartDeviceException if the device has not ever been update()d
* Fix __repr__ for devices that haven't been updated
* Smartbulb uses now the state data from get_sysinfo instead of separately querying the bulb service
* SmartStrip's state_information no longer lists onsince for separate plugs
* The above mentioned properties are now printed out by cli
* Simplify is_on handling for bulbs
* remove implicit updates, return device responses for actions, update README.md instructions. fixes#61
* Convert to use poetry and pyproject.toml, update README
* add some resources for contributors
* minor adjustments
* ci: separate tests from linting, run using poetry
* add pytest-mock to dev requirements
* combine running tests and reporting to codecov
* generate both xml and html coverage reports
* add codecov to dev dependencies
* async++, small powerstrip improvements
* use asyncclick instead of click, allows defining the commands with async def to avoid manual eventloop/asyncio.run handling
* improve powerstrip support:
* new powerstrip api: turn_{on,off}_by_{name,index} methods
* cli: fix on/off for powerstrip using the new apis
* add missing update()s for cli's hsv, led, temperature (fixes#43)
* prettyprint the received payloads when debug mode in use
* cli: debug mode can be activated now with '-d'
* update requirements_test.txt
* remove outdated click-datetime, replace click with asyncclick
* debug is a flag
* make smartstripplug to inherit the sysinfo from its parent, allows for simple access of general plug properties
* proper bound checking for index accesses, allow controlling the plug at index 0
* remove the mess of turn_{on,off}_by_{name,index}, get_plug_by_{name,index} are enough.
* adapt cli to use that
* allow changing the alias per index
* use f-strings consistently everywhere in the cli
* add tests for get_plug_by_{index,name}
* Add commands to control the wifi settings
Enables initial provisioning and changing the wifi network later on without the official app
* new api to smartdevice: wifi_scan() and wifi_join(ssid, password, keytype)
* cli: new subcommand 'wifi' with two commands: scan and join
* update readme to initial setup
* improvements based on code review, f-strings++
* Enable Windows & OSX builds
* Add pypy for ubuntu
* Fix isort
* Disable PyPy
typed-ast building fails due to a missing header
ast27/Parser/tokenizer.c:17:10: fatal error: codecs.h: No such file or directory
* All child device handling is moved out from the main smartdevice class, which simplifies the code.
* This will also cleanup the constructors as only the subdevices require the ID and the parent reference.
* SmartStripPlug offers SmartPlug like interface, but does not allow separate updates
* Trying to update() on the children will cause a warning.
* do not update inside __repr__
* Convert discovery to asyncio
* Use asyncio.DatagramProtocol
* Cleanup parameters, no more positional arguments
Closes#7
* Remove sync interface
* This requires #13 to be merged. Closes#12.
* Converts cli to use asyncio.run() where needed.
* The children from smartstrips is being initialized during the first update call.
* Convert on and off commands to use asyncio.run
* conftest: do the initial update automatically for the device, cleans up tests a bit
* return subdevices alias for strip plugs, remove sync from docstrings
* Make tests pass using pytest-asyncio
* Simplify tests and use pytest-asyncio.
* Removed the emeter tests for child devices, as this information do not seem to exist (based on the dummy sysinfo data). Can be added again if needed.
* Remove sync from docstrings.
* Fix incorrect type hint
* Add type hints and some docstrings to discovery