1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-23 03:17:06 +00:00
Commit Graph

66 Commits

Author SHA1 Message Date
Maciej Bieniek
cd928d5571 Support reconfigure flow in Brother integration (#117298)
* Add reconfigure flow

* Improve config flow

* Check if it is the same printer

* Improve description

* Add tests

* Improve strings

* Add missing reconfigure_successful string

* Improve test names and comments

* Format

* Mock unload entry

* Use add_suggested_values_to_schema()

* Do not abort when another device's IP has been used

* Remove unnecessary code

* Suggested changes

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-12 17:39:44 +02:00
Marc Mueller
279483ddb0 Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
epenet
3d31af3eb4 Move entity_registry_enabled_by_default to decorator [a-p] (#118794) 2024-06-04 16:18:42 +02:00
Maciej Bieniek
c85743822a In Brother integration use SnmpEngine from SNMP integration (#118554)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-31 07:52:43 -05:00
Maciej Bieniek
826f6c6f7e Refactor tests for Brother integration (#117377)
* Refactor tests - step 1

* Remove fixture

* Refactor test_init

* Refactor test_diagnostics

* Refactor test_config_flow

* Increase test coverage

* Cleaning

* Cleaning

* Check config entry state in test_async_setup_entry

* Simplify patching

* Use AsyncMock when patching

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-19 20:41:47 +02:00
Maciej Bieniek
da42a8e1c6 Use SnmpEngine stored in hass.data by singleton in Brother integration (#117043) 2024-05-19 11:33:21 +02:00
Joost Lekkerkerker
5796b651af Use snapshot test helper in Brother (#115885) 2024-04-20 17:14:42 +02:00
Maciej Bieniek
c4e7a7af21 Use snapshot testing in Brother sensor (#115875)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-20 12:33:08 +02:00
Joost Lekkerkerker
9b41e3d124 Use is in enum comparison in config flow tests A-E (#114669) 2024-04-02 11:22:05 -10:00
Joost Lekkerkerker
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Maciej Bieniek
6191b25563 Catch TimeoutError in Brother config flow (#113593)
* Catch TimeoutError in Brother config flow

* Update tests

* Remove unnecessary parentheses

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-03-16 16:01:48 +01:00
Marc Mueller
aa16a9d707 Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller
38adfbf1a3 Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Maciej Bieniek
bccd9bd21f Bump brother library to version 4.0.0 (#111157)
* Bump library

* Update code to the new library version

* Improve diagnostics

* Fix tests

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-02-22 23:27:24 +02:00
Maciej Bieniek
845071f8f0 Add icon translations to Brother (#110128)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-02-10 12:17:53 +01:00
Maciej Bieniek
77283704a5 Bump brother library, use pysnmp-lextudio with SNMP integration (#105591) 2023-12-12 11:36:11 -10:00
Jan-Philipp Benecke
9ab1cb83d8 Update a-c* tests to use entity & device registry fixtures (#103793)
* Update a-c* tests to use entity & device registry fixtures

* Revert some changes

* Revert formatting

* retrigger CI
2023-11-12 13:45:30 -05:00
Marc Mueller
ba91aaa28d Add support for Python 3.12 (#101651) 2023-10-10 21:34:49 +02:00
J. Nick Koston
0eca433004 Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
Joost Lekkerkerker
f44215d286 Use snapshot assertion for Brother diagnostics test (#98904) 2023-08-24 11:19:16 +02:00
c0ffeeca7
da5455c454 Rename 'life' to 'lifetime' in Brother (#96815) 2023-07-18 17:52:40 +02:00
epenet
7b3a932cd9 Remove incorrect constant usage in test (#91198) 2023-04-11 10:00:17 +02:00
Maciej Bieniek
5fc103947f Add entity name translations to Brother (#90634)
* Add entity name translations

* Fix sensor name

* Update tests

* Suggested change
2023-04-01 21:39:46 -04:00
epenet
adb4414440 Add missing mock in brother config flow tests (#89354) 2023-03-08 08:43:07 +01:00
Maciej Bieniek
64e39c9c81 Bump brother to 2.2.0 (#88618) 2023-02-22 20:28:58 +01:00
epenet
807c69f621 Add type hints to integration tests (b-c) (#87698) 2023-02-08 18:08:43 +01:00
epenet
a79be493e5 Adjust hass_client type hint in integration tests (#86954)
* Adjust hass_client type hint in integration tests

* Adjust hass_client_no_auth

* Fix rebase
2023-02-02 16:29:57 -05:00
Franck Nijhof
5e81d28116 Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
Maciej Bieniek
8176400cfd Migrate attributes to separate sensors in Brother integration (#79932)
Migrate attributes to sensors
2022-10-09 14:48:01 +02:00
epenet
c5a56dab42 Apply hass-relative-import to tests (a-c) (#78728) 2022-09-19 09:48:25 +02:00
Maciej Bieniek
721fddc016 Bump brother backend library (#78072)
* Update integration for a new library

* Update tests

* Add unique_id migration

* Update integration and tests for lib 2.0.0

* Improve test coverage

* Improve typing in tests
2022-09-18 23:28:17 +02:00
Franck Nijhof
7cd68381f1 Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Maciej Bieniek
c2b484e38b Use IP address instead of hostname in Brother integration (#73556) 2022-06-16 11:43:36 +02:00
epenet
053c4428a9 Prettify json (component test fixtures) (#68892) 2022-03-30 11:37:17 +02:00
Joshua Roys
9134e5c844 Get discovered zeroconf IPv6 addresses (#65462) 2022-02-11 16:46:17 -06:00
Maciej Bieniek
9e2a8a5b09 Add diagnostics to Brother integration (#64478)
* Add diagnostics

* Suggested changes

* Fix tests
2022-01-21 17:23:42 +01:00
Josh Soref
85bafbbc21 spelling: components/brother (#64273)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-01-17 15:15:45 +01:00
Dave T
84dad5d678 Use DeviceClass Enums in brother tests (#62110) 2021-12-16 21:22:04 +01:00
Ville Skyttä
5bf67cac66 Use RegistryEntryDisabler (#60436) 2021-12-15 23:25:40 +02:00
Maciej Bieniek
970df6d067 Move sensor stuff to the sensor platform in Brother integration (#60306) 2021-11-24 22:50:35 +01:00
epenet
1d3fbc93a0 Update ZeroconfServiceInfo in tests (a-f) (#60212)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-23 09:32:58 -06:00
epenet
b3ffc1e183 Adjust async_step_zeroconf signature for strict typing (#59503)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-15 18:05:45 +01:00
epenet
ab1e14204f Rename zeroconf service info (#59467)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-10 15:26:47 +01:00
epenet
2b22d635d9 Use zeroconf HaServiceInfo in tests (A-D) (#58836)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-02 12:27:31 -05:00
Paulus Schoutsen
31153ac155 Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Maciej Bieniek
85c6942f55 Bump brother library to version 1.1.0 (#57892) 2021-10-17 00:12:35 -10:00
J. Nick Koston
0dcb8ca270 Avoid probing brother devices that have an existing config entry (#57829) 2021-10-16 14:52:10 -07:00
Maciej Bieniek
0404acddf9 Add support for state_class (#51512) 2021-06-10 21:31:21 +03:00
Ville Skyttä
19d25cd901 Change config entry state to an enum (#49654)
* Change config entry state to an enum

* Allow but deprecate EntryState str equality comparison

* Test fixes

* Rename to ConfigEntryState

* Remove str comparability backcompat

* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
Maciej Bieniek
39e8a92596 Remove unused code from Brother config flow (#49889) 2021-04-30 16:41:55 +02:00