Commit Graph

35 Commits (7e11fec761dcdc108cd8e355c4f19d1a79d50270)

Author SHA1 Message Date
Joost Lekkerkerker f3ba713289
Use FlowResultType enum in config flow tests N-Z (#114682)
Use FlowResultType enum in config flow tests
2024-04-03 09:53:20 +02:00
Joost Lekkerkerker ee66f6ec8c
Use is in enum comparison in config flow tests P-T (#114675) 2024-04-02 11:21:50 -10:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Marc Mueller 2ef2172b01
Convert test helpers to get hass instance to contextmanagers (#109990)
* Convert get_test_home_assistant helper to contextmanager

* Convert async_test_home_assistant helper to contextmanager

* Move timezone reset to async_test_home_assistant helper
2024-02-11 21:23:51 +01:00
Ville Skyttä 24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080)
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
Joost Lekkerkerker e4453ace88
Add country code constant (#105640) 2023-12-13 16:50:46 +01:00
Duco Sebel 1727c19e0d
Address review comments for Picnic (#104732) 2023-11-29 18:35:55 +01:00
Duco Sebel 62473936e2
Allow adding items Picnic shopping cart by searching (#102862)
Co-authored-by: Robert Resch <robert@resch.dev>
2023-11-24 13:06:32 +01:00
Duco Sebel af15aab35e
Add Picnic shopping cart as Todo list (#102855)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Allen Porter <allen.porter@gmail.com>
2023-11-22 08:40:19 +01:00
Joost Lekkerkerker 3f88c518a5
Use translated name for entity id for Picnic (#97230) 2023-10-22 21:39:01 +02:00
Joost Lekkerkerker a65ad37c8b
Change config entry title to Picnic (#102221) 2023-10-18 14:27:37 +02:00
Ville Skyttä 940942a74a
Import `util.dt` as `dt_util` in `components/[p-s]*` (#93761) 2023-05-30 00:09:42 +03:00
Joost Lekkerkerker a272f8dfb2
Move picnic sensor definitions (#91367)
* Move types and mixin to sensor

* Move types and mixin to sensor
2023-04-13 16:46:10 +02:00
epenet 2cdc741900
Add type hints to integration tests (part 17) (#88163) 2023-02-15 11:14:04 +01:00
epenet 3abf7ea18a
Add type hints to integration tests (m-p) (#87705) 2023-02-08 07:48:54 -08:00
corneyl a848dc1155
Add service for adding products to a Picnic order (#67877)
* Add Picnic services for searching products and adding products to the cart

* Improve the Picnic services implementation and add unit tests

* Fix pre-commit check issues

* Fix comments and example product name

* Remove search service, update add_product service schema

* Fix pylint suggestion

* Add more tests and removed unused code

* Remove code needed for the removed service, clean tests from obvious comments and add type hints

* Remove unused import

* Remove unnecessary comments and simplify getting the config entry id

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* Don't use hass.data in tests, make device id mandatory for service

* Rewrite all service tests so using lru.cache is not needed

* Add test for uncovered line in _product_search()

* Require a config entry id as service parameter instead of device id

* Use explicit check in get_api_client() and raise HomeAssistantError

* Fix HomeAssistantError import, fix services tests

* Change HomeAssistantError to ValueError when config entry is not found

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2022-11-12 20:15:45 -08:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Franck Nijhof c3d19f3827
Clean up accessing device_registry helpers via hass (#72031) 2022-05-17 12:22:15 -07:00
Franck Nijhof 69cc6ab5f1
Clean up accessing entity_registry.async_get_registry helper via hass (#72005) 2022-05-17 16:40:45 +02:00
corneyl 137793c067
Add sensors for next Picnic deliveries (#66474) 2022-02-21 23:45:30 +01:00
corneyl 17a732197b
Add Picnic re-auth flow (#62938)
* Add re-auth handler for Picnic

* Extracted authentication part so right form/errors can be shown during re-auth flow

* Add tests for Picnic's re-authentication flow

* Simplify re-auth flow by using the same step as step_user

* Use user step also for re-auth flow instead of having an authenticate step

* Add check for when re-auth is done with different account

* Remove unnecessary else in Picnic config flow

* Fix the step id in the translation strings file
2022-02-12 08:15:36 -08:00
Marc Mueller ef7316d8d9
Update typing (5) [tests] (#63926) 2022-01-11 21:28:13 +01:00
Hmmbob ec75b0caf0
Add Picnic last_order_max_order_time sensor (#63169) 2022-01-04 18:41:31 +01:00
corneyl 7fc5605639
Fix keyerror when no previous Picnic orders exist (#62870) 2021-12-27 20:31:35 +01:00
corneyl b0704c190f
Fix picnic sensor time unit (#62437) 2021-12-27 17:44:45 +01:00
Dave T d7de3fbfce
Use new enums in picnic tests (#62549) 2021-12-22 14:29:55 +01:00
Ville Skyttä 39691faccc
Use DeviceEntryType in non-typechecked code too (#58646) 2021-11-23 10:04:33 +01:00
Franck Nijhof 69b7495324
Sensor: Handle local->UTC conversion and reject timezoneless timestamps (#59971) 2021-11-22 17:04:06 +01:00
Franck Nijhof 01efe1eba2
Add datetime object as valid StateType (#52671)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-18 14:11:44 +01:00
Franck Nijhof e94bebdf7b
Migrate attribution attribute for Picnic (#57507) 2021-10-11 20:39:51 -07:00
Paulus Schoutsen a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Marc Mueller ce6921d73c
Use EntityDescription - picnic (#55682)
* Use EntityDescription - picnic

* Change _attr_extra_state_attributes to be static

* Fix tests
2021-09-03 22:35:59 +02:00
Franck Nijhof c68b259bd3
Cleanup of unused connection_class logic (#49865)
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-04-29 23:12:58 +02:00
corneyl 303ab36c54
Add Picnic integration (#47507)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: @tkdrob <tkdrob4390@yahoo.com>
2021-04-21 22:21:56 -07:00