From d1714d800a21df14256d6155a7b06b0306e4679a Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sun, 11 Oct 2020 12:41:30 +0200 Subject: [PATCH] fix strings.json --- custom_components/adaptive_lighting/strings.json | 2 +- custom_components/adaptive_lighting/switch.py | 4 +++- custom_components/adaptive_lighting/translations/en.json | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/custom_components/adaptive_lighting/strings.json b/custom_components/adaptive_lighting/strings.json index 57949ea0..9d835bdc 100644 --- a/custom_components/adaptive_lighting/strings.json +++ b/custom_components/adaptive_lighting/strings.json @@ -6,7 +6,7 @@ "title": "Choose a name for the Adaptive Lighting", "description": "Every instance can contain multiple lights!", "data": { - "name": "[%key:common::config_flow::data::name%]" + "name": "Name" } } }, diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 1fd9f4dd..7c07ac50 100755 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -254,7 +254,9 @@ def _supported_features(hass: HomeAssistant, light: str): return {key for key, value in _SUPPORT_OPTS.items() if supported_features & value} -def color_difference_redmean(rgb1, rgb2): +def color_difference_redmean( + rgb1: Tuple[float, float, float], rgb2: Tuple[float, float, float] +) -> float: """Distance between colors in RGB space (redmean metric). The maximal distance between (255, 255, 255) and (0, 0, 0) ≈ 765. diff --git a/custom_components/adaptive_lighting/translations/en.json b/custom_components/adaptive_lighting/translations/en.json index 57949ea0..1ceb00df 100644 --- a/custom_components/adaptive_lighting/translations/en.json +++ b/custom_components/adaptive_lighting/translations/en.json @@ -6,12 +6,12 @@ "title": "Choose a name for the Adaptive Lighting", "description": "Every instance can contain multiple lights!", "data": { - "name": "[%key:common::config_flow::data::name%]" + "name": "Name" } } }, "abort": { - "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" + "already_configured": "Device is already configured" } }, "options": {