Habitica Integration (Gamify Your Tasks)

Beginning of the week I got interest in a project called Habitica:
“Habitica is a free habit building and productivity app that treats your real life like a game”

4 days later I find myself coding my first simple integration for Hass:

enjoy :slight_smile:

6 Likes

Hello!

That’s a really cool idea. One thing that might be interesting as well is providing a service to create tasks. I am thinking of use cases like when the washing machine is finished to create a task for that or check it off (exact name match would probably work) when the humidity in room x rises :wink:

Cheers Hannes

P.S.: consider sending in a pull request :slight_smile:

1 Like

True, I really like the idea. I will have a look into this!

About the pull request: I would have to set up the testing first… looks time consuming :slight_smile: (will see if I can find the time)

PS: How do you track your washing machine :stuck_out_tongue: ?

I am using a template sensor to read the current power consumption. If it’s above 0 the machine is in standby or active. :slight_smile:
https://github.com/cyberkov/home-assistant-config/blob/master/sensors/homematic.yaml

Cheers Hannes

1 Like

Can I have the REST notify and the sensor component in one python file or do I need to create a separate notify and a sensor component?

Do I need a sensor and a notify config for this or can I put both in one? If yes, how do I do this in the best mannor?

sensor:
- platform: habitica
  api_user: xxx
  api_key: xxx

and

notify:
  - platform: habiticaSend
    api_user: xxx
    api_key: xxx

and than in the automation or script like this:

  action:
    - service: notify.habiticaSend
      data_template:
        text: "Task Name"
        type: "todo"
        value: "0"
        notes: "Notes go here."

Thanks for this, I had been meaning to get started with Habitica, and this motivated me to do so.

I created a PR to add support for more than one person, in case any one else has multiple people in their household making use of Habitica.

1 Like

Nice! And I have to upvote this based on the avatar if nothing else. Wubba Lub A Dub Dub!!

2 Likes

I don’t use Habitica, but have had my eye on it. This makes it that much more compelling. Great work!

Awesome, thanks for contributing! :slight_smile:

Anyone can guide me with the question I had above? I would like to create a notify function to create To-Do’s in Habitica but I’m not so sure about the best implementation for Hass.

I seem to be having trouble getting this to work.

Invalid config for [sensor.habitica]: required key not provided @ data[‘name’]. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/compone

Anyone have a workaround for this?

You should add a name to your config (random name worked for me):

  • platform: habitica
    name: xxx
    api_user: xxx
    api_key: xxx

Thanks for that. It worked out perfectly.