core/tests
ehendrix23 daf9d28565 Fix mold_indicator errors at startup (#17346)
* Initial changes to resolve issue 16733

Added logic to ensure that if the state is unknown during startup that the error about being unable to parse the value is not logged.
Further,  also ensured that if an attribute is set to None it does not try to convert the None value to Fahrenheit as that will cause an error.

* Cleaned up and added few comments

Cleaned up some lines based on flake8 and pylint.
Added some comment lines on the items added.

* Changed to async and using async_added_to_hass

Changed sensor to use async.
Registering state tracking for sensors and initial setup is now done upon the home assistant start event.

* Updated test and small fix

Updated test to handle unavailable state of sensor and return of None for attributes when data is unavailable.
Ensured that atributes are set to None when state is unavailable due to incorrect data.

* Fixed some flake8 issues in test

Fixed some flake8 issues in test_moldindicator.py.

* Updates based on review

Updates based on review from MartinHjelmare

* Added sensor entity_id to logger errors

Added sensor entity_id to logger error messages
Update test to use constant STATE_UNKNOWN instead of fixed string.
2018-10-17 18:42:39 +02:00
..
auth Add permissions foundation (#16890) 2018-10-11 19:24:25 +02:00
components Fix mold_indicator errors at startup (#17346) 2018-10-17 18:42:39 +02:00
fixtures Swedish weather institute weather component (#16717) 2018-10-08 23:54:55 +02:00
helpers Added resolve_state to template distance function (#17290) 2018-10-10 11:49:24 +02:00
mock Add zwave.network_complete_some_dead event (#16894) 2018-09-28 19:14:57 +02:00
resources Revised package util tests 2016-01-30 14:08:32 -05:00
scripts Fix check config packages key error (#15840) 2018-08-17 05:28:00 +02:00
test_util Deprecated stuff (#16019) 2018-08-20 16:34:18 +02:00
testing_config add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
util Enable BMW component to be unit system aware (#17197) 2018-10-11 10:55:22 +02:00
__init__.py async HTTP component (#3914) 2016-10-23 23:48:01 -07:00
common.py Add permissions foundation (#16890) 2018-10-11 19:24:25 +02:00
conftest.py Remove usage of "run_until_complete" (#16617) 2018-09-19 15:40:02 +02:00
test_bootstrap.py Remove usage of "run_until_complete" (#16617) 2018-09-19 15:40:02 +02:00
test_config.py Allow split component definitions in packages (#16177) 2018-09-24 10:17:24 +02:00
test_config_entries.py Allow config entry setup to raise not ready (#17135) 2018-10-04 15:53:50 +02:00
test_core.py Fire an event when timer gets out of sync (#17398) 2018-10-15 11:34:36 +02:00
test_data_entry_flow.py Allow finish_flow callback to change data entry result type (#16100) 2018-08-21 10:48:24 -07:00
test_loader.py Remove service helper (5) (#16917) 2018-09-27 23:13:11 +02:00
test_main.py Hello Python 3.5 (#12610) 2018-02-22 23:22:27 -08:00
test_requirements.py Improve package loadable (#16237) 2018-08-28 12:52:18 +02:00
test_setup.py Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 (#14557) 2018-08-24 10:28:43 +02:00