@sanlim/home-assistant-switch-mcp-server
Version:
A MCP server for Home Assistant switch services.
12 lines (11 loc) • 341 B
JavaScript
export class HomeAssistantSwitchRequestService {
client;
constructor(client) {
this.client = client;
}
async callSwitchService({ entity_id, service, }) {
const endpoint = `services/switch/${service}`;
const data = { entity_id };
return this.client.makeRequest(endpoint, 'POST', data);
}
}