core/tests
Bob Clough 2e973c7572 Fix mqtt light brightness slider ()
* Enable brightness slider for RGB

If we are using RGB with no brightness topic, the brighness slider
should still be visible, as we can scale the RGB amount to give us the
brightness.

* Output RGB scaled by brightness

If we are outputting to an RGB device, but do not have a dedicated
brightness topic set, when the brightness slider is changed, we should
output the current colour's HS, with the V coming from the brightness
slider.

* Brightness from RGB when we're not using a brightness topic

When we aren't using a brightness topic, set the brightness slider based
on the received value from an RGB -> HSV conversion.

* Test for new brightness state scaled by RGB

This adds a test to make sure the brightness stored in the state is
being computed correctly from the RGB value when a dedicated brightness
topic is not set.

* Changes from review

Fixes formatting of supported features flags, and checks HS colour
hasn't been set when operating in RGB-only mode

* Set optimistic brightness correctly in rgb mode

When we're using rgb mode to set the brightness, we want to set
optimistic brightness if:

we are running in optimistic mode
OR
the brightness state topic isn't set and we have a brightness command topic
OR
the rgb state topic isn't set and we don't have a brightness command topic

* Add test for turn_on in RGB brightness mode
2018-10-20 12:37:25 -04:00
..
auth Add permissions foundation () 2018-10-11 19:24:25 +02:00
components Fix mqtt light brightness slider () 2018-10-20 12:37:25 -04:00
fixtures Swedish weather institute weather component () 2018-10-08 23:54:55 +02:00
helpers Added resolve_state to template distance function () 2018-10-10 11:49:24 +02:00
mock Add zwave.network_complete_some_dead event () 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 () 2018-08-17 05:28:00 +02:00
test_util Deprecated stuff () 2018-08-20 16:34:18 +02:00
testing_config add_devices -> add_entities () 2018-08-24 16:37:30 +02:00
util Enable BMW component to be unit system aware () 2018-10-11 10:55:22 +02:00
__init__.py async HTTP component () 2016-10-23 23:48:01 -07:00
common.py Add permissions foundation () 2018-10-11 19:24:25 +02:00
conftest.py Remove usage of "run_until_complete" () 2018-09-19 15:40:02 +02:00
test_bootstrap.py Remove usage of "run_until_complete" () 2018-09-19 15:40:02 +02:00
test_config.py Allow split component definitions in packages () 2018-09-24 10:17:24 +02:00
test_config_entries.py Allow config entry setup to raise not ready () 2018-10-04 15:53:50 +02:00
test_core.py Fire an event when timer gets out of sync () 2018-10-15 11:34:36 +02:00
test_data_entry_flow.py Allow finish_flow callback to change data entry result type () 2018-08-21 10:48:24 -07:00
test_loader.py Remove service helper (5) () 2018-09-27 23:13:11 +02:00
test_main.py Hello Python 3.5 () 2018-02-22 23:22:27 -08:00
test_requirements.py Improve package loadable () 2018-08-28 12:52:18 +02:00
test_setup.py Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 () 2018-08-24 10:28:43 +02:00