8 Commits

Author SHA1 Message Date
Franck Nijhof 5472a537ed Replace unused mock_setup_entry arguments with @pytest.mark.usefixtures (#170760)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-16 11:02:36 +02:00
epenet 88525955ce Remove import annotations from tests (#169527) 2026-04-30 09:30:46 +02:00
Artur Pragacz bafef2065f Rework user-given entity name logic (#162763) 2026-03-17 11:09:20 +01:00
Artur Pragacz 0130919128 Improve entity id generation (#160302) 2026-01-14 14:34:52 +01:00
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
Simone Chemelli 484a547758 Fix pylance warning on SnapshotAssertion import (#145206) 2025-05-19 13:55:48 +02:00
Steven Stallion 73442e8443 Add SensorPush Cloud integration (#134223) 2025-02-20 16:15:47 +01:00