hass-core/tests/components
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
..
alarm_control_panel Init sub-components using global var. () 2018-10-07 23:30:09 +02:00
alexa Remove unit_of_measurement from climate entities () 2018-08-22 09:17:29 +02:00
auth Track refresh token last usage information () 2018-09-12 13:24:16 +02:00
automation Add a webhook automation trigger () 2018-10-08 20:16:37 +02:00
binary_sensor Add binary_sensor support to RFlink () 2018-10-18 22:28:40 +02:00
calendar Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
camera Break up websocket component () 2018-10-01 11:21:00 +02:00
cast Add confirmation to Cast/Sonos/iOS config entries () 2018-09-21 16:34:37 +02:00
climate WIP: Don't set initial values for MQTT HVAC in non-optimistic mode () 2018-10-10 14:06:53 +02:00
cloud Add another 3 days leeway to give time for payment processing times () 2018-10-17 10:45:01 +02:00
config Add group foundation () 2018-10-08 16:35:38 +02:00
counter Fix counter restore. () 2018-10-03 23:12:21 +02:00
cover deCONZ - Add support for Xiaomi window covers () 2018-10-20 15:13:23 +02:00
deconz deCONZ cover support () 2018-09-21 19:59:20 +02:00
device_tracker Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 () 2018-08-24 10:28:43 +02:00
emulated_hue block external IP () 2018-10-08 20:50:24 +02:00
fan Add device registry to MQTT fan () 2018-10-09 10:13:42 +02:00
frontend Break up websocket component () 2018-10-01 11:21:00 +02:00
geo_location Fixing race condition in geo location platforms () 2018-10-18 15:25:48 +02:00
google_assistant Use HA native OAuth2 flow for google assistant components () 2018-09-26 08:57:55 +02:00
group Add optional "all" parameter for groups () 2018-10-09 10:14:55 +02:00
hangouts Hangouts () 2018-08-24 10:39:35 +02:00
hassio Hass.io auth/sso part2 () 2018-10-11 10:55:38 +02:00
homekit Homekit component cleanup () 2018-10-20 00:14:05 +02:00
homematicip_cloud Add HomematicIP alarm control panel () 2018-07-13 03:57:41 +02:00
http Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 () 2018-08-24 10:28:43 +02:00
hue Remove discovery () 2018-10-04 16:04:44 +02:00
ifttt Add webhook + IFTTT example () 2018-09-30 14:45:48 +02:00
image_processing Remove service helper (3) () 2018-09-26 08:50:05 +02:00
ios Add confirmation to Cast/Sonos/iOS config entries () 2018-09-21 16:34:37 +02:00
light Fix mqtt light brightness slider () 2018-10-20 12:37:25 -04:00
lock Template Lock () 2018-10-11 12:53:54 +02:00
lovelace Adding id to lovelace cards in ui-lovelace.yaml () 2018-10-17 16:31:06 +02:00
mailbox Add Call Data Log platform. Mailboxes no longer require media () 2018-09-21 11:55:12 +02:00
media_player State is set to UNKNOWN rather than ON in order to make UI have an play/pause button () 2018-10-15 11:42:27 +02:00
mqtt Support abbreviations in discovery topic () 2018-10-12 08:51:16 +02:00
nest Show notification when user configures Nest client_id/secret () 2018-06-15 15:19:58 -04:00
notify notify.homematic () 2018-10-12 09:36:52 +02:00
onboarding Add onboarding support () 2018-07-17 10:49:15 +02:00
openuv Clean up OpenUV config flow () 2018-10-15 13:21:21 -06:00
persistent_notification Add time created to persistent notifications. () 2018-10-04 10:24:14 +02:00
recorder Remove homeassistant.remote () 2018-08-21 15:49:58 +02:00
remote Remove service helper (4) () 2018-09-26 18:02:05 +02:00
scene Remove service helper (5) () 2018-09-27 23:13:11 +02:00
sensor Fix mold_indicator errors at startup () 2018-10-17 18:42:39 +02:00
simplisafe Add config entry for SimpliSafe () 2018-10-12 19:07:47 +02:00
smhi Swedish weather institute weather component () 2018-10-08 23:54:55 +02:00
sonos Add confirmation to Cast/Sonos/iOS config entries () 2018-09-21 16:34:37 +02:00
switch Fix flux switch update interval () 2018-10-18 23:04:22 +02:00
timer Move timer into correct folder () 2017-11-03 21:10:08 -07:00
tradfri Allow tradfri groups for new imported entries () 2018-10-11 10:37:34 +02:00
tts Add a base_url configuration setting to tts. () 2018-09-10 11:50:25 +02:00
unifi UniFi POE control () 2018-10-16 10:35:35 +02:00
upnp Changes after review by @MartinHjelmare 2018-10-01 19:26:43 +02:00
vacuum Remove service helper (4) () 2018-09-26 18:02:05 +02:00
water_heater Water heater support () 2018-10-08 10:38:07 +02:00
weather Swedish weather institute weather component () 2018-10-08 23:54:55 +02:00
websocket_api Break up websocket 2 () 2018-10-01 16:09:31 +02:00
zone Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
zwave Z-Wave Device Registry Support () 2018-10-16 14:58:25 +02:00
__init__.py
conftest.py Break up websocket 2 () 2018-10-01 16:09:31 +02:00
huawei_lte.py Small huawei_lte improvements () 2018-09-15 10:42:36 +03:00
test_alert.py Remove alert service helper () 2018-10-02 00:33:45 +02:00
test_api.py Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 () 2018-08-24 10:28:43 +02:00
test_canary.py Add support for Canary Flex () 2018-03-30 23:38:29 +02:00
test_configurator.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_conversation.py rewrite hangouts to use intents instead of commands () 2018-08-28 00:20:12 +02:00
test_datadog.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_demo.py Remove homeassistant.remote () 2018-08-21 15:49:58 +02:00
test_device_sun_light_trigger.py Remove service helper (5) () 2018-09-27 23:13:11 +02:00
test_dialogflow.py Spelling fixes () 2018-01-27 11:58:27 -08:00
test_discovery.py Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 () 2018-08-24 10:28:43 +02:00
test_duckdns.py Remove service helper (3) () 2018-09-26 08:50:05 +02:00
test_dyson.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_feedreader.py avoid error in debug log mode and rss entry without title () 2018-08-31 12:54:25 +02:00
test_ffmpeg.py Remove service helper (8) () 2018-10-02 10:23:37 +02:00
test_folder_watcher.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_freedns.py Add FreeDNS component () 2018-03-30 21:33:30 +02:00
test_google.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_google_domains.py Add Google Domains component () 2017-10-25 11:42:53 +02:00
test_graphite.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_history.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_history_graph.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_influxdb.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_init.py Manual updates () 2018-10-09 16:54:38 +02:00
test_input_boolean.py Remove service helper (3) () 2018-09-26 08:50:05 +02:00
test_input_datetime.py Add recent context () 2018-08-20 17:39:53 +02:00
test_input_number.py Remove service helper (3) () 2018-09-26 08:50:05 +02:00
test_input_select.py Remove unused legacy test helper methods () 2018-09-26 18:03:13 +02:00
test_input_text.py Remove service helper (3) () 2018-09-26 08:50:05 +02:00
test_intent_script.py Add Intent component () 2017-07-21 21:38:53 -07:00
test_introduction.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_kira.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_litejet.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_logbook.py Add LogBook support to HomeKit () 2018-10-16 13:32:53 +02:00
test_logentries.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_logger.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_melissa.py Add Melissa (HVAC/climate) component () 2018-02-03 03:17:01 +01:00
test_microsoft_face.py Remove service helper (8) () 2018-10-02 10:23:37 +02:00
test_mqtt_eventstream.py Remove homeassistant.remote () 2018-08-21 15:49:58 +02:00
test_mqtt_statestream.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_namecheapdns.py Make host optional () 2017-10-23 15:24:04 +02:00
test_no_ip.py Support for NO-IP () 2017-10-27 10:15:47 +02:00
test_nuheat.py tests: Use assertEqual instead of deprecated assertEquals () 2018-01-27 12:18:02 +01:00
test_panel_custom.py Add support for JS modules in custom panels () 2018-08-23 11:14:18 +02:00
test_panel_iframe.py Break up websocket 2 () 2018-10-01 16:09:31 +02:00
test_pilight.py Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 () 2018-08-24 10:28:43 +02:00
test_plant.py More pylint 2 fixes () 2018-07-20 11:45:20 +03:00
test_prometheus.py Adding 'namespace' for prometheus metrics () 2018-06-28 16:49:33 +02:00
test_proximity.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_python_script.py Fix time functions would throw errors in python scripts () 2018-01-07 01:50:55 +01:00
test_qwikswitch.py Qwikswitch binary sensors () 2018-04-21 08:34:42 +02:00
test_remember_the_milk.py Spelling fixes () 2018-01-29 23:37:19 +01:00
test_rest_command.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_rflink.py Update voluputous () 2018-02-17 10:29:14 +01:00
test_rfxtrx.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_ring.py Upgrade ring_doorbell to 0.2.1 to fix oauth issues () 2018-06-16 08:58:39 +02:00
test_rss_feed_template.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_script.py Remove service helper (5) () 2018-09-27 23:13:11 +02:00
test_shell_command.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_shopping_list.py Fix aiohttp deprecation warnings () 2018-03-15 21:49:49 +01:00
test_sleepiq.py aiohttp 2 () 2017-03-30 00:50:53 -07:00
test_snips.py Snips: Added special slot values, session_id and slotname_raw () 2018-09-02 00:01:11 +02:00
test_spaceapi.py Add SpaceAPI support () 2018-05-14 09:13:59 +02:00
test_spc.py Init sub-components using global var. () 2018-10-07 23:30:09 +02:00
test_splunk.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_statsd.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_sun.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_system_log.py Pylint 2 fixes () 2018-07-17 19:34:29 +02:00
test_updater.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
test_vultr.py Fix vultr tests () 2018-01-05 16:34:03 -08:00
test_wake_on_lan.py New service send_magic_packet with new component wake_on_lan () 2017-07-10 18:37:51 -07:00
test_webhook.py Webhook component - pass headers to webhook handler () 2018-10-04 15:54:51 +02:00
test_weblink.py Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00