58 Commits

Author SHA1 Message Date
G Johansson
3bf995eb71 Fix next event in workday calendar (#153465) 2025-10-02 22:17:11 +02:00
G Johansson
36dc1e938a Fix can exclude optional holidays in workday (#153082) 2025-09-27 14:40:29 +02:00
G Johansson
6aafa666d6 Add calendar to Workday (#150596) 2025-09-16 17:29:04 +02:00
G Johansson
8a2493e9d2 Use OptionsFlowWithReload in Workday (#149043) 2025-07-19 13:26:54 +01:00
G Johansson
4b8dcc39b4 Bump holidays to 0.76 (#148363) 2025-07-08 06:05:18 +02:00
Marc Mueller
a8ccf1c6fc Update pytest to 8.4.0 (#146114) 2025-06-04 08:09:19 +02:00
G Johansson
d8e3e88c63 Fix language selections in workday (#145813) 2025-05-29 15:28:54 +02:00
G Johansson
f2e4bcea19 Add subdiv aliases to workday (#133608)
* Add subdiv aliases to workday

* Fix

* Add lib test
2025-04-07 18:24:07 +02:00
Erik Montnemery
51c09c2aa4 Add test fixture ignore_translations_for_mock_domains (#139235)
* Add test fixture ignore_translations_for_mock_domains

* Fix fixture

* Avoid unnecessary attempt to get integration

* Really fix fixture

* Add forgotten parameter

* Address review comment
2025-02-25 20:10:29 +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
G Johansson
11efec49db Fix test coverage in workday (#133616) 2024-12-21 12:45:00 +01:00
Erik Montnemery
ecb3bf79f3 Revert "Add support for subentries to config entries" (#133470)
Revert "Add support for subentries to config entries (#117355)"

This reverts commit ad15786115.
2024-12-18 13:51:05 +01:00
Erik Montnemery
ad15786115 Add support for subentries to config entries (#117355)
* Add support for subentries to config entries

* Improve error handling and test coverage

* Include subentry_id in subentry containers

* Auto-generate subentry_id and add optional unique_id

* Tweak

* Update tests

* Fix stale docstring

* Address review comments

* Typing tweaks

* Add methods to ConfigEntries to add and remove subentry

* Improve ConfigSubentryData typed dict

* Update test snapshots

* Adjust tests

* Fix unique_id logic

* Allow multiple subentries with None unique_id

* Add number of subentries to config entry JSON representation

* Add subentry translation support

* Allow integrations to implement multiple subentry flows

* Update translations schema

* Adjust exception text

* Change subentry flow init step to user

* Prevent creating a subentry with colliding unique_id

* Update tests

* Address review comments

* Remove duplicaetd unique_id collision check

* Remove change from the future

* Improve test coverage

* Add default value for unique_id
2024-12-12 20:16:18 +01:00
G Johansson
767ac40685 Fix language picker in workday (#131423) 2024-11-24 11:37:29 +01:00
epenet
3c3a6dff04 Add translation checks for issue registry (#130593) 2024-11-15 15:05:04 +01:00
Erik Montnemery
c22bbc5b91 Improve IssueRegistryItemSnapshot (#127949) 2024-10-09 10:57:04 +02:00
G Johansson
92a6f231a9 Workday raise issues only to next year (#126997)
* Workday - raise issues only for current and next year

* variable
2024-09-30 13:08:58 +02:00
G Johansson
ab8e2d92c8 Add diagnostics to Workday (#126691) 2024-09-24 22:37:54 +02:00
epenet
6d212ea24e Add helper functions for repair tests (#125886)
* Expose repairs constants and function for other components

* Reorder

* Use helper methods

* Adjust core_files

* Improve

* Update test_migrate.py
2024-09-14 03:31:44 +02:00
G Johansson
0cde518a89 Allow to add optional holiday categories in workday (#121396)
* Allow to add optional holiday categories in workday

* Add tests

* Fix coverage
2024-07-19 17:49:27 +02:00
Marc Mueller
f11b316dac Import Generator from collections.abc (4) (#120917) 2024-07-01 11:54:42 +02:00
J. Nick Koston
612743077a Improve workday test coverage (#119259) 2024-06-10 20:26:52 +02:00
Tom Brien
fff2c1115d Fix workday timezone (#119148) 2024-06-08 17:53:20 +02:00
Marc Mueller
59e178df3b Import Generator from typing_extensions (5) (#118993) 2024-06-06 17:33:27 +02:00
G Johansson
51f9e661a4 Workday only update once a day (#116419)
* Workday only update once a day

* Fix tests
2024-05-01 17:11:47 +02:00
epenet
9204ccfa17 Use is in ConfigEntryState enum comparison in tests (N-Z) (#114926) 2024-04-05 17:37:00 +02:00
Joost Lekkerkerker
2ef0521d3d Use is in enum comparison in config flow tests U-Z (#114677)
* Use right enum expression U-Z

* Fix
2024-04-02 23:09:56 +02:00
Marc Mueller
87165c0d6e Add empty line after module docstring [tests t-z] (#112712) 2024-03-08 14:44:56 +01:00
G Johansson
bc45b31335 Fix repairs for remove dates in Workday (#109626) 2024-02-04 21:15:17 +01:00
G Johansson
c64c1c8f08 Workday create repair if named holiday missing (#101201) 2023-12-19 12:33:05 +01:00
Joost Lekkerkerker
ac53b78a0c Deduplicate constants A-D (#105638) 2023-12-13 14:21:44 +01:00
G Johansson
2daa94b600 Fix check_date service in workday (#105241)
* Fix check_date service in workday

* Add test
2023-12-07 20:04:39 +01:00
G Johansson
8376a6bda9 Change to language selector in Workday (#104472) 2023-11-25 10:44:15 +01:00
G Johansson
8e71086c21 Workday add languages (#103127) 2023-11-13 13:41:46 +01:00
G Johansson
b580ca6e6f Add Check date service for Workday (#97280) 2023-11-06 10:17:48 +01:00
Robert Resch
87c82fb00f Remove NONE_SENTINEL in favor of optional select in workday (#101280) 2023-10-11 13:29:42 +02:00
G Johansson
f2cf87b0b7 Remove YAML import from Workday (#101223) 2023-10-02 09:01:03 +02:00
G Johansson
7b1b189f3e Add date range to Workday (#96255) 2023-09-26 08:21:36 +02:00
G Johansson
8d50be379c Create repairs in Workday if country or province is wrong (#98753)
* Repairs workday

* fix if not province exist

* Tests repairs

* Add tests

* Finalize tests

* Fix feedback

* simplify

* Less translations
2023-09-25 08:59:15 +02:00
Scott Colby
49715f300a Allow workday sensor to be configured without a country (#93048)
* Merge branch 'dev' into workday_without_country

* ruff

* remove province check

* Remove not needed test

* Mod config flow

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-09-24 16:13:45 +02:00
G Johansson
1a4fb90897 Clean off unnecessary logger in Workday (#98741) 2023-08-21 12:03:01 +02:00
Arkadii Yakovets
7827f9ccae Update country province validation (#84463)
* Update country `province` validation.

* Run pre-commit.

* Add tests

* Mod config flow

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-08-18 21:20:04 +02:00
Franck Nijhof
34ac541493 Revert "Remove Workday YAML configuration (#94102)" (#95524) 2023-06-29 12:00:13 +02:00
G Johansson
f2cf92050a Remove Workday YAML configuration (#94102)
Remove platform yaml from workday
2023-06-12 11:27:37 +02:00
G Johansson
f74103c57e Add config flow to Workday (#72558)
* Initial commit Workday Config Flow

* Add tests

* Remove day_to_string

* new entity name, new depr. version, clean

* Use repairs for depr. warning

* Fix issue_registry moved

* tweaks

* hassfest

* Fix CI

* FlowResultType

* breaking version

* remove translation

* Fixes

* naming

* duplicates

* abort entries match

* add_suggested_values_to_schema

* various

* validate country

* abort_entries_match in option flow

* Remove country test

* remove country not exist string

* docstring exceptions

* easier

* break version

* unneeded check

* slim tests

* Fix import test

* Fix province in abort_match

* review comments

* Fix import province

* Add review fixes

* fix reviews

* Review fixes
2023-04-19 11:50:11 +02:00
G Johansson
cb6d384dba Workday cleanup (#90267)
* clean binary sensor

* fix const

* clean sensor

* Fix tests

* Clean up

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-03-27 23:11:49 +02:00
ark
eb25968b31 Add valid country tests to workday sensors (#82799)
fixes undefined
2022-11-28 22:22:57 +01:00
Matthew Gottlieb
37c841956f Allow removing workday holidays by name (#52700) 2021-07-27 20:28:04 +02:00
Franck Nijhof
65cf2fcb6f Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Peter Epley
b099726854 Add function to remove holidays from workday sensor (#41988) 2020-11-10 10:26:55 +01:00