Commit Graph
9 Commits
Author SHA1 Message Date
corneylandAllen Porter 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
corneyl 137793c067 Add sensors for next Picnic deliveries (#66474) 2022-02-21 23:45:30 +01:00
Hmmbob ec75b0caf0 Add Picnic last_order_max_order_time sensor (#63169) 2022-01-04 18:41:31 +01:00
corneyl b0704c190f Fix picnic sensor time unit (#62437) 2021-12-27 17:44:45 +01:00
Robert Hillis 42fab1bb51 Use enums in picnic (#62065) 2021-12-16 15:36:38 +01:00
Marc Mueller 954bd49849 Rename state to value_fn - picnic sensor (#56889) 2021-10-01 15:21:43 +02:00
Marc Mueller 565a9fea6b Import Callable from collections.abc (2) (#56776) 2021-09-29 14:06:51 +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
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