Commit Graph

52 Commits

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
Olivier Douville
5cd4c8e896 Add missing state class in sfr-box (#143773)
* Update sensor.py - Add MEASUREMENT state class on alimvoltage and temperature sensors

This will allow state values to be stored in LTS (long term statistics)

* Update tests accordingly to previous changes in sensors

* Update tests accordingly to previous changes in sensors
2025-04-28 07:55:29 +02:00
epenet
9d241a77b7 Adjust DSL line status options in SFR Box integration (#136425) 2025-02-20 23:14:17 +01: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
419e83f6d8 Bump sfrbox-api to 0.0.11 (#125732)
* Bump sfrbox-api to 0.0.11

* Re-enable tests
2024-09-11 12:51:39 +02:00
Erik Montnemery
ebd2034564 Disable sfr_box diagnostic test (#125678) 2024-09-10 16:51:32 +02:00
epenet
33814d1180 Add model ID to sfr_box (#125400) 2024-09-06 10:50:17 -04:00
Alexandre TRUPIN
c4cc158a77 Bump sfrbox-api to 0.0.10 (#125405)
* bump sfr_box requirement to 0.0.10

* upate manifest file

* Handle None values

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-06 16:18:47 +02:00
epenet
9bcc31a9fe Use start_reauth helper method in integration tests (s) (#124793) 2024-08-28 16:49:05 +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
f11b316dac Import Generator from collections.abc (4) (#120917) 2024-07-01 11:54:42 +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
Joost Lekkerkerker
ee66f6ec8c Use is in enum comparison in config flow tests P-T (#114675) 2024-04-02 11:21:50 -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
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
Sid
fe9cc6705c Add ruff rule PIE804 (#113620)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-16 12:45:18 -10:00
Marc Mueller
32f3f46542 Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller
7d6251ca08 Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
Franck Nijhof
e0a9dcd996 Add label registry (#110821) 2024-02-19 11:59:08 +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
fe6402ef73 Use device class naming for sfr box (#96092) 2023-07-11 20:19:04 +02:00
epenet
b568dd3060 Refactor SnapshotAssertion is SFR Box (#90775) 2023-04-22 17:20:27 +02:00
epenet
45038bac16 Use entity name translations in SFR Box (#90698) 2023-04-03 14:04:02 +02:00
epenet
18df3a22ca Add FTTH information to SFR Box (#89781) 2023-03-20 20:06:44 +01:00
epenet
69e85b3216 Fix SFR Box diagnostics (#89783) 2023-03-16 11:09:54 +01:00
epenet
c416d18506 Add WAN information to SFR Box (#89678) 2023-03-15 18:49:57 +01:00
epenet
07b25939a2 Use SnapshotAssertion in SFR button tests (#89633) 2023-03-13 15:23:00 +01:00
epenet
f3da95fb1f Use SnapshotAssertion in SFR binary sensor tests (#89624) 2023-03-13 13:37:51 +01:00
epenet
5e73ad9cb0 Use SnapshotAssertion in SFR sensor tests (#89619)
* Use SnapshotAssertion in SFR sensor tests

* Name snapshots

* Cleanup const.py

* Remove name from snapshot
2023-03-13 10:45:59 +01:00
epenet
96bd714364 Add FTTH and WAN info to SFR box diagnostics (#89492)
* Add FTTH and WAN info to SFR box diagnostics

* Adjust tests

* Use snapshots
2023-03-10 10:09:04 -05:00
epenet
dcff2f37f7 Add DSL prefix to SFRBox ADSL sensors (#89276) 2023-03-09 13:19:22 +01:00
epenet
bf5f7c53d8 Move mock_setup_entry to conftest (#88484) 2023-03-06 11:31:50 +01:00
epenet
80ee196fd8 Add type hints to integration tests (part 19) (#88178) 2023-02-15 18:07:40 +01:00
Franck Nijhof
330e1c6cbb Clean up unnecessary registry mocks from integration tests (#87763) 2023-02-09 10:43:45 +01:00
Franck Nijhof
62dcbe5258 Enable Ruff PT001 (#86730) 2023-01-26 18:05:05 +01:00
Franck Nijhof
e50a531cd9 Code styling tweaks to the tests - Part 2 (#86662)
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2023-01-26 01:23:53 +01:00
epenet
e96cea997e Add reboot button to SFRBox (#86514) 2023-01-24 14:13:49 +01:00
epenet
22dee1f92b Add reauth to SFR Box (#86511) 2023-01-24 11:00:22 +01:00
epenet
3ec7f0280e Add authentication to SFR Box (#85757)
* Add credentials to SFR Box

* Make username/password inclusive

* Add handler for ConnectTimeout

* Use menu

* Drop get
2023-01-24 07:22:14 +01:00
epenet
b5a9e682be Add missing enum item in SFR Box (#85746)
* Add missing enum item in SFR Box

* Adjust tests
2023-01-12 18:15:09 +02:00
epenet
5a4df9d870 Add binary sensor platform to SFR Box (#85508)
* Add binary sensor platform to SFR Box

* Simplify
2023-01-12 10:06:09 +01:00
epenet
679e971131 Add system diagnostic sensors to SFR Box (#85184)
* Add system diagnostic sensor

* Add tests
2023-01-12 09:29:12 +01:00
epenet
de2588f6e0 Add diagnostics platform to SFR Box (#85500) 2023-01-10 20:17:14 +02:00
epenet
52032c6c7f Complete test coverage for SFR Box (#85068)
* Complete test coverage for SFR Box

* Add missing hint

* renault -> sfr_box

* Fixes following rebase
2023-01-06 12:30:07 +01:00
epenet
34798189ca Improve SFR Box test coverage (#85054)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-03 17:56:30 +01:00