Yun Home Integration
Co-branded service: the pocket AC on your webpage handles the quick corner mount, while YunLeFun Home (Yun Home) handles the full home makeover—same compressor core, now living in a 3D room and able to drive the real air conditioner at home.
The web widget, Vue / React components, and the CuteAC macOS app all run on their own. When you want the AC to share a 3D apartment with fans and TVs—or bind it to a real air conditioner in Home Assistant—that is where Yun Home comes in.
Who Does What
| Web widget / components | CuteAC macOS app | Yun Home device plugin | |
|---|---|---|---|
| Runs in | Any webpage, blog, Vue / React app | macOS menu bar & transparent desktop widget | Yun Home plugin sandbox |
| Artifact | npm packages (widget / vue) | CuteAC.app | .yunplugin bundle |
| State logic | core (TypeScript) | CuteACKit (Swift, mirrors core) | Bundles the core reducer directly |
| 3D look | Optional 3D (React) | SceneKit | cute-ac-3d renderer (RealityKit) |
| Real AC | — | Reuses Yun Home's Home Assistant bindings | Host binds a climate.* entity |
| Best for | Site owners cooling down a page | Anyone who wants a desk AC on their Mac | Building a 3D home with real appliances |
One Core, Three Bridges
1. Shared Core State Machine
Power, cool/heat switching, the 16–31°C range, fan speed, swing, and the three sound modes are all decided by the @yunlefun-home/air-conditioner-core reducer. The web widget, Vue / React components, and the Yun Home plugin run the exact same logic, so every surface feels identical: cooling and heating each remember their last temperature, and the range limits raise the same hints.
2. Device Plugin packages/home-plugin
packages/home-plugin builds the Yun Home device plugin air-conditioner.yunplugin:
| Field | Value | Notes |
|---|---|---|
| Plugin ID | fun.yunle.air-conditioner | How Yun Home identifies this AC |
| Runtime | sandbox | state.js runs inside the host sandbox with no network or file access |
| Category | climate | Listed with the home's climate devices |
| Permission | sensor:thermal | Reads the host's room temperature (official plugins only); the status line reads "Cool · 26°C · Room 28°C" |
| Renderer | cute-ac-3d | Renders in the 3D room with the same model, LCD texture, and airflow layer as CuteAC |
| Controls | controls.json | Power, target-temperature dial, and mode / fan / sound / swing segmented controls, drawn natively by the host |
When the host is bound to a real AC, it passes the device-reported temperature range and step (limits) to the plugin. Core clamps to that range, so the web 16–31°C rule never fights the real hardware.
Build the plugin locally:
pnpm -C packages/home-plugin buildOutput lands in packages/home-plugin/dist/: air-conditioner.yunplugin (a zip) plus its .sha256 checksum. The pack script pins timestamps, so the same source always produces the same checksum. Official builds are attached to the GitHub Release for every v* tag.
3. Swift Package CuteACKit
The root Package.swift ships three products—CuteACCore, CuteACKit, and ReleaseCheck—shared by CuteAC and Yun Home: one 3D model, one seven-segment LCD texture, one airflow animation. Temperatures are stored as Double to support Home Assistant's fractional steps, and the RoomReading JSON shape matches core's TypeScript type, so Yun Home can hand it straight to plugins granted sensor:thermal.
.package(url: "https://github.com/YunYouJun/air-conditioner.git", revision: "<commit>")What You Can Do in Yun Home
- 3D room placement: Mount the cloud AC on the living room, bedroom, or study wall, and furnish the room with fans, TVs, and more.
- Bind a real air conditioner: After binding Home Assistant in Yun Home, the AC maps to a
climate.*entity—power, cool/heat mode, and temperature sync to the real unit, using the device-reported range and fractional steps. - Share bindings with the desktop app: CuteAC on macOS reuses the ACs and rooms saved in Yun Home, so you can switch between real units right from the menu bar. Tokens stay in the Keychain—never copied or exported.
Try a breeze on the web first
Not ready to remodel the whole home? Mount the pocket AC in a page corner on the install demo first, then move it into Yun Home when you are hooked.