Commit Graph

66 Commits (03f6508bd89f41eee089634739b0581be5849669)

Author SHA1 Message Date
Manu 9ec9110e1e
Rename description field to notes in Habitica action (#139271) 2025-02-25 17:03:31 +01:00
Manu 2509353221
Add update reward action to Habitica integration (#139157) 2025-02-25 13:40:21 +01:00
Manu 2e5f56b70d
Refactor to-do list order and reordering in Habitica (#138566) 2025-02-24 16:36:20 +00:00
Manu 059a6dddbe
Fix off by one bug when sorting tasks in Habitica integration (#138993)
* Fix off-by-one bug when sorting dailies and to-dos in Habitica

* Add test
2025-02-21 09:39:24 -06:00
Manu 7bd2c1d710
Refactor and add tests to image platform of Habitica (#135897) 2025-02-14 15:20:19 +00:00
Manu e71f8c444b
Add user profile info to Habitica sensor and device URL (#137152)
Add user profile attributes to Habitica sensor and device URL
2025-02-11 11:41:11 +01:00
Manu dc07f72fc2
Bump habiticalib to v0.3.7 (#137993)
* bump habiticalib to 0.3.6

* bump to v0.3.7
2025-02-10 20:37:54 +01:00
Erik Montnemery 4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Improve docstrings and strings.json

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
Manu c4454ad5ea
Bump habiticalib to v0.3.5 (#137510) 2025-02-06 08:32:56 +01:00
Manu d55a6de01b
Bump habiticalib to v0.3.4 (#137148)
Bump habiticalib to version 0.3.4
2025-02-02 10:08:14 +02:00
Manu ff80a7c5bc
Add reconfiguration flow to Habitica (#136038) 2025-01-20 09:25:45 +01:00
Manu ec45cb4939
Improve exception handling in Habitica integration (#135950) 2025-01-19 19:51:55 +01:00
Manu f5dd3ef530
Increase test coverage in Habitica integration (#135896)
Add tests to Habitica integration
2025-01-18 12:59:23 +01:00
Manu 526277da0f
Add entity pictures to Habitica integration (#134179) 2025-01-14 15:23:22 +01:00
Manu 0c144092c6
Bump habiticalib to v.0.3.3 (#135551) 2025-01-14 10:07:23 +01:00
Manu cdcc7dbbe8
Deprecate sensors in Habitica integration (#134036)
* Deprecate sensors

* move to setup, remove disabled

* changes

* add breaking version to string

* fixes

* fix entity id in tests
2025-01-13 18:35:14 +01:00
Manu 4dbf2b0320
Fix grey dailies with weekly frequency and no weekdays selected in Habitica (#135419) 2025-01-13 13:20:15 +01:00
Manu 0d85f54e76
Add sensors for inventory items to Habitica (#135331)
Add sensors for inventory items
2025-01-11 21:31:36 +01:00
Manu bf747bb733
Fix Habitica gems/hourglass sensors (#135323) 2025-01-10 23:47:05 +02:00
Manu 9320ccfa4f
Remove deprecated sensors in Habitica integration (#134320)
* Remove deprecated sensors

* remove todos/dailies also from enum
2025-01-03 14:48:26 +01:00
Manu 5726d090b0
Add get_tasks action to Habitica integration (#127687)
Add get_tasks action
2025-01-03 11:53:30 +01:00
Manu b45c68554c
Remove habitipy references in Habitica integration (#134419) 2025-01-02 10:47:40 +01:00
Manu 9804e8aa98
Add reauth flow to Habitica integration (#131676)
* Add reauth flow to Habitica integration

* tests, invalid_credentials string

* test only api_key

* section consts

* test config entry

* test reauth is triggered

* set reauthentication-flow to done

* use consts in tests

* reauth_entry

* changes

* fix import

* changes
2024-12-29 21:12:36 +01:00
Manu 0db07a033b
Migrate Habitica integration to habiticalib (#131032)
* Migrate data to habiticalib

* Add habiticalib to init and coordinator

* Migrate Habitica config flow to habiticalib

* migrate init to habiticalib

* migrate buttons to habiticalib

* migrate switch to habiticalib

* update habiticalib

* cast_skill action

* migrate update_score

* migrate transformation items action

* migrate quest actions

* fix fixture errors

* Migrate coordinator data and content

* bump habiticalib

* Remove habitipy and use wrapper in habiticalub

* changes

* some fixes

* minor refactoring

* class_needed annotation

* Update diagnostics

* do integration setup in coordinator setup

* small changes

* raise HomeAssistantError for TooManyRequestsError

* fix docstring

* update tests

* changes to tests/snapshots

* fix update_todo_item
2024-12-29 15:00:31 +01:00
Manu 9ca9e787b2
Add tests for Habitica integration (#131780)
* Add tests for Habitica integration

* update iqs
2024-12-17 09:07:18 +01:00
Manu 2edcda47b0
Add diagnostics platform to Habitica (#131489) 2024-11-26 20:02:01 +01:00
Manu c9ede11b1f
Add entity picture for mystic hourglasses to Habitica (#131428) 2024-11-24 11:31:32 +01:00
Manu e6715fd4d7
Fix errors in fixtures and tests (#131388)
* Fix errors in fixtures and tests

* stale function name
2024-11-23 10:44:40 -08:00
Manu 5daf95ec8f
Add calendars for to-do and daily reminders to Habitica integration (#130789)
* Add calendars for to-do and daily reminders

* revert order

* changes
2024-11-19 18:37:23 -08:00
Manu e9eaeedf2b
Add entity picture for gems to Habitica integration (#130827) 2024-11-18 10:52:23 +01:00
Manu e26142949d
Add action for using transformation items to Habitica (#129606) 2024-11-15 17:38:30 +01:00
Manu 0677bba5bd
Add actions for scoring habits and rewards in Habitica (#129605) 2024-11-10 12:26:07 +01:00
Manu 5d0277a0d1
Add actions for quest handling to Habitica (#129650) 2024-11-09 19:34:25 +01:00
Manu c10f078f2a
Add sensors for attribute points (str, int, per, con) to Habitica (#130186) 2024-11-09 16:04:10 +01:00
Manu 1f43dc6676
Fix cast skill test in Habitica (#130213) 2024-11-09 13:12:04 +01:00
Manu 4e2f5bdb7d
Add tests for cast skill action in Habitica (#129596) 2024-11-09 12:45:50 +01:00
Manu 27e81fe0ed
Improve error messages in Habitica (#129948)
Improve error messages
2024-11-06 13:23:43 +01:00
Manu 9253fa4471
Add binary sensor platform to Habitica integration (#129613)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-11-05 17:01:38 +01:00
Manu f5a2ec961d
Remove unused snapshots from Habitica (#129499) 2024-10-30 15:44:21 +01:00
Manu 6887a4419e
Add calendar platform to Habitica integration (#128248)
* Add calendar platform

* Add tests

* add missing reminders filter by date

* Add +1 day to todo end

* add 1 day to dailies, remove unused line of code

* Removing reminders calendar to a separate PR

* fix upcoming event for dailies

* util function for rrule string

* Add test for get_recurrence_rule

* use habitica daystart and account for isDue flag

* yesterdaily is still an active event

* Fix yesterdailies and add attribute

* Update snapshot

* Use iter, return attribute with None value

* various changes

* update snapshot

* fix merge error

* update snapshot

* change date range filtering for todos

* use datetimes instead of date in async_get_events

* Sort events

* Update snapshot

* add method for todos

* filter for upcoming events

* dailies

* refactor todos

* update dailies logic

* dedent loops
2024-10-29 20:53:49 -07:00
Manu e602a464db
Add tests for buttons in Habitica integration (#128194)
* Add tests for button platform

* update tests

* Add skill buttons

* Assert state, add fixtures/parametrization

* entity as list
2024-10-29 19:03:41 +01:00
Manu c264ee22e7
Add tests for switch platform of Habitica integration (#128204) 2024-10-29 14:08:05 +01:00
Manu fdded9e7ee
Add tests for todo platform of Habitica integration (#128199)
* Add tests for todo platform

* refactor mock_called_with

* update tests
2024-10-26 10:48:07 -07:00
Manu 8665f4a251
Refactor services setup in Habitica integration (#128186) 2024-10-25 11:00:58 +02:00
Manu 8540343d7f
Add tests for Habitica integration (#126445)
* Add tests for sensor platform

* Add tests for switch platform

* Add tests for button platform

* Add tests for todo platform

* Add tests for todo platform

* Load json data fixtures

* Update snapshot

* Add fixtures

* test move todo

* parametrize todo tests, test drop notification

* test todo exceptions

* some minor improvements

* test setup retry

* Test update failed

* Test coordinator rate limit

* Test date utils

* Reduce scope of PR

* remove unused assert_mock_called_with  function

* update snapshot

* Update tests/components/habitica/test_init.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-10-11 20:03:23 +02:00
Manu fa53ec40d6
Remove deprecated yaml import from Habitica (#127946) 2024-10-09 11:17:19 +02:00
Mr. Bubbles b787c2617b
Revert "Fix missing id in Habitica completed todos API response" (#126142)
Revert "Fix missing id in Habitica completed todos API response (#124565)"

This reverts commit c9e7c76ee5.
2024-09-19 10:59:54 +02:00
Mr. Bubbles 50577883dc
Add option to login with username/email and password in Habitica integration (#117622)
* add login/password authentication

* add advanced config flow

* remove unused exception classes, fix errors

* update username in init

* update tests

* update strings

* combine steps with menu

* remove username from entry

* update tests

* Revert "update tests"

This reverts commit 6ac8ad6a26547b623e217db817ec4d0cf8c91f1d.

* Revert "remove username from entry"

This reverts commit d9323fb72df3f9d41be0a53bb0cbe16be718d005.

* small changes

* remove pylint broad-excep

* run habitipy init in executor

* Add text selectors

* changes
2024-08-30 17:08:06 +02:00
Mr. Bubbles c9e7c76ee5
Fix missing id in Habitica completed todos API response (#124565)
* Fix missing id in completed todos API response

* Copy id only if none

* Update homeassistant/components/habitica/coordinator.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-08-25 15:15:47 +02:00
Mr. Bubbles 751935539a
Migrate Habitica Dailies and To-Do's to the todo platform (#116655)
* Add todo platform

* update for DataUpdateCoordinator

* set lastCron as dailies due date

* parse alternative duedate format

* fix tests

* send notification on item drop

* fix drop message

* update exception messages

* Simplified the update of user_fields by using set union

* move userFields to const

* Issue deprecation only if entity is acutally used

* Resolve issues

* user entity registry to get entity_id

* raise ServiceValidationError

* requested changes

* Move next_due_date helper function to util.py module

* some changes

* Move function to util.py
2024-07-07 17:50:27 +02:00