39 Commits

Author SHA1 Message Date
moritzthecat
eca93f1f4e
Add DS2450 to onewire integration (#136882)
* add DS2450 to onewire integration

* added tests for DS2450 in const.py

* Update homeassistant/components/onewire/sensor.py

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

* spelling change voltage -> Voltage

* use translation key

* tests run after en.json edited

* Update homeassistant/components/onewire/strings.json

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

* naming convention adapted

* Update homeassistant/components/onewire/sensor.py

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

* adatpt owfs namings to HA namings. volt -> voltage

* Apply suggestions from code review

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2025-01-30 17:33:41 +01:00
epenet
c4ac648a2b
Add select platform to onewire (#135181)
* Add select platform to onewire

* Add tests

* Apply suggestions from code review
2025-01-09 12:45:49 +01:00
epenet
f05e234c30
Refactor patching in onewire tests (#135070) 2025-01-08 15:14:51 +01:00
epenet
c1572d9600
Handle invalid device type in onewire (#116153)
* Make device type optional in onewire

* Add comment
2024-04-27 09:26:26 +02:00
epenet
3844ade572
Fix unknown values in onewire (#113731)
* Fix unknown values in onewire

* Update tests
2024-03-18 10:12:46 +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
1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
epenet
7dfbfd45ae
Cleanup onewire tests (#92117) 2023-04-29 11:18:16 +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
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
Michael
72d3fa6d89
Replace the usage of unit constants by enumerations in Tests [o-r] (#85936) 2023-01-15 14:50:24 +01: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
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
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
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
epenet
7e81c6a591
Move onewire device compatibility checks (#59338)
* Move device compatibility checks to onewirehub

* Add test for dtoverlay warning

* Add tests for unknown device warning

* Move dtoverlay error

* Empty commit to retrigger tests

* Update description

* Patch asyncio.sleep to speed up the tests

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-09 18:30:05 +01:00
epenet
b85217c62e
Adjust onewire device model (#58516)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-27 12:19:55 -05:00
epenet
8017a1e141
Adjust onewire device manufacturer (#58515)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-27 12:02:07 +02:00
epenet
42793927f7
Use ATTR_VIA_DEVICE constant in onewire tests (#58405)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-25 09:42:40 -04:00
epenet
c00a5fad8f
Cleanup device registration in Onewire (#58101)
* Add checks for device registry

* Move registry checks to init.py

* Run device registry check on disabled devices

* Empty commit for testing

* Register devices during initialisation

* Adjust tests accordingly

* Add via_device to device info

* Adjust access to device registry

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-22 11:45:40 +02:00
epenet
dfd2501c2c
Cleanup duplicate code in Onewire tests (#58082)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-20 11:43:59 +02:00
epenet
1b0118a81b
Use constants in Onewire tests (#58017)
* Use ATTR_ENTITY_ID constant

* Add ATTR_UNIQUE_ID constant

* Add new attribute constants

* Fix missing ATTR_DEFAULT_DISABLED

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-19 21:41:01 +02:00
epenet
29c062fcc4
Rework Onewire tests to enable disabled entities (#58014)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-19 09:10:26 +02:00
Steffen Ronalter
49b07224bf
Add onewire support for DS2413 (#55921) 2021-10-15 08:23:26 +02:00
epenet
ccaf0d5c75
Use EntityDescription - onewire (#55003) 2021-08-24 10:37:59 +02:00
epenet
bb7236fd04
Use constants for device_info in Onewire integration (#53724) 2021-07-30 13:35:49 +02:00
Marc Mueller
074d762664
Rename and reorganize electric unit constants (#53243) 2021-07-20 20:06:23 +02:00
epenet
d7c0da90c5
Add support for DS2405 (#50148) 2021-05-20 17:02:25 +02:00
Fredrik Tuomas
a65d3868cb
Add support for EDS0066 (#50035)
* Add support for EDS0066

* Added a test

* Corrected entity_ids

* Added missing part of sensor entity id

* Add type hint

* Update tests/components/onewire/const.py

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* Update tests/components/onewire/const.py

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* Revert "Update tests/components/onewire/const.py"

This reverts commit 4a01b89868bb692bb2911ca5b9f9939611a5ff2f.

* Revert "Update tests/components/onewire/const.py"

This reverts commit 151eb9c0d3303b6bd3b3dc49a1eccd7c1a1b31b8.

Co-authored-by: jan iversen <jancasacondor@gmail.com>
2021-05-20 15:39:34 +02:00
epenet
d6c99a3db9
Enable strict type checks for onewire (#50422) 2021-05-11 17:28:17 +02:00
epenet
86176f1bf9
Add retry mechanism on onewire sysbus devices (#48614)
* Add retry mechanism on sysbus

* Update tests

* Move to async

* Move blocking calls on the executor
2021-04-03 23:08:35 +02:00
epenet
81bdd41fdc
Cleanup orphan devices in onewire integration (#48581)
* Cleanup orphan devices (https://github.com/home-assistant/core/issues/47438)

* Refactor unit testing

* Filter device entries for this config entry

* Update logging

* Cleanup check
2021-04-01 15:06:47 +02:00