Commit Graph

19 Commits (670e5a2eae0a49ffd0552b7171bac9f2b363b20f)

Author SHA1 Message Date
Allen Porter 25650563fe
Fix Rainbird unique to use a more reliable source (mac address) (#101603)
* Fix rainbird unique id to use a mac address for new entries

* Fix typo

* Normalize mac address before using as unique id

* Apply suggestions from code review

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

* Update test check and remove dead code

* Update all config entries to the new format

* Update config entry tests for migration

* Fix rainbird entity unique ids

* Add test coverage for repair failure

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Remove unnecessary migration failure checks

* Remove invalid config entries

* Update entry when entering a different hostname for an existing host.

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-11-12 08:36:30 +01:00
Allen Porter e8c568a243
Remove rainbird yaml config test fixtures (#103607) 2023-11-07 23:24:34 +01:00
Allen Porter 8c2a2e5c37
Additional fix for rainbird unique id (#101599)
Additiona fix for rainbird unique id
2023-10-07 10:17:08 -07:00
Allen Porter 920bd04099
Fix for rainbird unique id (#101512) 2023-10-06 09:16:06 +02:00
Allen Porter 2d58ab0e1c
Fix rainbird entity unique ids (#101168)
* Fix unique ids for rainbird entities

* Update entity unique id use based on config entry entity id

* Update tests/components/rainbird/test_binary_sensor.py

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

* Rename all entity_registry variables

* Shorten long comment under line length limits

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-10-01 08:12:44 -07:00
Allen Porter fa2d77407a
Add Rain Bird irrigation calendar (#87604)
* Initial version of a calendar for the rainbird integration

* Improve calendar support

* Revert changes to test fixtures

* Address ruff error

* Fix background task scheduling

* Use pytest.mark.freezetime to move to test setup

* Address PR feedback

* Make refresh a member

* Merge rainbird and calendar changes

* Increase test coverage

* Readability improvements

* Simplify timezone handling
2023-09-25 20:27:38 -04:00
Allen Porter 8d8c7187d3
Fix rainbird unique id (#99704)
* Don't set a unique id for devices with no serial

* Add additional check for the same config entry host/port when there is no serial

* Update homeassistant/components/rainbird/config_flow.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Update tests/components/rainbird/test_config_flow.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Update tests/components/rainbird/test_config_flow.py

Co-authored-by: Robert Resch <robert@resch.dev>

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2023-09-23 23:14:57 +02:00
Marc Mueller 063ce9159d
Use asyncio.timeout [o-s] (#98451) 2023-08-15 17:21:49 +02:00
Allen Porter 9ddf11f6cd
Improve rainbird error handling (#98239) 2023-08-14 13:32:08 +02:00
Erik Montnemery 7539cf25be
Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Allen Porter 32b3fa1734
Enable retries on rainbird devices by loading model and version (#96190)
Update rainbird to load device model and version
2023-07-09 16:49:44 -07:00
Joost Lekkerkerker d2bcb5fa87
Add entity translations to Rainbird (#96030)
* Add entity translations to Rainbird

* Add entity translations to Rainbird
2023-07-06 16:03:01 -07:00
G Johansson e41a75f617
Remove yaml import rainbird (#92599) 2023-05-05 16:53:40 +02:00
G Johansson 835be4758a
Remove deprecated service for rainbird (#92601) 2023-05-05 07:22:07 -07: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
Franck Nijhof 6551eb168d
Add common area, device, entity and issue registry test fixtures (#87694) 2023-02-08 16:28:44 +01:00
Allen Porter 09891ead8d
Add rainbird rain delay number entity, deprecating the sensor and service (#86208)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-24 21:16:52 +01:00
Allen Porter 5000c426c6
Add config flow for Rain Bird (#85271)
* Rainbird config flow

Convert rainbird to a config flow. Still need to handle irrigation numbers.

* Add options for irrigation time and deprecate yaml

* Combine exception handling paths to get 100% test coverage

* Bump the rainird config deprecation release

* Apply suggestions from code review

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

* Remove unnecessary sensor/binary sensor and address some PR feedback

* Simplify configuration flow and options based on PR feedback

* Consolidate data update coordinators to simplify overall integration

* Fix type error on python3.9

* Handle yaml name import

* Fix naming import post serialization

* Parallelize requests to the device

* Complete conversion to entity service

* Update homeassistant/components/rainbird/switch.py

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

* Update homeassistant/components/rainbird/config_flow.py

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

* Remove unused import

* Set default duration in options used in tests

* Add separate devices for each sprinkler zone and update service to use config entry

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-07 09:34:01 -08:00
Allen Porter 490d2cfb71
Move Rainbird to async client library (#84417)
* Bump pyrainbird to 0.7.0 and move to async library

* Share updates across sensors

* Fix test version and delete dead code

* Add test coverage for yaml configuration

* Address PR feedback
2022-12-22 13:00:17 -08:00