Files
core/homeassistant/components
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-07-20 11:45:20 +03:00
2018-11-26 14:30:21 +01:00
2018-11-15 14:30:37 +01:00
2018-11-28 22:17:37 +01:00
2018-10-08 16:35:38 +02:00
2018-11-15 14:30:37 +01:00
2018-11-21 20:18:56 +01:00
2018-11-14 02:20:15 +01:00
2018-11-21 20:55:21 +01:00
2018-11-26 14:40:43 +01:00
2018-10-14 17:11:39 +02:00
2018-11-15 14:30:37 +01:00
2018-11-16 11:42:48 +01:00
2018-11-21 20:18:56 +01:00
2018-11-28 13:25:23 +01:00
2018-11-21 20:18:56 +01:00
2018-11-15 14:30:37 +01:00
2018-11-06 10:36:52 +01:00
2018-11-26 14:30:21 +01:00
2018-11-24 10:02:06 +01:00
2018-11-21 20:18:56 +01:00
2018-11-15 14:30:37 +01:00
2018-11-20 12:18:46 +01:00
2018-11-11 23:16:23 +01:00
2018-11-26 14:30:21 +01:00
2018-11-28 22:20:13 +01:00
2018-11-26 14:30:21 +01:00
2018-11-26 14:30:21 +01:00
2018-11-13 10:01:14 +01:00
2018-10-01 08:52:42 +02:00
2018-11-26 14:30:21 +01:00
2018-10-24 22:56:14 +02:00
2018-11-21 20:18:56 +01:00
2018-11-26 14:30:21 +01:00
2018-11-21 20:18:56 +01:00
2018-11-27 15:44:09 +01:00
2018-11-27 21:21:25 +01:00
2018-11-15 14:30:37 +01:00
2018-11-27 13:09:25 -05:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-10-02 07:32:03 +02:00
2018-07-20 11:45:20 +03:00
2018-10-21 19:54:51 +02:00
2018-07-18 11:54:27 +02:00
2018-10-30 21:23:44 +01:00
2018-07-20 11:45:20 +03:00
2018-07-10 13:19:32 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-07-23 14:05:38 +02:00
2018-10-03 06:28:08 +02:00
2018-08-13 10:39:48 -07:00
2018-11-21 06:15:54 +01:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-14 23:51:15 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-08-23 22:56:18 +02:00
2018-10-01 08:52:42 +02:00
2018-10-02 11:03:09 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-28 23:03:27 +01:00
2018-06-25 13:05:07 -04:00
2018-07-20 11:45:20 +03:00
2018-06-25 13:05:07 -04:00
2018-10-02 10:23:37 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-08-16 14:21:49 +02:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-10-17 23:09:05 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-11-21 23:31:08 -08:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-05-25 06:39:41 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-28 13:57:44 +01:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-09-27 23:13:11 +02:00
2018-10-01 08:52:42 +02:00
2018-09-18 14:59:39 +02:00
2018-10-02 11:03:09 +02:00
2018-07-20 11:45:20 +03:00
2018-10-25 23:15:20 +03:00
2018-05-14 09:13:59 +02:00
2018-08-21 15:49:58 +02:00
2018-10-31 09:10:28 +01:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-07-18 11:54:27 +02:00
2018-11-04 17:22:03 +01:00
2018-10-02 11:03:09 +02:00
2018-10-01 08:52:42 +02:00
2018-10-29 15:50:44 +01:00
2018-07-20 11:45:20 +03:00
2018-11-14 09:40:43 -05:00
2018-07-23 14:05:38 +02:00
2018-11-18 19:41:24 +01:00
2018-07-23 10:16:05 +02:00
2018-07-20 11:45:20 +03:00
2018-11-08 18:49:00 +01:00
2018-10-01 08:52:42 +02:00
2018-06-30 17:12:00 +02:00
2018-10-24 18:59:52 +02:00