Skip to content

Dyad (A01): typed traits with async updates #1095

Backlog

Description

@infy1995

Goal

Move Dyad devices from query_values to typed traits with async updates, and cover the features of the whole Dyad family.

  • Traits hold typed state, are updated from the device's pushes and notify listeners.
  • Each trait can refresh(), which only publishes the query. The library refreshes on start and when the device comes back; nothing waits for a matching response.
  • Commands are grouped into traits.
  • Capabilities live in roborock/dyad_features.py, in the style of the V1 device_features.py. A command or value is offered only where the Roborock app offers it.
  • Existing methods keep working until consumers have moved.

Tested on a Dyad F25 Ultra (roborock.wdv.a194).

Observed device behaviour (F25 Ultra)

  • Changes are pushed on their own, but nothing arrives on subscribe.
  • About 5 minutes after leaving the dock the device sends {"online": false} (message protocol 500) and stops answering.
  • On waking it sends {"online": true}, but not its state.

Plan

One small PR at a time. Larger steps may be split.

  • Track whether the device is online: feat: track whether V1 and A01 devices are online #1094
  • status trait and refresh()
  • consumables trait
  • Model table and DyadFeatures
  • drying trait
  • self_clean trait
  • cleaning trait
  • Device settings and volume
  • Cleaning history
  • Drying schedule
  • Device information and voice package
  • Remote control
  • Refresh after the MQTT session reconnects
  • get-device-info, contributing steps for A01 models and a review of the A01 documentation
  • Home Assistant uses the traits
  • Deprecate DyadApi.query_values
  • Remove query_values and the request/response matching (needs Zeo on traits too)

Out of scope

Zeo traits (see #897). The shared A01 base should stay usable for them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions