Files
core/homeassistant/components/sensor
ehendrix23 aadf72d445 Fix statistics for binary sensor (#18764)
* Fix statistics for binary sensor

-) Binary sensors have 'on' and 'off' for state resulting in issue as numbers were expected. Fixed so that it works with non-numeric states as well.
-) Added check to skip unknown states.
-) Updates test so that binary sensor test will use non-numeric values for states.

* Using guard clause and changed debug to error

Changed to use a guard clause for state unknown.
Writing error on value error instead of debug.

* Add docstring
2018-11-29 09:01:56 +01:00
..
2018-11-15 14:30:37 +01:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-10-01 08:55:43 +02:00
2018-10-14 17:12:34 +02:00
2018-10-02 07:32:03 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-11-25 09:01:19 +01:00
2018-08-24 16:37:30 +02:00
2018-10-17 08:38:03 +02:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-11-04 09:50:00 +01:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-10-20 22:07:47 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-09-16 01:17:47 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-11-21 06:15:54 +01:00
2018-10-01 08:55:43 +02:00
2018-10-01 08:55:43 +02:00
2018-10-15 12:24:21 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-11 07:43:15 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-29 21:13:01 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-20 15:30:10 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 14:44:11 +02:00
2018-10-01 08:55:43 +02:00
2018-08-19 22:29:08 +02:00
2018-08-24 16:37:30 +02:00
2018-10-15 13:21:21 -06:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-11-19 12:52:21 +01:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-16 10:06:00 +02:00
2018-08-24 16:37:30 +02:00
2018-11-25 12:30:38 +01:00
2018-11-06 12:34:11 +01:00
2018-10-01 08:55:43 +02:00
2018-10-09 22:37:50 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-11-07 08:52:51 +02:00
2018-11-25 17:59:14 +01:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-11-16 14:15:53 +01:00
2018-11-08 19:19:30 +01:00
2018-10-01 08:55:43 +02:00
2018-07-18 10:54:54 +02:00
2018-08-24 16:37:30 +02:00
2018-10-25 23:15:20 +03:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-11-13 11:29:04 +01:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-02 11:03:09 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-10-01 08:55:43 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-08-24 16:37:30 +02:00
2018-11-27 21:21:25 +01:00
2018-08-24 16:37:30 +02:00