core/tests
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
..
auth Enable Ruff PT015 (#86775) 2023-01-27 11:10:29 +01:00
backports
components Add numeric_state_expected property to Sensor class (#87013) 2023-02-01 18:45:13 +01:00
fixtures Add device HmIP-DRDI3 (#83337) 2022-12-18 12:44:49 -07:00
hassfest Enable Ruff PT022 (#86792) 2023-01-27 13:57:06 +01:00
helpers Fix assert order in intent tests (#87036) 2023-01-31 10:59:00 -06:00
pylint Add per-file-ignore to pylint (#86289) 2023-01-22 17:26:24 +01:00
resources
scripts Code styling tweaks to the tests - Part 2 (#86662) 2023-01-26 01:23:53 +01:00
test_util Enable Ruff PT015 (#86775) 2023-01-27 11:10:29 +01:00
testing_config Migrates tests to use UnitOfPressure enum (#86785) 2023-01-27 12:13:27 +01:00
util Add enum util (#87082) 2023-02-01 15:00:27 +01:00
__init__.py
bandit.yaml
common.py Enable Ruff TRY004 (#86811) 2023-01-30 14:06:52 +01:00
conftest.py Fix tests typing helper (#86956) 2023-01-31 08:48:35 +01:00
ignore_uncaught_exceptions.py
ruff.toml Enable Ruff PT021 (#86801) 2023-01-27 17:14:04 +01:00
test_bootstrap.py Adjusts imports in tests to match our relative import rules (#86788) 2023-01-27 12:51:58 +01:00
test_config.py Adjusts imports in tests to match our relative import rules (#86788) 2023-01-27 12:51:58 +01:00
test_config_entries.py Adjusts imports in tests to match our relative import rules (#86788) 2023-01-27 12:51:58 +01:00
test_core.py Use python defaults for comparing State, LazyState, and Event objects (#86856) 2023-01-29 13:31:43 -05:00
test_data_entry_flow.py Adjusts imports in tests to match our relative import rules (#86788) 2023-01-27 12:51:58 +01:00
test_exceptions.py
test_loader.py Adjusts imports in tests to match our relative import rules (#86788) 2023-01-27 12:51:58 +01:00
test_main.py Allow only specific packages to be skipped during startup dependency installation (#82758) 2022-11-30 08:38:52 +01:00
test_requirements.py Adjusts imports in tests to match our relative import rules (#86788) 2023-01-27 12:51:58 +01:00
test_runner.py
test_setup.py Adjusts imports in tests to match our relative import rules (#86788) 2023-01-27 12:51:58 +01:00
test_test_fixtures.py
typing.py Fix tests typing helper (#86956) 2023-01-31 08:48:35 +01:00