Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9358f83229 | ||
|
|
e49d31d725 | ||
|
|
13a27e1d00 |
74
.github/workflows/deploy-docs.yml
vendored
74
.github/workflows/deploy-docs.yml
vendored
@@ -1,64 +1,38 @@
|
|||||||
name: Deploy Documentation to GitHub Pages
|
name: Deploy MkDocs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main # or master, depending on your default branch
|
||||||
paths:
|
workflow_dispatch:
|
||||||
- 'docs/**'
|
|
||||||
- '.github/workflows/deploy-docs.yml'
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
# Allow only one concurrent deployment
|
|
||||||
concurrency:
|
|
||||||
group: "pages"
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: actions/setup-python@v5
|
||||||
|
|
||||||
- name: Setup Ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
with:
|
||||||
ruby-version: '3.2'
|
python-version: '3.x'
|
||||||
bundler-cache: true
|
|
||||||
cache-version: 0
|
|
||||||
|
|
||||||
- name: Setup Pages
|
|
||||||
uses: actions/configure-pages@v4
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
cd docs
|
pip install mkdocs-material
|
||||||
bundle install
|
pip install mkdocs-git-revision-date-localized-plugin
|
||||||
|
pip install mkdocstrings[python]
|
||||||
- name: Build site
|
- name: Configure Git
|
||||||
run: |
|
run: |
|
||||||
cd docs
|
git config --global user.name "github-actions[bot]"
|
||||||
bundle exec jekyll build
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
env:
|
- name: Build docs
|
||||||
JEKYLL_ENV: production
|
run: mkdocs build
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-pages-artifact@v3
|
|
||||||
with:
|
|
||||||
path: docs/_site
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
needs: build
|
|
||||||
environment:
|
|
||||||
name: github-pages
|
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
run: |
|
||||||
uses: actions/deploy-pages@v4
|
git checkout --orphan gh-pages
|
||||||
|
git rm -rf .
|
||||||
|
mv site/* .
|
||||||
|
rm -rf site
|
||||||
|
git add .
|
||||||
|
git commit -m "docs: Update documentation"
|
||||||
|
git push origin gh-pages --force
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
# MCP Server for Home Assistant 🏠🤖
|
# MCP Server for Home Assistant 🏠🤖
|
||||||
|
|
||||||
[](LICENSE)
|
[](LICENSE) [](https://bun.sh) [](https://www.typescriptlang.org) [](https://smithery.ai/server/@jango-blockchained/advanced-homeassistant-mcp)
|
||||||
[](https://bun.sh)
|
|
||||||
[](https://www.typescriptlang.org)
|
|
||||||
|
|
||||||
## Overview 🌐
|
## Overview 🌐
|
||||||
|
|
||||||
|
|||||||
16
docs/api.md
16
docs/api.md
@@ -130,25 +130,25 @@ Basic rate limiting is implemented:
|
|||||||
async function controlDevice(entityId: string, command: string, params?: Record<string, unknown>) {
|
async function controlDevice(entityId: string, command: string, params?: Record<string, unknown>) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/control', {
|
const response = await fetch('/api/control', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'Authorization': `Bearer ${token}`
|
'Authorization': `Bearer ${token}`
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
entity_id: entityId,
|
entity_id: entityId,
|
||||||
command,
|
command,
|
||||||
parameters: params
|
parameters: params
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
const error = await response.json();
|
const error = await response.json();
|
||||||
throw new Error(error.message);
|
throw new Error(error.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return await response.json();
|
return await response.json();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Device control failed:', error);
|
console.error('Device control failed:', error);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|||||||
61
mkdocs.yml
61
mkdocs.yml
@@ -1,23 +1,19 @@
|
|||||||
site_name: Home Assistant MCP
|
site_name: Claude Desktop
|
||||||
site_description: A bridge between Home Assistant and Language Learning Models
|
site_url: https://your-username.github.io/your-repo-name
|
||||||
site_url: https://jango-blockchained.github.io/advanced-homeassistant-mcp/
|
repo_url: https://github.com/your-username/your-repo-name
|
||||||
repo_url: https://github.com/jango-blockchained/advanced-homeassistant-mcp
|
|
||||||
repo_name: jango-blockchained/advanced-homeassistant-mcp
|
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
logo: assets/images/logo.png
|
logo: assets/images/logo.png
|
||||||
favicon: assets/images/favicon.ico
|
favicon: assets/images/favicon.ico
|
||||||
palette:
|
palette:
|
||||||
- media: "(prefers-color-scheme: light)"
|
- scheme: default
|
||||||
scheme: default
|
|
||||||
primary: indigo
|
primary: indigo
|
||||||
accent: indigo
|
accent: indigo
|
||||||
toggle:
|
toggle:
|
||||||
icon: material/brightness-7
|
icon: material/brightness-7
|
||||||
name: Switch to dark mode
|
name: Switch to dark mode
|
||||||
- media: "(prefers-color-scheme: dark)"
|
- scheme: slate
|
||||||
scheme: slate
|
|
||||||
primary: indigo
|
primary: indigo
|
||||||
accent: indigo
|
accent: indigo
|
||||||
toggle:
|
toggle:
|
||||||
@@ -34,39 +30,15 @@ theme:
|
|||||||
- content.code.copy
|
- content.code.copy
|
||||||
|
|
||||||
markdown_extensions:
|
markdown_extensions:
|
||||||
- admonition
|
|
||||||
- attr_list
|
|
||||||
- def_list
|
|
||||||
- footnotes
|
|
||||||
- meta
|
|
||||||
- toc:
|
|
||||||
permalink: true
|
|
||||||
- pymdownx.arithmatex:
|
|
||||||
generic: true
|
|
||||||
- pymdownx.betterem:
|
|
||||||
smart_enable: all
|
|
||||||
- pymdownx.caret
|
|
||||||
- pymdownx.details
|
|
||||||
- pymdownx.emoji:
|
|
||||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
|
||||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
|
||||||
- pymdownx.highlight:
|
- pymdownx.highlight:
|
||||||
anchor_linenums: true
|
anchor_linenums: true
|
||||||
- pymdownx.inlinehilite
|
- pymdownx.inlinehilite
|
||||||
- pymdownx.keys
|
- pymdownx.snippets
|
||||||
- pymdownx.magiclink
|
- pymdownx.superfences
|
||||||
- pymdownx.mark
|
- admonition
|
||||||
- pymdownx.smartsymbols
|
- pymdownx.details
|
||||||
- pymdownx.superfences:
|
- attr_list
|
||||||
custom_fences:
|
- md_in_html
|
||||||
- name: mermaid
|
|
||||||
class: mermaid
|
|
||||||
format: !!python/name:pymdownx.superfences.fence_code_format
|
|
||||||
- pymdownx.tabbed:
|
|
||||||
alternate_style: true
|
|
||||||
- pymdownx.tasklist:
|
|
||||||
custom_checkbox: true
|
|
||||||
- pymdownx.tilde
|
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- search
|
- search
|
||||||
@@ -81,13 +53,17 @@ plugins:
|
|||||||
|
|
||||||
nav:
|
nav:
|
||||||
- Home: index.md
|
- Home: index.md
|
||||||
|
- Usage: usage.md
|
||||||
|
- API: api.md
|
||||||
|
- Configuration:
|
||||||
|
- Claude Desktop Config: claude_desktop_config.md
|
||||||
|
- Cline Config: cline_config.md
|
||||||
- Getting Started:
|
- Getting Started:
|
||||||
- Overview: getting-started.md
|
- Overview: getting-started.md
|
||||||
- Installation: getting-started/installation.md
|
- Installation: getting-started/installation.md
|
||||||
- Configuration: getting-started/configuration.md
|
- Configuration: getting-started/configuration.md
|
||||||
- Docker Setup: getting-started/docker.md
|
- Docker Setup: getting-started/docker.md
|
||||||
- Quick Start: getting-started/quickstart.md
|
- Quick Start: getting-started/quickstart.md
|
||||||
- Usage: usage.md
|
|
||||||
- API Reference:
|
- API Reference:
|
||||||
- Overview: api/index.md
|
- Overview: api/index.md
|
||||||
- Core API: api.md
|
- Core API: api.md
|
||||||
@@ -136,6 +112,9 @@ extra:
|
|||||||
property: !ENV GOOGLE_ANALYTICS_KEY
|
property: !ENV GOOGLE_ANALYTICS_KEY
|
||||||
|
|
||||||
extra_css:
|
extra_css:
|
||||||
- assets/stylesheets/extra.css
|
- stylesheets/extra.css
|
||||||
|
|
||||||
|
extra_javascript:
|
||||||
|
- javascripts/extra.js
|
||||||
|
|
||||||
copyright: Copyright © 2024 Jango Blockchained
|
copyright: Copyright © 2024 Jango Blockchained
|
||||||
Reference in New Issue
Block a user