1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-26 21:05:18 +00:00
Files
core/tests/components
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
..
2023-01-27 11:52:49 +01:00
2023-01-27 13:57:06 +01:00
2023-01-31 08:48:35 +01:00
2023-01-27 11:10:29 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 11:10:29 +01:00
2023-01-30 14:06:52 +01:00
2023-01-30 14:06:52 +01:00
2023-01-30 11:03:23 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 11:10:29 +01:00
2023-01-30 14:06:52 +01:00
2023-01-22 16:00:19 -08:00
2023-01-27 09:09:46 +01:00
2023-01-30 11:03:23 +01:00
2023-01-26 18:05:05 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 09:09:46 +01:00
2023-01-26 18:05:05 +01:00
2023-01-30 11:03:23 +01:00
2023-01-30 11:03:23 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 11:52:49 +01:00
2023-01-27 16:32:04 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 16:32:04 +01:00
2023-01-27 13:57:06 +01:00
2023-01-26 18:05:05 +01:00
2023-01-27 11:10:29 +01:00
2023-01-27 16:32:04 +01:00
2023-01-27 11:52:49 +01:00
2023-01-27 11:10:29 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 11:10:29 +01:00
2023-01-30 11:03:23 +01:00
2023-01-09 11:41:47 +01:00
2023-01-27 12:03:27 +01:00
2023-01-26 18:05:05 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 11:52:49 +01:00
2023-01-27 11:10:29 +01:00
2023-01-30 11:03:23 +01:00
2023-01-27 13:57:06 +01:00
2023-01-26 18:05:05 +01:00
2023-01-30 11:03:23 +01:00
2023-01-30 11:03:23 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 13:57:06 +01:00
2023-01-25 12:28:13 -05:00
2023-01-27 13:57:06 +01:00
2023-01-27 11:52:49 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 13:57:06 +01:00
2023-01-26 18:05:05 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 13:57:06 +01:00
2023-01-20 08:32:41 -05:00
2023-01-27 13:57:06 +01:00
2023-01-27 11:52:49 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 11:52:49 +01:00
2023-01-26 18:05:05 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 11:52:49 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 13:57:06 +01:00
2023-01-30 11:03:23 +01:00
2023-01-27 11:52:49 +01:00
2023-01-26 18:05:05 +01:00
2023-01-30 11:03:23 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 13:57:06 +01:00
2023-01-07 18:14:36 -10:00
2023-01-20 13:42:47 +01:00
2023-01-26 18:05:05 +01:00
2023-01-30 11:03:23 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 13:57:06 +01:00
2023-01-23 10:27:24 -05:00
2023-01-27 13:57:06 +01:00
2023-01-30 11:03:23 +01:00
2023-01-27 11:10:29 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 16:32:04 +01:00
2023-01-26 18:05:05 +01:00
2023-01-27 09:09:46 +01:00
2023-01-30 11:03:23 +01:00
2023-01-27 09:09:46 +01:00
2023-01-27 13:57:06 +01:00
2023-01-27 13:57:06 +01:00
2023-01-30 14:06:52 +01:00
2023-01-27 11:52:49 +01:00
2023-01-30 22:21:34 +01:00
2023-01-27 16:32:04 +01:00