core/tests/components/sensor
Jan Bouwhuis 2e16b7e2df
Add numeric_state_expected property to Sensor class (#87013)
* Add is_numeric property to Sensor class

* Follw up comment

* Update homeassistant/components/sensor/__init__.py

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

* Update homeassistant/components/sensor/__init__.py

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

* Tests and corrections

* Simplify converion check

* Correct custom device class handling

* Update homeassistant/components/sensor/__init__.py

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

* rename to numeric_state_expected

* Replace with new const

* Adjust docstr

* Update homeassistant/components/sensor/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Move to const

* Correct logic

* Do not use bool

* Adjust docstr must be numeric

* remote state from docstr

* protect numeric_state_expected

* Use try_parse_enum for custom class check

* Remove redundant type hints

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-02-01 18:45:13 +01:00
..
__init__.py Use python defaults for comparing State, LazyState, and Event objects (#86856) 2023-01-29 13:31:43 -05:00
test_device_condition.py Add device class moisture (#77666) 2022-09-01 11:47:47 -04:00
test_device_trigger.py Add device class moisture (#77666) 2022-09-01 11:47:47 -04:00
test_helpers.py
test_init.py Add numeric_state_expected property to Sensor class (#87013) 2023-02-01 18:45:13 +01:00
test_recorder.py Use python defaults for comparing State, LazyState, and Event objects (#86856) 2023-01-29 13:31:43 -05:00
test_significant_change.py Replace the usage of unit constants by enumerations in Tests [s-u] (#85937) 2023-01-16 09:00:27 +01:00
test_websocket_api.py Fix sensor test (#85740) 2023-01-12 12:21:19 +01:00