mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
🚜 Merges/Redirect Habitica component pages (#8728)
This commit is contained in:
parent
8ca9ce07c2
commit
d80399cd50
@ -8,13 +8,23 @@ comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: habitica.png
|
||||
ha_category: Hub
|
||||
ha_category:
|
||||
- Hub
|
||||
- Sensor
|
||||
ha_version: 0.78
|
||||
ha_iot_class: "Cloud Polling"
|
||||
redirect_from:
|
||||
- /components/sensor.habitica/
|
||||
---
|
||||
|
||||
This component allows you to monitor and manage your Habitica profile. This component exposes the [Habitica's API](https://habitica.com/apidoc/) as a Home Assistant service. It supports multiple users and allows you to automate checking out your habits and daily tasks or casting magics using Home Assistant.
|
||||
This component enables usage of [`sensor.habitica` platform.](/components/sensor.habitica/)
|
||||
|
||||
There is currently support for the following device types within Home Assistant:
|
||||
|
||||
- Sensor - Allows you to view and monitor your player data from [Habitica](https://habitica.com/) in Home Assistant.
|
||||
|
||||
The sensors will automatically appear, after setup the Habitica component.
|
||||
|
||||
To use the component you should use this example configuration:
|
||||
|
||||
```yaml
|
||||
@ -79,15 +89,17 @@ For example, let's say that there is a configured `habitica` platform for user `
|
||||
Let's create a new task (a todo) for this user via Home Assistant. There is an [API call](https://habitica.com/apidoc/#api-Task-CreateUserTasks) for this purpose.
|
||||
To create a new task one should hit `https://habitica.com/api/v3/tasks/user` endpoint with `POST` request with a json object with task properties.
|
||||
So let's call the API on `habitica.api_call`.
|
||||
|
||||
* The `name` key becomes `xxxNotAValidNickxxx`.
|
||||
* The `path` key is trickier.
|
||||
* Remove 'https://habitica.com/api/v3/' at the beginning of the endpoint URL.
|
||||
* Split the remaining on slashes (/) and **append the lowercase method** at the end.
|
||||
* You should get `["tasks", "user", "post"]`. To get a better idea of the API you are recommended to try all of the API calls in IPython console [using this package](https://github.com/ASMfreaK/habitipy/blob/master/README.md).
|
||||
* Remove 'https://habitica.com/api/v3/' at the beginning of the endpoint URL.
|
||||
* Split the remaining on slashes (/) and **append the lowercase method** at the end.
|
||||
* You should get `["tasks", "user", "post"]`. To get a better idea of the API you are recommended to try all of the API calls in IPython console [using this package](https://github.com/ASMfreaK/habitipy/blob/master/README.md).
|
||||
* The `args` key is more or less described in the [docs](https://habitica.com/apidoc/).
|
||||
|
||||
Combining all together:
|
||||
call `habitica.api_call` with data
|
||||
|
||||
```
|
||||
{
|
||||
"name": "xxxNotAValidNickxxx",
|
||||
@ -101,6 +113,7 @@ This call will create a new todo on `xxxNotAValidNickxxx`'s account with text `U
|
||||

|
||||
|
||||
Also an event `habitica_api_call_success` will be fired with the following data:
|
||||
|
||||
```
|
||||
{
|
||||
"name": "xxxNotAValidNickxxx",
|
||||
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Habitica Sensor"
|
||||
description: "Instructions on enabling Habitica support for your Home Assistant"
|
||||
date: 2018-08-09 00:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: habitica.png
|
||||
ha_category: Sensor
|
||||
ha_iot_class: "Cloud Polling"
|
||||
ha_version: 0.78
|
||||
---
|
||||
|
||||
The `habitica` sensor platform allows you to view and monitor your player data from [Habitica](https://habitica.com/) in Home Assistant.
|
||||
|
||||
<p class='note'>
|
||||
You must have the [`habitica` component](/components/habitica/)
|
||||
configured to use this platform. After configuring that component, sensors specified there will automatically appear.
|
||||
</p>
|
Loading…
x
Reference in New Issue
Block a user