Skip to content

Overhaul README - #145

Merged
Leggin merged 1 commit into
mainfrom
overhaul-readme
Oct 12, 2026
Merged

Leggin merged 1 commit into
mainfrom
overhaul-readme

Conversation

@Leggin

@Leggin Leggin commented Oct 12, 2026

Copy link
Copy Markdown
Owner

A rewrite of the README, modelled on what well-regarded projects do (requests, httpx, python-kasa, lpgera/dirigera): a runnable example first, a supported devices table, the same layout for every device section, and collapsible troubleshooting.

Rendered on this branch

What changed

  • Start: a short description and a runnable example right below the badges. The badges now link to their targets and have correct alt text.
  • Getting started: finding the hub (also via its gw2-<id>.local name), generating a token and connecting, without the huge fake token.
  • Supported devices: a table with the getter and the models known to work, plus how to request support for other devices.
  • Finding devices: by name, id or list, a note that the hub doesn't return devices in a stable order, the errors raised, and a complete getter reference in a collapsible table.
  • Working with devices: the common fields, snake_case attribute names, how setters validate, reload() and relation_id.
  • Every device type is documented with attribute tables and examples that include their imports. Water, occupancy and light sensors had no section before.
  • Scenes: examples for a device action, a shortcut button trigger, and a daily time trigger that ends after a duration. Also a note on the camelCase names used when creating scene models.
  • Event listener: a complete example (the old one used an undefined bed_light), the message format and event types, how to stop it, and reconnecting.
  • New sections: raw API access, Troubleshooting (MTU timeouts, tokens, ValidationErrors, unsupported attributes, listener disconnects, certificate) and Related projects.
  • Links: all absolute, so they also work on PyPI.
  • Removed: the outdated Motivation section, whose own text said the feature is now in the IKEA app.
  • pyproject.toml: the classifiers now list Python 3.8–3.14, the versions CI tests, so the Python versions badge is correct.

How it was checked

  • A script parsed all 19 Python examples and checked every method, argument, import, enum value and scene model field against the code.
  • All internal links resolve to headings.
  • Checked on a real hub:
    • The three scene examples were created, read back and deleted.
    • The event message format and event types come from a live listener, which was stopped from another thread.
    • The models in the devices table include what's paired with that hub.

- Lead with a runnable example and clear setup steps
- Add a supported devices table and a complete getter reference
- Document every device type, including the missing water, occupancy
  and light sensor sections, with imports in all examples
- Explain device objects, reload(), relation_id and error behaviour
- Expand scenes (button and timed triggers) and the event listener
- Add troubleshooting, related projects and contributing sections
- Use absolute links so the README also works on PyPI
- Drop the outdated motivation section

Also list the Python versions that CI tests (3.8 to 3.14) in the
package classifiers, which the Python versions badge shows.
@Leggin
Leggin merged commit e906c96 into main Oct 12, 2026
8 checks passed
@Leggin
Leggin deleted the overhaul-readme branch October 12, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant