# Smart home

> Your home from the keyboard: Home Assistant, Google Home, SmartThings, a Philips Hue bridge, openHAB, Smart Life (Tuya) or SwitchBot as rooms of live tiles for lights, blinds, thermostats, media, locks and sensors, with a typed command bar for Home Assistant's Assist.

URL: https://wmkeyboard.pages.dev/tools/home-assistant/
Section: Tools

The **Smart home** tool puts your house inside the keyboard. It connects to the homes you list, shows every room as a tab of tiles, and keeps them live: when somebody flips a wall switch, the tile rings and changes while you watch. A tap switches a light, runs a scene or types a sensor's reading into your message. A hold opens the thing's own card, with a brightness slider, a thermostat dial, blinds buttons, the media transport, or a lock that takes a hold to open. With a Home Assistant on the list, a bar under the tiles takes a sentence for Assist, so `turn off the kitchen lights` typed with the keyboard does exactly that.

Seven kinds of home can be on the list, and more than one at once: [Home Assistant](#home-assistant), [Google Home](#google-home), [SmartThings](#smartthings), a [Philips Hue bridge](#philips-hue-bridge), [openHAB](#openhab), [Smart Life and Tuya](#smart-life-and-tuya) and [SwitchBot](#switchbot). Each is a row of the tool's [provider list](https://wmkeyboard.pages.dev/tools/providers/): add it once, sign in or pair, and its rooms join the panel. The panel talks only to the homes you listed; nothing about your home passes through any other service.

Open **Smart home** from the toolbox, or type `hass`, `smarthome`, `googlehome`, `smartthings`, `hue`, `openhab`, `tuya`, `smartlife` or `switchbot` on its own and tap the chip.

## Adding a home

The tool's page is at Tools / Smart home. **Homes** is the list: **Add a provider** opens the kinds this build can use, and each kind's setup sheet asks for what it needs. A home that is set up but not yet signed in, paired or granted says so in red in the list; **Edit** opens the sheet again. Drag rows to change the order the rooms appear in, switch a home off to keep its setup without connecting, or remove it, which forgets its key with it.

### Home Assistant

Needs the server's address and a sign-in.

**The address.** Type it the way you reach it at home: `homeassistant.local:8123`, `192.168.1.5`, or whatever your browser shows. The sheet also lists any Home Assistant that announces itself on your Wi-Fi; tap one to fill the address in. A remote address is optional: a Nabu Casa or reverse-proxy `https://` address that works from anywhere. With both set, the keyboard tries the home address first and falls back to the remote one when the home one does not answer.

**Signing in**, two ways:

- **Sign in** opens your browser on your own server's login page. You sign in there, with your password and whatever second factor you use, and Home Assistant hands the keyboard a key. The keyboard never sees your password, and the key renews itself. Home Assistant checks `wmkeyboard.pages.dev/ha/` once during this, because that page is the keyboard's name as a sign-in client; your server, account and key never go there.
- **Use token.** In Home Assistant, open your profile, the **Security** tab, and create a **long-lived access token**. Paste it into the sheet. This is the way in when the browser cannot reach your server, or when you prefer a key you can revoke from Home Assistant yourself.

**Test connection** asks the server its name and version with the key you have, so a wrong address or a pasted token with a character missing shows up here rather than in the panel. **Sign out** revokes the browser key on the server and keeps only the addresses.

Home Assistant is the one kind with an assistant, so the [Assist bar](#assist) and the **Ask home** chip appear only while a Home Assistant is on the list. Every kind of entity is shown: lights, switches, fans, covers, valves, climate, humidifiers, water heaters, media players, locks, alarm panels, vacuums, sirens, numbers, selects, text, buttons, scenes, scripts, automations, cameras, sensors, weather and people.

### Google Home

The devices of one Google Home, through Google's own Home APIs on the phone. Needs Google Play services and the Google Home app, so it is offered only in the edition from Google Play, and only on a phone that has them.

The Home APIs are a separate part of the keyboard, which Play downloads the first time you tap **Choose a home**. When the download finishes, the screen reopens, and you tap **Choose a home** again.

**Choose a home** opens Google's own screen: you pick the account and the home, and which kinds of device the keyboard may see. Locks, cameras and doorbells are granted one by one. One home at a time; **Change home** runs the screen again. To take the access back on Google's side, remove WM Keyboard under your Google account's third-party apps, or in the Google Home app's linked apps.

What arrives are Matter and Google device types: lights (on/off, brightness, colour temperature, colour), plugs and switches, thermostats, air conditioners, heat pumps and air purifiers, locks, blinds and shutters, fans (by the steps a fan has, so one with five speeds moves in 20 % steps, and its named speeds as presets), speakers and players, and contact, occupancy, temperature, humidity and light sensors. The keyboard reads and controls them through Google's service, which keeps its own connection; away from home, Google needs a hub in the house to reach the devices.

While Google's developer console stays closed to registration, Google caps an app's Home APIs access at a hundred test users and shows an unverified-app warning during consent. That is Google's limit on every app at this stage, not a setting.

### SmartThings

Your SmartThings devices, rooms and scenes, through Samsung's cloud. Add one row per account, so a second account (a parent's house, an office) sits beside the first with a nickname of its own. Two ways in:

- **Sign in** opens Samsung's login in your browser, and SmartThings hands the keyboard a key that renews itself. The browser comes back through `wmkeyboard.pages.dev/st/`, which only forwards the sign-in result to the app. Offered when the build carries a SmartThings sign-in client.
- **Use token.** A personal access token from `account.smartthings.com/tokens`, with the devices, locations and scenes scopes. SmartThings expires these after a day, so this is for trying things out.

SmartThings has no event stream for an app like this one, so the panel asks for the device list every ten seconds while it is open; the dot by the home's name stays amber for that. A tap still acts at once. What arrives: lights with level and colour, switches and plugs, fans, shades and doors, locks, valves, thermostats (heating and cooling setpoints, modes, fan modes), media players, and contact, motion, water, presence, smoke, temperature, humidity, battery, light, power and energy readings. Scenes run from their tiles.

### Philips Hue bridge

A Hue bridge on your Wi-Fi, directly, with nothing leaving the house. The sheet finds the bridge on the network (or you type its address), then: press the round button on the bridge and tap **Pair** within thirty seconds. The bridge mints a key of its own for the keyboard, and the bridge's certificate is pinned with it: a different device answering at that address later is refused.

What arrives, live over the bridge's event stream: every light with brightness, colour temperature, colour and effects; one group light per room; scenes, which run from their tiles; and the motion, contact, temperature, light level and battery readings of Hue sensors. Rooms come from the bridge.

### openHAB

Your openHAB server, at its address, with an API token from your profile (the user menu, **Create new API token**). Leave the token blank when your server lets devices on your network in without one.

Items map by type and semantic tag: Switch, Dimmer and Color items are lights or switches (a `Lock` tag makes a lock), Rollershutter is a cover, Contact a contact sensor, Number a sensor or, with a `Setpoint` tag, a slider, String a selection or a text, Player a media player. Rooms and floors come from the semantic model: groups tagged as locations. States arrive live over the server's event stream.

### Smart Life and Tuya

Devices in the Smart Life or Tuya Smart app, through Tuya's cloud. Tuya lets another app in only through a developer project of your own, so this takes a one-time setup on Tuya's site, free of charge:

1. Sign up at `platform.tuya.com` and create a cloud project. Pick **Smart Home** as the industry and development method, and the data centre that serves the country your app account was registered in; Tuya's own data centre table lists them.
2. In the project, open **Devices**, then **Link App Account**, and add your account: the page shows a QR code that you scan from the Smart Life or Tuya Smart app (**Me** tab, the scan icon). Your devices appear in the project.
3. Make sure the project's **Service API** list has **IoT Core** and **Smart Home Scene Linkage**; the first is added for you, the second gives the scenes.
4. Copy the **Access ID** and **Access Secret** from the project's **Overview** into the keyboard's setup sheet, and pick the same data centre there.

The Access Secret stays on the phone: it signs each request and is never sent. Tuya's free trial of the cloud services has to be extended on its site from time to time; when it lapses, the home shows as refused until you extend it. One row per project, so two app accounts can sit side by side.

Tuya has no push channel a phone can hold, so the panel asks for the device list every 30 seconds while it is open, and the dot stays amber. What arrives: lights with brightness, colour temperature and colour; plugs, power strips (one switch per socket) and wall switches; fans; curtains and garage door openers; thermostats, heaters and air conditioners; and temperature, humidity, battery, power, voltage, energy, CO2, PM2.5, door, motion, presence, leak, smoke and gas readings. Rooms and tap-to-run scenes come from the app's homes. Locks and cameras are left out: Tuya's cloud opens a lock only through a separate password flow.

### SwitchBot

Your SwitchBot devices through SwitchBot's cloud, with the token and secret key from the SwitchBot app: **Profile**, **Preferences**, **About**, then tap **App Version** ten times; **Developer Options** appears, and **Get Token** shows both. Paste them into the setup sheet. The secret key stays on the phone and only signs requests. Bluetooth devices answer through a hub, and only once **Cloud Services** is on in each device's settings.

SwitchBot allows 10,000 requests a day per account, and a device's state is one request, so the panel asks each device that reports anything once a minute while it is open; a tap acts at once and checks the device two seconds later. What arrives: bulbs, strips and ceiling lights; plugs, relays (two switches for a 2PM) and Bots; Curtain, Roller Shade and Blind Tilt, with position; the garage door opener; locks, with the door sensor where there is one; circulator fans and air purifiers; the radiator thermostat; and meter, CO2, motion, contact, presence and leak readings. The infrared remotes a hub has learnt are switches that remember what the keyboard last sent them, since a remote cannot report. Manual scenes run from their tiles. SwitchBot has no rooms, so its things sit under **Elsewhere**.

## The panel

Along the top: the tabs, then search and settings. Under the tiles, in small type, the home's name with a dot beside it. The dot breathes while the keyboard connects, turns green when the live stream is up, amber when only a polled or plain web API answers, and red when a home cannot be reached or its key was refused. With several homes, the names join and the dot shows the best of them.

**Tabs.** **Favourites** first, then one tab per room of each home in the list's order, then **Elsewhere** for things with no room, then **All**. With more than one home, a room tab carries the home's name first. Swipe across the tiles to change tab. The panel opens on Favourites, or on the tab you used last if you prefer.

**Tiles.** Each tile is the thing's icon in a soft circle, its name, its state, and the one control its kind has. The circle fills with the theme's accent as the thing comes on, and for a light, as bright as the light is. Tiles arrive with a short stagger when a tab opens.

| Kind | On the tile | A tap |
|---|---|---|
| Light, switch, fan, input boolean, automation | A switch | Toggles |
| Scene, script, button | A play arrow | Runs or presses it; the tile flashes |
| Cover, valve, climate, media player, lock, alarm, vacuum, humidifier, water heater, number, select, text, camera | A chevron | Opens the card |
| Sensor, binary sensor, weather, person | The reading, large | Types it into your text |

A tap acts straight away: the tile shows the new state and the home's next event confirms it. If the home disagrees, or refuses, the tile shakes and shows the truth. Hold any tile to open its card.

**The card** grows out of the middle of the panel over the dimmed tiles. At the top are the name, the room and the live state; at the bottom, **Insert**, **Hide** and **Open in its app**, plus a star to make it a favourite. In between, the controls for its kind:

- **Light**: the switch, a brightness slider, a warmth slider from candle to daylight, a hue strip and a row of colours, and the light's effects. Dragging a slider ticks every five per cent and sends as you go.
- **Fan**: speed, oscillation, direction, presets.
- **Cover, valve**: open, stop and close, a position slider, a tilt slider. A garage door, a gate or a door takes a hold instead of a tap.
- **Climate**: a dial that fills to the target in orange while heating and blue while cooling, the current temperature as a dot on it, minus and plus by the step your thermostat uses, then the modes, presets and fan modes.
- **Media player**: what is playing, previous, play or pause, next, the volume with mute, and the sources.
- **Lock**: Unlock and Lock, each a hold; Open where the lock has a latch.
- **Alarm panel**: Disarm, and the arm modes your panel offers, each a hold. A panel that wants a code asks for one; the keys type it.
- **Vacuum**: start or pause, stop, dock, find, and suction levels, with the battery in the state line.
- **Humidifier, water heater**: the target slider and the modes.
- **Number, select, text**: a slider, a row of options, or the text with an Edit that hands the keys over.
- **Camera**: a still from the camera, **Refresh**, and **Send picture**, which puts the picture into the chat the way the Gallery does. Home Assistant only.
- **Sensors**: the reading large with its unit and when it last changed, and three chips for how to type it: the value, the value with its unit, or the name and the value. Hold a chip to make it the default for every sensor tile's tap.

A kind a home does not have never shows; a control a home cannot do (a colour on a Hue scene, say) is left off the card.

**Search** filters every tab by name, entity id or room as you type; Enter opens the first match. **Hide** takes a tile out of every tab; the Favourites and rooms screen brings it back.

### Risky things

Locks, alarm panels, garage doors, gates, sirens and valves are never one tap. Their buttons fill a ring while your finger stays down and act when it is full, about a second; lifting early does nothing. **Hold to confirm risky actions** on the tool's page turns this off.

### Assist

With a Home Assistant on the list, the bar at the bottom reads **Ask your home…**. Tap it and the keys type into it, glide and voice included. Enter sends the sentence to Home Assistant's Assist, the same one that answers in its own app: `turn on the hall light`, `set the bedroom to 20 degrees`, `is the garage closed`. The reply slides up over the bar. Things it changed ring their tiles; things it could not find shake. **Insert reply** types what it said into your message. A follow-up question stays in the same conversation until you close the panel.

Assist speaks the language you are typing in, when **Send the keyboard's language** is on, and you can pick which of your conversation agents answers. The first Home Assistant on the list is the one asked.

### Favourites and rooms

Tools / Smart home / Favourites and rooms lists everything every home has, by home and room. Star what the Favourites tab should show, drag the favourites into order, hide single things, and switch off whole kinds (every `automation`, say) you never want to see from the keyboard. Entities a home marks as diagnostic or configuration, and ones it hides itself, never show.

## Elsewhere in the keyboard

- **A chip while you type.** With a Home Assistant connected, a sentence that reads like a command for the house (`turn off the lights`, `dim the bedroom to 30%`, `lock the front door`, `open the blinds`) gets a strip chip, **Ask home**. Tapping it opens the panel and sends the sentence to Assist instead of leaving it in your message. **Suggest commands as you type** on the tool's page switches it off; it is part of the [smart chips](https://wmkeyboard.pages.dev/smart/chips/).
- **The AI chat's tools.** The [AI chat](https://wmkeyboard.pages.dev/tools/ai/) gets two tools: **Control your home**, which works a device on any home on the list (Google Home, SmartThings and the rest included) or sends one plain sentence to Home Assistant's Assist, and **Read your home**, which lists what is on across every home on the list, or whatever matches a name. Both ask before they run, like every tool that touches your things. A fan with a few fixed speeds reads as `speed 2 of 5`, so asking for speed 1 sets the first speed rather than one percent. They are listed only while a home is set up.
- **Snippet variables.** `{ha:sensor.outside_temperature}` expands to the entity's state with its unit, and `{ha:light.kitchen:brightness}` to one attribute; see [snippets](https://wmkeyboard.pages.dev/tools/snippets/). The entity is looked for in every home; `{ha:home_key|entity_id}` names one. They read what the keyboard last saw and ask the homes for a fresh state when they are connected.

## Options

Tools / Smart home

Smart home is the **Smart home** bundle on [Extensions](https://wmkeyboard.pages.dev/reference/settings/extensions/). Off there, the tool, its panel and the devices screen leave the keyboard and the app; your connection and devices stay until you switch it back on.

| Setting | What it does | Default |
|---|---|---|
| **Smart home tool** | The switch; adding a home turns it on | Off |
| **Homes** | The provider list: each home's kind, address and sign-in, in the order their rooms appear | Empty |
| **Favourites and rooms** | The Favourites tab's tiles, hidden things, kinds to leave out | |
| **Open on** | **Favourites** or **Last tab** | Favourites |
| **A tab per room** | Each home's rooms as tabs; off, just Favourites and All | On |
| **Tile size** | **Comfortable** (two across) or **Compact** (four) | Comfortable |
| **Hold to confirm risky actions** | Locks, alarms, garage doors, gates, sirens and valves take a hold | On |
| **What a sensor tile types** | **Value**, **Value and unit** or **Name and value** | Value and unit |
| **Command bar** | The Assist bar under the tiles (with a Home Assistant listed) | On |
| **Conversation agent** | Which of your Home Assistant's assistants answers | Home Assistant's default |
| **Send the keyboard's language** | Assist answers in the language you type in | On |
| **Stay connected** | **While the panel is open**, or **While the keyboard is shown** so the panel is live the instant it opens; either way the connections drop a minute after | While the keyboard is shown |
| **Keep the last states on the phone** | Draw the tiles from the last session at once, dimmed until each home confirms them | On |
| **Suggest commands as you type** | The **Ask home** chip (with a Home Assistant listed) | On |

## Details & edge cases

- **What is sent, and where.** Only to the homes you listed: each home's key in a header, the commands you give, the states it sends back, and a camera still when you ask for one. Home Assistant is a WebSocket to `/api/websocket`; a Hue bridge and openHAB hold an event stream open; SmartThings is asked every ten seconds, Smart Life every 30 and SwitchBot once a minute; Google Home goes through Play services. All of it only while the panel is open or the keyboard is shown, and a minute after. Nothing goes out when the tool is off or no home is signed in. The [network activity log](https://wmkeyboard.pages.dev/privacy/network-activity/) shows every request under the home's platform.
- **Plain HTTP to your own server.** A Home Assistant or openHAB address without `https://` is plain HTTP on your own network, which is how most installs answer. A remote address should be `https://`; a bare public domain is taken as such. A Hue bridge is always HTTPS, with its own certificate pinned at pairing.
- **When a stream cannot connect**, Home Assistant falls back to its plain web API: taps still work, states refresh when you act, and the dot turns amber. When nothing answers, that home's tiles stay as last seen, dimmed, under a banner with **Retry**; the other homes carry on.
- **A key that stops working** (you revoked it, the server was reset, a SmartThings token expired, a Tuya trial lapsed) shows as a red dot and a banner on the tool's page. Edit the home and sign in again; nothing else is lost.
- **Several homes.** Rooms with the same name in two homes are two tabs, each with its home's name first. Favourites and hidden things remember which home they belong to.
- **Before the first unlock** after a restart, the tool is not available: the keys live in the part of the phone that opens with your unlock.
- **Backups** leave every home's key out unless you turn on **Include API keys**; the addresses and the list go with them.
- **Camera stills** are fetched over Home Assistant's web API with the key, never through any image service, and are not kept on the phone.
