mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Add Markdown To Do list example for Habitica (#26982)
This commit is contained in:
parent
a9fda83f37
commit
efcbbf2cbe
@ -145,3 +145,19 @@ Also an event `habitica_api_call_success` will be fired with the following data:
|
||||
"id": "NEW_TASK_UUID"}
|
||||
}
|
||||
```
|
||||
|
||||
## Templating
|
||||
|
||||
`sensor.habitica_USER_dailys`, `sensor.habitica_USER_habits`, `sensor.habitica_USER_rewards`, and `sensor.habitica_Justin_todos` have state attributes listing the user's respective tasks. For example, you can see this information in **Developer Tools** -> **States** -> `sensor.habitica_USER_dailys` -> **Attributes**, or by adding a [Markdown card](/dashboards/markdown/) to a dashboard with the following code:
|
||||
|
||||
{% raw %}
|
||||
|
||||
```jinja
|
||||
{% for key, value in states.sensor.habitica_USER_dailys.attributes.items() %}
|
||||
{% if 'text' in value | string %}
|
||||
{{ loop.index }}. {{ value.text }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user