Commit Graph

16 Commits

Author SHA1 Message Date
karwosts
57c024449c Fix broken invalid_config tests (#148965) 2025-07-18 09:02:44 +02:00
Richard Kroegel
71e28a4af3 Add service to retrieve schedule configuration (#121904) 2025-02-03 14:41:25 +00:00
Andy Castille
d7cf05e693 Allow attaching additional data to schedule helper blocks (#116585)
* Add a new optional "data" key when defining time ranges for the schedule component that exposes the provided data in the state attributes of the schedule entity when that time range is active

* Exclude all schedule entry custom data attributes from the recorder (with tests)

* Fix setting schedule attributes to exclude from recorder, update test to verify the attributes exist but are not recorded

* Fix test to ensure schedule data attributes are not recorded

* Use vol.Any in place of vol.Or

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Remove schedule block custom data shorthand
as requested in https://github.com/home-assistant/core/pull/116585#pullrequestreview-2280260436

* Update homeassistant/components/schedule/__init__.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-11 20:11:06 +02:00
Marc Mueller
a6068dcdf2 Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
epenet
1317837986 Improve type hints in tests (q-z) (#118381) 2024-05-30 08:48:02 +02:00
epenet
e58d060f82 Use registry fixtures in tests (s) (#118295) 2024-05-28 15:41:03 +02:00
Sid
00ec7f11f0 Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Marc Mueller
7d6251ca08 Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
epenet
71dc98a39c Improve hass_ws_client type hint in tests (#89703) 2023-03-14 16:31:40 +01:00
Franck Nijhof
ed79265843 Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
Erik Montnemery
8bab2a9bea Tweak schedule test (#77696) 2022-09-02 08:39:27 +02:00
amitfin
32e4a2515e Time range should be treated as open ended (#77660)
* Time range should be treated as open end

* Refactored the logic of calculating the state

* Improve tests

* Improve tests

Co-authored-by: Erik <erik@montnemery.com>
2022-09-02 08:14:06 +02:00
Erik Montnemery
d0375959fd Add additional test to schedule (#77601) 2022-08-31 15:19:50 +02:00
Erik Montnemery
7c5a5f86ee Allow setting to-time in schedule to 24:00 (#77558) 2022-08-30 15:54:31 -04:00
Erik Montnemery
cac4015882 Fix schedule during single weekday (#77543) 2022-08-30 08:14:46 -04:00
Franck Nijhof
f0827a20c3 Add schedule helper (#76566)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-08-11 16:14:01 +02:00