🚜 Merges/Redirect Habitica component pages (#8728)

This commit is contained in:
Klaas Schoute 2019-02-25 15:23:37 +01:00 committed by Franck Nijhof
parent 8ca9ce07c2
commit d80399cd50
2 changed files with 18 additions and 26 deletions

View File

@ -8,13 +8,23 @@ comments: false
sharing: true sharing: true
footer: true footer: true
logo: habitica.png logo: habitica.png
ha_category: Hub ha_category:
- Hub
- Sensor
ha_version: 0.78 ha_version: 0.78
ha_iot_class: "Cloud Polling" 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 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: To use the component you should use this example configuration:
```yaml ```yaml
@ -79,6 +89,7 @@ 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. 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. 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`. So let's call the API on `habitica.api_call`.
* The `name` key becomes `xxxNotAValidNickxxx`. * The `name` key becomes `xxxNotAValidNickxxx`.
* The `path` key is trickier. * The `path` key is trickier.
* Remove 'https://habitica.com/api/v3/' at the beginning of the endpoint URL. * Remove 'https://habitica.com/api/v3/' at the beginning of the endpoint URL.
@ -88,6 +99,7 @@ So let's call the API on `habitica.api_call`.
Combining all together: Combining all together:
call `habitica.api_call` with data call `habitica.api_call` with data
``` ```
{ {
"name": "xxxNotAValidNickxxx", "name": "xxxNotAValidNickxxx",
@ -101,6 +113,7 @@ This call will create a new todo on `xxxNotAValidNickxxx`'s account with text `U
![example task created](/images/screenshots/habitica_new_task.png) ![example task created](/images/screenshots/habitica_new_task.png)
Also an event `habitica_api_call_success` will be fired with the following data: Also an event `habitica_api_call_success` will be fired with the following data:
``` ```
{ {
"name": "xxxNotAValidNickxxx", "name": "xxxNotAValidNickxxx",

View File

@ -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>