{"id":15088980,"url":"https://github.com/thenoim/reactive-home","last_synced_at":"2025-07-15T07:34:15.462Z","repository":{"id":65200954,"uuid":"583945110","full_name":"TheNoim/reactive-home","owner":"TheNoim","description":"Reactive home platform for home assistant. Run deno scripts for home assistant.","archived":false,"fork":false,"pushed_at":"2024-05-30T19:49:17.000Z","size":406,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T10:42:14.214Z","etag":null,"topics":["deno","home-assistant","home-automation","homeassistant","reactive","smarthome","typescript","vue"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheNoim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-31T15:23:18.000Z","updated_at":"2025-02-26T21:44:42.000Z","dependencies_parsed_at":"2023-12-09T22:25:37.541Z","dependency_job_id":"2c47a518-7241-4409-9289-6c583319aff6","html_url":"https://github.com/TheNoim/reactive-home","commit_stats":{"total_commits":102,"total_committers":1,"mean_commits":102.0,"dds":0.0,"last_synced_commit":"6bb6548bdc3f585d7c40c5b0f4f4d7cdbb193c5e"},"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNoim%2Freactive-home","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNoim%2Freactive-home/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNoim%2Freactive-home/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNoim%2Freactive-home/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheNoim","download_url":"https://codeload.github.com/TheNoim/reactive-home/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248467400,"owners_count":21108634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","home-assistant","home-automation","homeassistant","reactive","smarthome","typescript","vue"],"created_at":"2024-09-25T08:38:23.088Z","updated_at":"2025-04-11T19:33:58.146Z","avatar_url":"https://github.com/TheNoim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reactive home deno runtime\n\nMy goal is it to provide a declarative automation experience for home assistant.\n\n## Installation\n\n1. Add [this repo](https://github.com/TheNoim/reactive-home) to your home assistant installation:\n\n[![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2FTheNoim%2Freactive-home)\n\n2. Install `Reactive Home` from the addon store\n3. (*Optional*, but *recommend*) Install the **Studio Code Server** addon. After you installed the addon, go to the **Studio Code Server** addon and add this command to the `init_commands` list:\n\n`code --install-extension denoland.vscode-deno \u0026\u0026 curl -fsSL https://deno.land/x/install/install.sh | sh \u0026\u0026 echo \"export DENO_INSTALL=\\\"/root/.deno\\\"\" \u003e\u003e ~/.zshrc \u0026\u0026 echo \"export PATH=\\\"\\$DENO_INSTALL/bin:\\$PATH\\\"\" \u003e\u003e ~/.zshrc \u0026\u0026 mkdir -p /config/.vscode/ \u0026\u0026 echo \"{\\\"deno.enable\\\":true,\\\"deno.unstable\\\":true,\\\"deno.importMap\\\":\\\"./reactive-home/import_map.json\\\"}\" \u003e /config/.vscode/settings.json`\n\nIn yaml mode it should look like this:\n\n```yaml\ninit_commands:\n  - \u003e-\n    code --install-extension denoland.vscode-deno \u0026\u0026 curl -fsSL\n    https://deno.land/x/install/install.sh | sh \u0026\u0026 echo \"export\n    DENO_INSTALL=\\\"/root/.deno\\\"\" \u003e\u003e ~/.zshrc \u0026\u0026 echo \"export\n    PATH=\\\"\\$DENO_INSTALL/bin:\\$PATH\\\"\" \u003e\u003e ~/.zshrc \u0026\u0026 mkdir -p /config/.vscode/\n    \u0026\u0026 echo \"{\\\"deno.enable\\\":true,\\\"deno.unstable\\\":\n    true,\\\"deno.importMap\\\":\\\"./reactive-home/import_map.json\\\"}\" \u003e\n    /config/.vscode/settings.json\npackages: []\n```\n\nYou can also just replace the `yaml` content with this. \n\nNow you need to start **Studio Code Server**. I recommen to enable `Show in sidebar` for quick access. \n\n4. Start the `reactive-home` addon\n5. Now you can start writing your scripts\n\n## Usage\n\nReactive Home will load all `.ts` script files beginning with `script.` inside the `reactive-home` directory (gets created automatically). \n\nExample:\n\n- `reactive-home/my-script.ts` ❌ wrong\n- `reactive-home/script.my-script.ts` ✅ correct\n\nThis ensures that only files you want to run as standalone script get loaded.\n\nThe easiest way to edit your scripts is to use the **Studio Code Server** addon (Follow the installation in 3.).\n\n*Tip*: If the IntelliSense in **Studio Code Server** stops working press Shift+Command+P (Mac) / Ctrl+Shift+P (Windows/Linux) and search for `deno: Restart Language Server`. Also make sure the dependencies are cached. If they are not cached, **Studio Code Server** will underline all missing dependencies with red. You can go with the coursor to the dependency and press Command+. (Mac) / Ctrl+. (Windows/Linux) and select `Cache \"dependency\" and its dependencies`. After a few seconds it should be cached and the underline should go away. *Note*: This has no effect on the script itself. This is just for **Studio Code Server**. \n\n### Scripts\n\nThis addon creates an `importa_map.json` file in `reactive-home/` with an import alias for you to use. The alias is `reactive-home` and gets updated to the current addon version at every startup. \n\nYou can use it like this:\n\n```typescript\nimport { useAsyncState } from 'reactive-home';\n\nconst state = await useAsyncState('some entity id');\n//    ^? state is a reactive value\n```\n\n### Utilities\n\nCurrently, there is no real documentation. You can use the example scripts from [test-modules](https://github.com/TheNoim/reactive-home/tree/main/test-modules) in this repo and the [auto generated deno documentation](https://deno.land/x/reactivehome/reactive_home/src/public.ts).\n\nEverything here is based on `@vue/reactivity`. You can find more informations [here](https://vuejs.org/guide/essentials/reactivity-fundamentals.html).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenoim%2Freactive-home","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthenoim%2Freactive-home","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenoim%2Freactive-home/lists"}