New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Habitica #15744

Merged
merged 6 commits into from Aug 29, 2018

Conversation

Projects
None yet
4 participants
@ASMfreaK
Contributor

ASMfreaK commented Jul 29, 2018

Description:

This PR adds a component to integrate with Habitica. It is a way to gamify your life
The proposed component allows you to monitor and manage your Habitica profile. Component exposes the Habitica's API as a Home Assistant service.
PR also proposes a new variety of sensors to watch your progress in Habitica.

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5923

Example entry for configuration.yaml (if applicable):

# Minimum viable configuration.yaml entry
habitica:
   - api_user: 'numbers1-and2-lett-ers1-fromuserid22'
     api_key: 'numbers1-and2-lett-ers1-fromapikey22'
     name: johndoe
     url: https://habitica.com/
     sensors:
         - name
         - hp
         - mp
         - exp

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • Documentation added/updated in home-assistant.github.io
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.
@homeassistant

This comment has been minimized.

Show comment
Hide comment
@homeassistant

homeassistant Jul 29, 2018

Hi @ASMfreaK,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

homeassistant commented Jul 29, 2018

Hi @ASMfreaK,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@awarecan

Good job for first-time contributor!

Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/sensor/habitica.py
Show outdated Hide outdated homeassistant/components/sensor/habitica.py
Show outdated Hide outdated homeassistant/components/sensor/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/sensor/habitica.py
Show outdated Hide outdated homeassistant/components/sensor/habitica.py
Show outdated Hide outdated homeassistant/components/sensor/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
Show outdated Hide outdated homeassistant/components/habitica.py
@MartinHjelmare

Looks good.

@awarecan what do you think?

@MartinHjelmare MartinHjelmare changed the title from Added support for Habitica to Add support for Habitica Aug 17, 2018

@ASMfreaK

This comment has been minimized.

Show comment
Hide comment
@ASMfreaK

ASMfreaK Aug 28, 2018

Contributor

bump?

Contributor

ASMfreaK commented Aug 28, 2018

bump?

@MartinHjelmare

This comment has been minimized.

Show comment
Hide comment
@MartinHjelmare

MartinHjelmare Aug 28, 2018

Member

@ASMfreaK please solve the merge conflicts.

Member

MartinHjelmare commented Aug 28, 2018

@ASMfreaK please solve the merge conflicts.

@ASMfreaK

This comment has been minimized.

Show comment
Hide comment
@ASMfreaK

ASMfreaK Aug 28, 2018

Contributor

I've rebased PR on top of dev branch

Contributor

ASMfreaK commented Aug 28, 2018

I've rebased PR on top of dev branch

@MartinHjelmare

Since we're register a service in the habitica component, that component module need to move to a package called habitica. There also needs to be a services.yaml file in that package with service descriptions. Look at other components with services for examples.

ASMfreaK added some commits Jul 29, 2018

Added support for Habitica
Second refactoring
Moved all config to component.
Sensors are autodiscovered.
Signed-off-by: delphi <cpp.create@gmail.com>
Apply requested changes
Signed-off-by: delphi <cpp.create@gmail.com>
@MartinHjelmare

This comment has been minimized.

Show comment
Hide comment
@MartinHjelmare

MartinHjelmare Aug 28, 2018

Member

Everything else looks good.

Member

MartinHjelmare commented Aug 28, 2018

Everything else looks good.

Removed unneeded check and await.
Signed-off-by: delphi <cpp.create@gmail.com>
Moved into separate component package and added service.yaml
Signed-off-by: delphi <cpp.create@gmail.com>
@MartinHjelmare

Looks good! Can be merged when build passes.

@ASMfreaK

This comment has been minimized.

Show comment
Hide comment
@ASMfreaK

ASMfreaK Aug 28, 2018

Contributor

Should I add tests to fix coveralls?

Contributor

ASMfreaK commented Aug 28, 2018

Should I add tests to fix coveralls?

Fix coveralls
Signed-off-by: delphi <cpp.create@gmail.com>
@ASMfreaK

This comment has been minimized.

Show comment
Hide comment
@ASMfreaK

ASMfreaK Aug 29, 2018

Contributor

@awarecan @MartinHjelmare Can this pull request be merged now?

Contributor

ASMfreaK commented Aug 29, 2018

@awarecan @MartinHjelmare Can this pull request be merged now?

@MartinHjelmare MartinHjelmare merged commit 99d4879 into home-assistant:dev Aug 29, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.731%
Details

@wafflebot wafflebot bot removed the in progress label Aug 29, 2018

cyberjacob pushed a commit to cyberjacob/home-assistant that referenced this pull request Sep 4, 2018

Add support for Habitica (home-assistant#15744)
* Added support for Habitica

Second refactoring
Moved all config to component.
Sensors are autodiscovered.
Signed-off-by: delphi <cpp.create@gmail.com>

* Apply requested changes

Signed-off-by: delphi <cpp.create@gmail.com>

* Made event fire async. Made `sensors` config implicit and opt-out-style.

Signed-off-by: delphi <cpp.create@gmail.com>

* Removed unneeded check and await.

Signed-off-by: delphi <cpp.create@gmail.com>

* Moved into separate component package and added service.yaml

Signed-off-by: delphi <cpp.create@gmail.com>

* Fix coveralls

Signed-off-by: delphi <cpp.create@gmail.com>

@balloob balloob referenced this pull request Sep 17, 2018

Merged

0.78.0 #16666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment