Skip to content

0.6.0.dev0: introspectable APIs and miot support

Pre-release
Pre-release
Compare
Choose a tag to compare
@rytilahti rytilahti released this 13 Mar 17:17
· 15 commits to master since this release
0665f5b

This is a pre-release for 0.6.0 to make the current state of the library
available via PyPI for testing and development, and is not yet ready for
end users. There are several breaking changes as detailed in the PRs
below, but for most library users, the most visible change being that
the integrations have moved into their own packages under
miio.integrations instead being available under the main package.
Instead of directly importing the wanted implementation class, you can
now use DeviceFactory to construct an instance.

This release is a huge with over 200 pull requests with 364 files
changed, including 13748 insertions and 5114 deletions. It is also the
largest release in terms of device support, as it adds support for all
miot/miotspec devices using the genericmiot integration. This is a big
change in how the library was originally designed, as these devices will
require downloading externally hosted specification files to function.
These files are downloaded automatically when the device is used for the
first time and cached for some time for later invocations.

The major highlights of this release include:

  • Introspectable interfaces for accessing supported features (status(),
    sensors(), settings(), actions()) that will allow downstream users (like
    homeassistant) to support devices without hardcoding details in their
    codebases.
  • Generic support for all locally controllable, modern miot devices
    (using genericmiot integration, miiocli genericmiot).
  • Factory method for creating device instances instead of requiring to
    hardcode them (see DeviceFactory).
  • miio and miot simulators to allow development without having access to
    devices. This was used to create the miot support and might be useful
    for other developers.

There are plenty of more in this release, so huge thanks to everyone who
has contributed to this release and my apologies that it has taken so
long to prepare this. I am hoping that we will get the release blockers
fixed in a timely manner to make these new improvements available for
everyone without having to use the git version.

Help is needed to add the metadata required for the introspectable
interfaces to all existing integrations, see
https://python-miio.readthedocs.io/en/latest/contributing.html#status-containers
and its subsections, if you are looking to contribute. Otherwise, feel
free to test and report any issues, so that we can get those fixed for
the 0.6.0! :-)

Note: the current homeassistant integration requires major refactoring
effort to make use of the new interfaces, so this release will not be
directly useful for most of the users until that work is done. This
release aims to unblock other homeassistant PRs that have been pending
for a long time.

Full Changelog

Breaking changes:

Implemented enhancements:

Fixed bugs:

New devices:

Documentation updates:

Merged pull requests: