Skip to content

[meta] Add integration manifest files #1116

@rytilahti

Description

@rytilahti

Add manifest files describing meta data related to the integration. This is used to dynamically initialize the implementations based on the model information & allow for plugin-based integrations in the future. It can also be used to generate a list of supported devices, so no more need for manual updates to README.md.

This information could be used to populate a registry of supported models during the import of the miio module (or accessed explicitly, or just initialized whenever needed).

Information such as:

  • supported models by the given integration, based on miIO.info model info
  • mdns information (which is currently stored inside the discover)
  • supported features for the model?
  • device-specific configurations, e.g., fan speeds for vacuums and fans

Potential data structure:

name: Rockrobo vacuum
class: <module>.<implementing class> # to initialize the implementation dynamically
supported_devices:
  - model: device.model.1
    name: Gen1 vacuum
    mdns: device-model-1
    supported_features:
      - zone_clean
      - feature2
    device_data:  # allow describing the fan speeds & adding support for new models by simply adjusting the manifest
      fan_speeds:
         - 80
         - 90
  - model: device.model.2
    supported_features:
      - feature2

Open questions:

  • JSON? YAML?
  • Data structure?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions