Commit Graph

131 Commits (llm-task-pref)

Author SHA1 Message Date
Abílio Costa b626204f63
Add default device class display precision for Sensor (#145013)
* Add default device class display precision for Sensor

* Renaming, docstrings, cleanup

* Simplify units list

* Fix tests

* Fix missing precision when suggested is specified

* Update snapshots

* Fix when unit of measurement is not valid

* Fix tests

* Fix deprecated unit usage

* Fix goalzero tests

The sensor native_value method was accessing the data dict and trowing,
since the mock did not have any data for the sensors.

Since now the precision is always specified (it was missing for those
sensors), the throw was hitting async_update_entity_options in _update_suggested_precision.
Previously, async_update_entity_options was not called since it had no
precision.

* Fix metoffice

* Fix smartthings

* Add default sensor data for Tesla Wall Connector tests

* Update snapshots

* Revert spaces

* Update smartthings snapshots

* Add missing sensor mock for tesla wall connector

* Address review comments

* Add doc comment

* Add cap to doc comment

* Update comment

* Update snapshots

* Update comment
2025-05-26 19:40:29 +02:00
Erik Montnemery 4e1d5fbeb0
Add WS command to help reset custom entity_id (#145504)
* Add WS command to help reset custom entity_id

* Calculate suggested object id from entity properties

* Fix logic and add additional tests

* Adjust test

* Update folder_watcher test

* Handle current entity id matches the automatic entity id

* Don't store calculated_object_id

* Update snapshots

* Update snapshots

* Update test

* Tweak logic for reusing current entity_id

* Improve test

* Don't assign same entity_id to several entities

* Prioritize custom entity name

* Update snapshots

* Update snapshots
2025-05-26 19:28:27 +02:00
Erik Montnemery 4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

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

* Improve docstrings and strings.json

---------

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

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
epenet acb3f4ed78
Add software version to onewire device info (#136934) 2025-01-30 21:03:47 +01:00
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
Joost Lekkerkerker b4f4b06f29
Enable RUF021 (#135832) 2025-01-17 10:20:45 +01:00
epenet b046ca9abe
Move ZeroconfServiceInfo to service_info helpers (#135653)
* Move ZeroconfServiceInfo to service_info helpers

* Adjust deprecation date

* Fix mypy/pylint

* Fix DeprecatedConstant

* Add deprecation test

* Adjust

* Also deprecate ATTR_PROPERTIES_ID
2025-01-15 12:25:42 +01:00
epenet b84a4dc120
Add zeroconf discovery to onewire (#135295) 2025-01-13 17:52:37 +00:00
epenet a649ff4a91
Add hassio discovery to onewire (#135294) 2025-01-13 11:55:18 +01:00
epenet 475a2fb828
Discover new devices at runtime in onewire (#135199) 2025-01-10 11:53:31 +01:00
epenet b5971ec55d
Add model_id and serial_number to onewire device info (#135279) 2025-01-10 11:18:50 +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 8bfdbc173a
Use snapshot_platform helper in onewire tests (#135176)
* Use snapshot_platform helper in onewire tests

* Snapshot device registry
2025-01-09 11:45:29 +01:00
epenet 15e785b974
Move OneWire PLATFORM constant back to init (#135172) 2025-01-09 11:22:08 +01:00
epenet 02e30edc6c
Improve onewire options flow tests (#135109) 2025-01-08 17:00:35 +01:00
epenet d46be61b6f
Split simple and recovery in onewire config-flow user tests (#135102) 2025-01-08 15:25:39 +01:00
epenet f05e234c30
Refactor patching in onewire tests (#135070) 2025-01-08 15:14:51 +01:00
epenet d43187327f
Remove rounding from onewire sensors (#135095) 2025-01-08 14:25:05 +01:00
epenet f8618e65f6
Improve type hints in onewire tests (#134993) 2025-01-08 09:33:04 +01:00
epenet 471f77fea4
Add reconfigure to onewire (#134996)
* Add reconfigure to onewire

* Adjust _async_abort_entries_match
2025-01-07 17:08:53 +01:00
Jan Rieger 4fe8a43cc9
Remove native_unit_of_measurement from Onewire counters (#132076) 2024-12-06 21:23:45 +01:00
epenet ae95d802cc
Fix missing translations in onewire (#130673) 2024-11-15 08:40:57 +01:00
epenet c5046f7809
Add check for valid abort reason translation in option flows (#128444) 2024-10-16 13:41:15 +02:00
Joost Lekkerkerker f8ba4d41ba
Add support for adding model_id in device info (#121989) 2024-07-16 15:12:25 +02:00
Marc Mueller 921430d497
Import Generator from collections.abc (3) (#120916) 2024-07-01 12:09:11 +02:00
Erik Montnemery 9bbeb5d608
Add primary_config_entry attribute to device registry entries (#119959)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-26 12:26:24 +02:00
Paulus Schoutsen eb89ce47ea
Inline primary integration (#119860) 2024-06-18 08:08:08 +02:00
Paulus Schoutsen 836abe68c7
Track primary integration (#119741)
* Track primary integration

* Update snapshots

* More snapshots updated

* Uno mas

* Update snapshot
2024-06-16 13:26:06 -04:00
Marc Mueller 837ee7c4fb
Import Generator from typing_extensions (4) (#118992) 2024-06-06 17:41:37 +02:00
epenet 301c17cba7
Use registry fixtures in tests (o-p) (#118292) 2024-05-28 13:42:38 +02:00
epenet 8291769361
Store runtime data in entry in onewire (#116450)
* Store runtime data in entry in onewire

* Adjust
2024-04-30 15:55:20 +02:00
epenet a3942e019b
Use remove_device helper in tests (2/2) (#116442)
Use remove_device helper in tests (part 2)
2024-04-30 12:50:35 +02: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
Joost Lekkerkerker 5d500cb74b
Use is in enum comparison in config flow tests K-O (#114672) 2024-04-02 11:21:42 -10:00
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