Commit Graph

13 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
Marc Mueller
38adfbf1a3 Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Franck Nijhof
04e0e2bd75 Update a* tests to use device & entity registry fixtures (#103711) 2023-11-09 20:46:20 +01:00
Joost Lekkerkerker
6ceb973606 Add entity translations for Abode (#94169) 2023-06-22 16:03:28 +02:00
Joost Lekkerkerker
7d8e412314 Fix Abode unit of measurement (#94168)
Change unit of measurement to HA const
2023-06-07 19:53:45 +02:00
Michael
2850583085 Replace the usage of unit constants by enumerations in Tests [a-e] (#85932) 2023-01-15 14:44:01 +01:00
Robert Hillis
7c51d2f159 Add strict typing to abode (#57673) 2022-01-10 15:54:09 +01:00
Dave T
1a594d2a8c Use DeviceClass Enums in abode tests (#61980) 2021-12-16 20:59:55 +01:00
Erik Montnemery
78b21b1ad1 Update tests a-b to use async_get() instead of async_get_registry() (#47651) 2021-03-09 14:24:34 +01:00
springstan
d2b1918e9c Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
springstan
9f713dac7f Use UNIT_PERCENTAGE constant (#34054) 2020-04-11 22:53:48 +02:00
springstan
78d87dc40f Use TEMP_CELSIUS constant (#33963) 2020-04-10 19:17:46 +02:00
shred86
d36259f067 Add Abode tests (#32562)
* Add tests for several devices

* Update coveragerc

* Code review changes and minor clean up

* More code review changes

* Update manifest and minor test updates

* Add test for locks and covers

* Add tests for switch on and off

* Add more complete test for alarms

* Fix for camera test

* Patch abodepy.mode for tests

* Add test for unknown alarm state and minor cleanup

* Update to make tests more robust

* More specific tests

* Update quality scale to silver

* Remove integration quality scale
2020-03-16 03:05:10 +01:00