> For the complete documentation index, see [llms.txt](https://mycroft-ai.gitbook.io/mark-ii/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mycroft-ai.gitbook.io/mark-ii/home-assistant.md).

# Home Assistant

### What is Home Assistant?

Home Assistant is open source home automation software that puts local control and privacy first. It is powered by a worldwide community of tinkerers and DIY enthusiasts. It can be run on a Raspberry Pi or a local server.

{% embed url="<https://www.home-assistant.io/>" %}

Paired with the Mycroft Mark II, you can control your lights, garage door, thermostats and more using your voice!

Currently the following entity types are supported: `light`, `switch`, `scene`, `climate`, `groups`, `input_boolean`, `binary_sensor`, `cover` and `camera`

### Configuration

Before you can use Home Assistant through your Mark II, we first need to allow Mycroft to authenticate with your Home Assistant server.

First, you need to create a Long-Lived Access Token. You can do this on the user profile page of your Home Assistant server. For example `http://my-home-assistant:8123/profile`

<figure><img src="https://github.com/MycroftAI/skill-homeassistant/raw/20.08/docs/long-Lived-access-token.png" alt=""><figcaption></figcaption></figure>

Now head to your Mycroft Skill Settings at: \
<https://home.mycroft.ai/skills>

Find the Home Assistant Skill in the list and enter your Home Assistant IP address, the Long Lived Access Token, and the port number if this is not the default (8123).

<figure><img src="https://github.com/MycroftAI/skill-homeassistant/raw/20.08/docs/home-settings.png" alt=""><figcaption><p>Example Home Assistant Skill settings</p></figcaption></figure>

Be sure to hit save, and then wait a minute or two to ensure the settings have been applied to your Mark II.

### Example Commands

> Hey Mycroft, Turn on office light
>
> Hey Mycroft, Turn off bedroom lights
>
> Hey Mycroft, What is the temperature of thermostat bedroom
>
> Hey Mycroft, Open the living room blinds
>
> Hey Mycroft, Close the garage door
>
> Hey Mycroft, What is the state of power plug bedroom
>
> Hey Mycroft, Has water sensor detected moisture


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mycroft-ai.gitbook.io/mark-ii/home-assistant.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
