modscode / Gallery / vome-automation
vome-automation
A side pane for the Home Assistant automation Claude is working on: triggers, conditions and actions as HA's editor nests them, what a save changed, which steps the latest run took, and a car-stereo dot-matrix display that acts it out. Wor…
What it does
- Draws a pane, toasts in the desktop app
- Adds /automation
- Watches tool calls and can refuse them
- Hooks plugin.register, session.start, turn.complete
- Keeps its own state between turns
Good points
- No network calls
- Starts no processes
- Written in TypeScript
- Has a desktop-specific branch
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like vome-automation by Vortitron (pane, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/vortitron-vome-automation/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Automation" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Link } = $.ui.resolve(e)
const alias = '…'
const filter = '…'
const clock = '…'
const added = '…'
const changed = '…'
const removed = '…'
const clock2 = '…'
const text = '…'
const trigger = '…'
const note = '…'
const url = '…'
const encodeURIComponent = '…'
const length = '…'
return (
<Box flexDirection="column">
<Box flexDirection="column">
<Box flexDirection="column">
<Text bold wrap="truncate-end">
{alias}
</Text>
<Text dimColor wrap="truncate-end">
{filter}
</Text>
<Text color="warning" wrap="truncate-end">
{"Saved "}
{clock}
{` · ${added} added, ${changed} changed, ${removed} removed`}
</Text>
<Text wrap="truncate-end">
<Text>
{"Last run "}
{clock2}
{" · "}
{text}
</Text>
<Text dimColor>
{" · "}
{trigger}
</Text>
<Text dimColor>
{" (before the save, so not marked below)"}
</Text>
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{`Watching for a new run until ${clock}.`}
</Text>
<Text color="warning" wrap="truncate-end">
{" "}
</Text>
</Box>
<Box flexDirection="column" marginTop={1}>
−
{" "}
{" "}
{` ${note}`}
−
{" "}
{" "}
{` ${note}`}
−
{" "}
{" "}
{` ${note}`}
</Box>
<Box flexDirection="row" gap={2} marginTop={1}>
<Button hotkey="r">
Refresh
</Button>
<Button hotkey="w">
Stop watching
</Button>
<Button hotkey="h" dimColor>
What to allow
</Button>
<Button hotkey="o" dimColor>
Other automation
</Button>
<Button hotkey="b" dimColor>
Bulbs off
</Button>
<Link href={`${url}/config/automation/edit/${encodeURIComponent}`}>
Open in Home Assistant
</Link>
</Box>
<Text dimColor>
● ran ✗ false or error ○ not reached + added ~ changed − removed
</Text>
<Box flexDirection="column" marginTop={1}>
<Text bold>
Pick an automation (
{length}
)
</Text>
<Button dimColor>
Close the list
</Button>
</Box>
<Box flexDirection="row" gap={2} marginTop={1}>
<Text dimColor wrap="wrap">
{"Working on ESPHome too? The ESPHome pane shows the device and its builds: "}
<Text color="suggestion">
/plugin install vome-esphome --marketplace Vortitron/home-assistant-mcp
</Text>
</Text>
<Button dimColor>
Hide
</Button>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
const alias = '…'
const text = '…'
await $.ui.toast(`${alias}: ${text}`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
claude-plugin/vome-automation/hooks/register.tsx lines 257–416 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const { Box, Text, Button, Link, Code, Markdown } = $.ui.resolve(e)
const current = (await $.state.get(view)).value ?? null
const latest = (await $.state.get(run)).value ?? null
const watching = (await $.state.get(watch)).value ?? null
const message = (await $.state.get(note)).value ?? null
const urls = (await $.state.get(haUrls)).value ?? {}
const lit = (await $.state.get(flash)).value ?? null
const isFxEnabled = (await $.state.get(fxOn)).value ?? true
const playing = (await $.state.get(fx)).value ?? null
const isBuilding = (await $.state.get(building)).value ?? false
const refusal = (await $.state.get(blocked)).value ?? null
const picking = (await $.state.get(choices)).value ?? null
const isSiblingHint = !hasSibling && ((await $.state.get(sibling)).value ?? false)
const siblingHint = isSiblingHint ? (
<Box flexDirection="row" gap={2} marginTop={1}>
<Text dimColor wrap="wrap">
Working on ESPHome too? The ESPHome pane shows the device and its builds: <Text color="suggestion">{ESPHOME_INSTALL}</Text>
</Text>
<Button
key="hide-sibling"
dimColor
onPress={async () => {
await $.store.set('siblingHintOff', true).catch(() => undefined)
await $.state.set(sibling, false)
}}
>
Hide
</Button>
</Box>
) : null
// The home's automations to pick one from (/automation with nothing shown, or o). The phone app
// has no Select, so there they are buttons, the first dozen.
let pickerList = null
if (picking) {
const pick = (id: string) => $.state.set(pending, { automation: id, run: true, server: picking.server })
if (e.surface === 'mobile') {
pickerList = picking.automations.slice(0, 12).map(item => (
<Button key={`pick-${item.id}`} plain onPress={() => pick(item.id)}>
{item.alias}
</Button>
))
} else {
const { Select } = $.ui.resolve(e)
pickerList = (
<Select
key="pick"
label="Automation"
autoFocus
options={picking.automations.map(item => ({ value: item.id, label: `${item.isOn ? '●' : '○'} ${item.alias}` }))}
onSelect={value => pick(value)}
/>
)
}
}
const picker = picking ? (
<Box flexDirection="column" marginTop={1}>
<Text bold>Pick an automation ({picking.automations.length})</Text>
{pickerList}
<Button key="close-picker" dimColor onPress={() => $.state.set(choices, null)}>
Close the list
</Button>
</Box>
) : null
// A refused read takes the whole pane until dismissed: what to add and where, over everything,
// rather than a HooksError in the note line that names neither.
if (refusal && !refusal.isDismissed) {
fxSite = null
const rules = READ_TOOLS.map(tool => `"mcp__${refusal.server}__${tool}"`).join(',\n')
return (
<Box flexDirection="column" borderStyle="round" borderColor="warning" paddingX={1}>
<Text bold color="warning">
The automation pane needs permission to read
</Text>
<Text wrap="wrap">
Auto mode refused its background read of {refusal.tool} on the {refusal.server} server. Claude Code refuses
reads nobody asked for unless they are allowed by name.
</Text>
<Box marginTop={1}>
<Text wrap="wrap">Add these lines to permissions.allow in</Text>
</Box>
<Markdown text={`[${settingsFile}](file://${settingsFile})`} />
<Code source={rules} />
<Text dimColor wrap="wrap">
Or run /permissions and choose Allow for each. They only read: an automation and its recorded runs.
</Text>
<Box marginTop={1}>
<Text dimColor wrap="wrap">
Claude Code said: {compact(refusal.error, 300)}
</Text>
</Box>
<Box flexDirection="row" gap={2} marginTop={1}>
<Button
key="copy-rules"
hotkey="c"
variant="primary"
autoFocus
onPress={press => $.ui.copy({ text: rules, surface: press.surface })}
>
Copy the lines
</Button>
<Button
key="retry"
hotkey="r"
onPress={async () => {
isBlocked = false
await $.state.set(blocked, null)
await $.state.set(note, null)
await $.state.set(pending, { run: true })
}}
>
Try again
</Button>
<Button key="dismiss" hotkey="d" role="dismiss" onPress={() => $.state.set(blocked, { ...refusal, isDismissed: true })}>
Dismiss
</Button>
</Box>
<Link href={README_URL}>Why the pane needs these</Link>
</Box>
)
}
// Dismissed: the pane as usual, its note line saying how to get the help back.
const showHelp = refusal ? (
<Button key="help" hotkey="h" dimColor onPress={() => $.state.set(blocked, { ...refusal, isDismissed: false })}>
What to allow
</Button>
) : null
// While an interstitial plays it takes the header's first four lines; the swim (the intro, or
// while an automation is worked on) takes all six. Same heights, so nothing below moves.
// Both are Rasters, which only the terminal draws; elsewhere the pane goes without.
const isSwimming = !current || isBuilding
let sceneStrip = null
let swimStrip = null
if (e.surface === 'terminal' && isFxEnabled && (playing || isSwimming)) {
const { Raster } = $.ui.resolve(e)
const columns = Math.max(10, Math.min(512, e.props.bodyColumns))
fxSite = { columns, isSwim: !playing }
if (playing) {
sceneStrip = <Raster key="bulbs" columns={columns} rows={FX_ROWS} cells={frame(Date.now() - playing.at, playing.scene, columns)} />
} else {
swimStrip = <Raster key="bulbs" columns={columns} rows={SWIM_ROWS} cells={swim(Date.now(), columns)} />
}
} else {
fxSite = null
}
const connected = (await $.state.get(servers)).value ?? null
if (!current && connected !== null && connected.length === 0) {
return (
<Box flexDirection="column">
{swimStrip ?? sceneStrip}
<Text bold>Connect Home Assistant first</Text>
<Text wrap="wrap">
This pane follows Claude's work through the Home Assistant MCP (@vortitron/home-assistant-mcp), and nothing
connected in this session has its tools.
</Text>
<Box flexDirection="column" marginTop={1}>claude-plugin/vome-automation/hooks/register.tsx lines 573–593 · Pane
function drawRow(T: ElementTable['Text'], row: Row, highlight: string | undefined) {
if (row.isSection) {
return (
<T bold color="suggestion">
{row.text.toUpperCase()}
</T>
)
}
const isStruck = row.change === '-' || row.tone === 'disabled'
return (
<T wrap="truncate-end" backgroundColor={highlight}>
<T color={changeColour(row.change)}>{row.change === '-' ? '−' : row.change ?? ' '}</T>
{' '.repeat(row.depth)}
<T color={toneColour(row.tone)}>{toneGlyph(row.tone)} </T>
<T dimColor={row.tone === 'skipped' || row.tone === 'disabled'} strikethrough={isStruck}>
{row.text}
</T>
{row.note ? <T dimColor>{` ${row.note}`}</T> : null}
</T>
)
}Licence text (MIT)
MIT License Copyright (c) 2026 Andrew Lyeklint Hancock (Vortitron) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
What its code calls
env varstool callsremembers
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit 780616c7a4f7 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.claude-plugin/vome-automation/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.3 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reaches no network |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add Vortitron/home-assistant-mcp/plugin install vome-automation@vomeThis installs the marketplace's latest commit, which may not be the one read here (780616c7a4f7). Compare them before you install.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "vortitron-vome-automation" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…ReviewPR #3 Fix loginbranche couranteà traiter ▸3 ▸3 ▸3 · en relecture ▸3 ▸3 ▸3▸◉3 a1b2c3d ↩ répondu obsolète → Claude Review▸◉3 a1b2c3d ↩ répondu obsolète → Claude Review▸◉3 a1b2c3d ↩ répondu obsolète → Claude Review────────fil 31/3 Review ↗ GitHub
Review@alexReview@alexReview@alexReviewRéponse : Review publierEntrée publie · Esc annule la réponse · les touches n, p… tapent dans le champ… ReviewLe panneau n'a pas le clavier : ctrl+x tab ou un clic, et les touches marchent.p préc. n suiv. t PR suiv. x démarquer a tout démarquer f corriger (3) r répondre v résoudre o web q fermer -
What it does
- Draws a pane, toasts
- Adds /chronicle
- Watches tool calls
- Hooks agent.spawn, config.set, session.end, session.measure and 1 more
-
Ask Claude…Desktop Markdown ReaderDesktop Markdown ReaderMarkdown file README.md applyChoose a Markdown file.No document loaded.Copy Markdown sourceRefresh
-
Ask Claude…⏺ src/ WriteUpdated·0·0·0search: Edit nextUpdated1/3── Updated ────────› Edit› Edit› Edit⎿Updated> what to change in lines Warp-Edit sendenter to send to Claude ·cancel⎿ open the original⎿ open the original⎿ open the original✎> what to change in lines Warp-Edit sendenter to send to Claude ·cancel⎿ open the original⎿ open the original⎿ open the original✎> what to change in lines Warp-Edit sendenter to send to Claude ·cancel⎿ open the original⎿ open the original⎿ open the original✎⋯> what to change in lines Warp-Edit sendenter to send to Claude ·cancel⎿ open the original⎿ open the original⎿ open the original✎> what to change in lines Warp-Edit sendenter to send to Claude ·cancel⎿ open the original⎿ open the original⎿ open the original✎> what to change in lines Warp-Edit sendenter to send to Claude ·cancel⎿ open the original⎿ open the original⎿ open the original✎
-
Ask Claude…Tasks for you● Open (3)● Completed (3)Auto: on---Let Claude use this pane on its own?Claude would post anything only you can do here, and check tasks off when you confirm them in chat.Nothing for you to do right now.Yes, automaticallyOnly when I ask---#a1b2c3d Fix login31. CopyCopy
npm test31. CopyCopynpm test31. CopyCopyExpect: Donenpm testDoneCopyCopyCopyCancel replyReply What happened? Paste output or describe it send---#a1b2c3d Fix login31. CopyCopynpm test31. CopyCopynpm test31. CopyCopyExpect: Donenpm testDoneCopyCopyCopyCancel replyReply What happened? Paste output or describe it send---#a1b2c3d Fix login31. CopyCopynpm test31. CopyCopynpm test31. CopyCopyExpect: Donenpm testDoneCopyCopyCopyCancel replyReply What happened? Paste output or describe it send -
Ask Claude…CIcross Bash · Classicmain · a1b2c3d · failed at 14:32Open the run on GitHubFix it fClose x
(no log available)