Commit Graph

97 Commits (6423501498cedc6a11bed9e9a07fde0d3426379b)

Author SHA1 Message Date
Erik Montnemery 426f73b1f4
Add State.last_reported (#113511)
* Add State.last_reported

* Update tests

* Update test snapshots

* Call state_reported listeners when firing state_changed event

* Add tests
2024-03-20 21:05:07 +01:00
epenet 3844ade572
Fix unknown values in onewire (#113731)
* Fix unknown values in onewire

* Update tests
2024-03-18 10:12:46 +01:00
Sid fe9cc6705c
Add ruff rule PIE804 (#113620)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-16 12:45:18 -10:00
Sid ccd2e989c3
Enable ruff RUF005 and fix occurrences (#113589) 2024-03-16 07:37:20 -10:00
Joost Lekkerkerker e6a692f354
Improve lists in integrations [N-O] (#113231) 2024-03-13 21:51:38 +01:00
definitio 6f19744469
Add A6 family code for DS2438 1-Wire sensor (#112844)
* Add A6 family code for DS2438

* Add tests

* Fix switch

* Apply code review suggestion

* Add comments
2024-03-12 08:06:02 +01:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Franck Nijhof e0a9dcd996
Add label registry (#110821) 2024-02-19 11:59:08 +01:00
J. Nick Koston 8282018260
Migrate onewire to use async_update_entry to alter config entries (#110413) 2024-02-12 15:29:50 -06:00
Jan Rieger a584429ce0
Use translation placeholders in 1-Wire (#109120) 2024-02-02 12:37:23 +01:00
Erik Montnemery 1621310ba7
Add serial_number to device registry entries (#102334)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-10-22 15:14:44 +02:00
J. Nick Koston 433c022687
Save previous unique id in entity registry when it changes (#102093) 2023-10-16 21:26:19 -10:00
Joost Lekkerkerker 54ed8fc914
Use device class translations for 1-wire (#98813) 2023-08-24 22:19:29 +02:00
epenet 7dfbfd45ae
Cleanup onewire tests (#92117) 2023-04-29 11:18:16 +02:00
epenet 7801eeb063
Use snapshot in onewire diagnostics tests (#92112) 2023-04-27 13:34:13 +02:00
epenet aac750a44f
Improve TAI8570 ignore tests in onewire (#92113)
Improve TAI8570 tests in onewire
2023-04-27 13:33:30 +02:00
epenet 60d7ea6f0d
Use SnapshotAssertion in 1-wire tests (#90782) 2023-04-22 17:22:05 +02:00
epenet 2d1bb6135c
Use entity name translations in 1-wire (#90696)
* Use entity name translations in onewire

* Adjust binary sensors

* Adjust switches

* Cleanup
2023-04-03 13:07:02 -04:00
epenet c06ec1f78f
Improve onewire test coverage (#90184) 2023-03-26 23:46:52 +02:00
epenet ff8b91aeea
Add freezer to known test fixtures in pylint (#89825)
Add freezer to known fixtures in pylint
2023-03-16 22:39:41 -04:00
epenet 71dc98a39c
Improve hass_ws_client type hint in tests (#89703) 2023-03-14 16:31:40 +01:00
Paulus Schoutsen d6a223f0e1
Await block till done inside patched config entry in tests (#89515) 2023-03-10 06:42:53 -10:00
epenet bf5f7c53d8
Move mock_setup_entry to conftest (#88484) 2023-03-06 11:31:50 +01:00
epenet 88444b2e0c
Add type hints to integration tests (part 16) (#88008) 2023-02-15 10:50:02 +01:00
Erik Montnemery cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
epenet 678d1e367d
Refactor onewire options flow tests (#87711) 2023-02-09 11:52:26 +01:00
Franck Nijhof 330e1c6cbb
Clean up unnecessary registry mocks from integration tests (#87763) 2023-02-09 10:43:45 +01:00
epenet 2f3b509513
Refactor onewire options flow (#87162)
* Refactor onewire options flow

* Adjust

* Apply suggestions from code review

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

* Use async_entries_for_config_entry

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-02-05 01:18:20 +01:00
epenet 783e6fdd36
Ignore TAI8570 errors in onewire (#87154) 2023-02-03 09:11:54 -05:00
Michael 72d3fa6d89
Replace the usage of unit constants by enumerations in Tests [o-r] (#85936) 2023-01-15 14:50:24 +01:00
epenet 3737170d37
Improve onewire tests (#85064) 2023-01-03 17:32:39 +01:00
Franck Nijhof a6244eea28
Search/replace RESULT_TYPE_* by FlowResultType enum (#74656) 2022-07-07 21:28:18 +02:00
epenet ca5f13b576
Allow removing a onewire device (#72710) 2022-05-31 10:40:08 +02:00
epenet 08856cfab0
Remove 1-Wire SysBus (ADR-0019) (#71232) 2022-05-09 13:16:23 +02:00
Per Öberg cfed1ff799
Add config flow for selecting precision of DS18B20 devices (#64315)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-03 11:41:59 -08:00
epenet 8234625d30
Use Domain not Platform on test service calls (#65508)
* Adjust atag

* adjust broadlink

* Adjust onewire

* Adjust plex

* Adjust renault

* Adjust tasmota

* Adjust zha

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-03 14:16:35 +01:00
epenet d0d55db936
Add diagnostics support to onewire (#65131)
* Add diagnostics support to onewire

* Add tests

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-28 19:00:47 +02:00
Per Öberg 81000db713
Add support for DS2760 1-Wire TypeK Thermocouple (#63222)
* Add support for DS2760 1-Wire TypeK Thermocouple

* Add test mockup sensor for DS2760 to tests

* Add support for changing of thermocouple type through override_key

* Fix broken test for DS2760 Thermocouple

* Remove unnecessary test-attribute for DS2760 Thermocouple

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-01-25 13:53:37 +01:00
epenet 24e27290b5
Drop deprecated CONF_NAMES from onewire (#61094)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-02 17:10:19 +01:00
epenet 7f823f7211
Fix OwnetError preventing onewire initialisation (#61696)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-16 14:06:38 +01:00
Ville Skyttä 5bf67cac66
Use RegistryEntryDisabler (#60436) 2021-12-15 23:25:40 +02:00
Tim Rightnour 489d85d862
Add Onewire diagnostic and config switches and binary_sensors (#59309)
* Onewire: Add diagnostic and config switches and binary_sensors
This commit adds diagnostic and config switches and binary_sensors to
the HobbyBoards devices.  With these, the user will be able to configure
those devices, without having to run owwrite/owread commands outside
of HA.

* Address review from @epenet

* Add HB_HUB to DEVICE_SUPPORT_OWSERVER

* Device class and entity category enums

* Fixup merge breakage

* Remove duplicate lines
2021-12-07 13:59:43 +01:00
epenet 231d434b76
Use new Platform enum in Onewire (#60904)
* Use new Platform enum in Onewire

* Use Platform in tests

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-03 09:25:22 -08:00
epenet adf2fa5664
Use EntityCategory enum in Onewire (#60907)
* Use EntityCategory enum in Onewire

* Add checks for the entity_category

* Fix typo

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-03 09:20:00 -08:00
epenet 5c992ec2cc
Remove cleanup_registry from onewire (#60546)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-01 18:38:07 +01:00
epenet 3eba575fde
Use state class enum for Onewire (#60770)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-01 17:42:08 +01:00
epenet 7363033ada
Use device class enum in Onewire (#60766)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-01 17:33:26 +01:00
JumpmanJunior d9f3cff606
Fix IAD and vis for DS2438 1wire sensor (#59126)
* Fix vis and IAD for DS2438

* Fix IAD and vis for DS2438

* Fix IAD and vis for DS2438

* Fix IAD and vis for DS2438

* Fix IAD and vis for DS2438

* Fix IAD and vis for DS2438

* Fix IAD and vis for DS2438

* Fix IAD and vis for DS2438

* Fix IAD and vis for DS2438
2021-11-14 17:30:03 +01:00
Tim Rightnour 93395f9b68
Add support for PRESSURE_CBAR (centibars) (#58762)
* Add support for PRESSURE_CBAR (centibars).  This is the standard UOM for tensiometers.

While the data could be converted into something like MBAR, and displayed
like that, the correct UOM for this type of sensor is CBAR.  Displaying
it as MBAR would be the same as displaying air pressure as feet of Hg, while
technically correct, it's hard to understand when reading.

Adding support for this UOM will fix errors in the UI(statistics) about the unit not
matching a unit of the device_class.

* Add tests for PRESSURE_CBAR
2021-11-10 09:44:05 +01:00