From 737b679ae86fe4fc75b6c177f47bc822d9fd03d4 Mon Sep 17 00:00:00 2001 From: basbruss <4a3.brussee.bas@gmail.com> Date: Thu, 4 Jul 2024 13:24:44 +0200 Subject: [PATCH 1/6] initial sections --- config/configuration.yaml | 2 + .../adaptive_cover/config_flow.py | 234 ++++++++++++------ requirements.txt | 2 +- 3 files changed, 166 insertions(+), 72 deletions(-) diff --git a/config/configuration.yaml b/config/configuration.yaml index 11df546..98c0a68 100644 --- a/config/configuration.yaml +++ b/config/configuration.yaml @@ -75,3 +75,5 @@ template: state: "{{21}}" device_class: temperature unit_of_measurement: "°C" + +kitchen_sink: \ No newline at end of file diff --git a/custom_components/adaptive_cover/config_flow.py b/custom_components/adaptive_cover/config_flow.py index 2ae62f8..c71d870 100644 --- a/custom_components/adaptive_cover/config_flow.py +++ b/custom_components/adaptive_cover/config_flow.py @@ -13,6 +13,7 @@ from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult from homeassistant.helpers import selector +from homeassistant import data_entry_flow from .const import ( CONF_AWNING_ANGLE, @@ -95,29 +96,70 @@ } ) -OPTIONS = vol.Schema( +ELEVATION = vol.Schema( { - vol.Required(CONF_AZIMUTH, default=180): selector.NumberSelector( - selector.NumberSelectorConfig( - min=0, max=359, mode="slider", unit_of_measurement="°" + vol.Optional(CONF_MIN_ELEVATION): vol.All( + vol.Coerce(int), vol.Range(min=0, max=90) + ), + vol.Optional(CONF_MAX_ELEVATION): vol.All( + vol.Coerce(int), vol.Range(min=0, max=90) + ), + } +) + +LUX = vol.Schema( + { + vol.Optional(CONF_LUX_ENTITY, default=vol.UNDEFINED): selector.EntitySelector( + selector.EntityFilterSelectorConfig( + domain=["sensor"], device_class="illuminance" ) ), - vol.Required(CONF_DEFAULT_HEIGHT, default=60): selector.NumberSelector( - selector.NumberSelectorConfig( - min=0, max=100, step=1, mode="slider", unit_of_measurement="%" + vol.Optional(CONF_LUX_THRESHOLD, default=1000): selector.NumberSelector( + selector.NumberSelectorConfig(mode="box", unit_of_measurement="lux") + ), + } +) + +IRRADIANCE = vol.Schema( + { + vol.Optional( + CONF_IRRADIANCE_ENTITY, default=vol.UNDEFINED + ): selector.EntitySelector( + selector.EntityFilterSelectorConfig( + domain=["sensor"], device_class="irradiance" ) ), - vol.Optional(CONF_MAX_POSITION, default=100): selector.NumberSelector( + vol.Optional(CONF_IRRADIANCE_THRESHOLD, default=300): selector.NumberSelector( + selector.NumberSelectorConfig(mode="box", unit_of_measurement="W/m²") + ), + } +) + +TEMPERATURE = vol.Schema( + { + vol.Required(CONF_TEMP_ENTITY): selector.EntitySelector( + selector.EntityFilterSelectorConfig(domain=["climate", "sensor"]) + ), + vol.Required(CONF_TEMP_LOW, default=21): selector.NumberSelector( selector.NumberSelectorConfig( - min=1, max=100, step=1, mode="slider", unit_of_measurement="%" + min=0, max=86, step=1, mode="slider", unit_of_measurement="°" ) ), - vol.Optional(CONF_MIN_ELEVATION): vol.All( - vol.Coerce(int), vol.Range(min=0, max=90) + vol.Required(CONF_TEMP_HIGH, default=25): selector.NumberSelector( + selector.NumberSelectorConfig( + min=0, max=90, step=1, mode="slider", unit_of_measurement="°" + ) ), - vol.Optional(CONF_MAX_ELEVATION): vol.All( - vol.Coerce(int), vol.Range(min=0, max=90) + vol.Optional( + CONF_OUTSIDETEMP_ENTITY, default=vol.UNDEFINED + ): selector.EntitySelector( + selector.EntityFilterSelectorConfig(domain=["sensor"]) ), + } +) + +FOV = vol.Schema( + { vol.Required(CONF_FOV_LEFT, default=90): selector.NumberSelector( selector.NumberSelectorConfig( min=1, max=90, step=1, mode="slider", unit_of_measurement="°" @@ -128,17 +170,113 @@ min=1, max=90, step=1, mode="slider", unit_of_measurement="°" ) ), + } +) + + +DEFAULT = vol.Schema( + { + vol.Required(CONF_DEFAULT_HEIGHT, default=60): selector.NumberSelector( + selector.NumberSelectorConfig( + min=0, max=100, step=1, mode="slider", unit_of_measurement="%" + ) + ), vol.Required(CONF_SUNSET_POS, default=0): selector.NumberSelector( selector.NumberSelectorConfig( min=0, max=100, step=1, mode="slider", unit_of_measurement="%" ) ), + } +) + +SUN_OFFSET = vol.Schema( + { vol.Required(CONF_SUNSET_OFFSET, default=0): selector.NumberSelector( selector.NumberSelectorConfig(mode="box", unit_of_measurement="minutes") ), vol.Required(CONF_SUNRISE_OFFSET, default=0): selector.NumberSelector( selector.NumberSelectorConfig(mode="box", unit_of_measurement="minutes") ), + } +) + +POSITION_LIMITS = vol.Schema( + { + vol.Optional(CONF_MAX_POSITION, default=100): selector.NumberSelector( + selector.NumberSelectorConfig( + min=1, max=100, step=1, mode="slider", unit_of_measurement="%" + ) + ), + } +) + +DELTA = vol.Schema( + { + vol.Required(CONF_DELTA_POSITION, default=1): selector.NumberSelector( + selector.NumberSelectorConfig( + min=1, max=90, step=1, mode="slider", unit_of_measurement="%" + ) + ), + vol.Optional(CONF_DELTA_TIME, default=2): selector.NumberSelector( + selector.NumberSelectorConfig( + min=2, mode="box", unit_of_measurement="minutes" + ) + ), + } +) + +START = vol.Schema( + { + vol.Optional(CONF_START_TIME, default="00:00:00"): selector.TimeSelector(), + vol.Optional(CONF_START_ENTITY): selector.EntitySelector( + selector.EntitySelectorConfig(domain=["sensor", "input_datetime"]) + ), + } +) + +END = vol.Schema( + { + vol.Optional(CONF_END_TIME, default="00:00:00"): selector.TimeSelector(), + vol.Optional(CONF_END_ENTITY): selector.EntitySelector( + selector.EntitySelectorConfig(domain=["sensor", "input_datetime"]) + ), + vol.Optional(CONF_RETURN_SUNSET, default=False): bool, + } +) + +MANUAL = vol.Schema( + { + vol.Required( + CONF_MANUAL_OVERRIDE_DURATION, default={"minutes": 15} + ): selector.DurationSelector(), + vol.Required(CONF_MANUAL_OVERRIDE_RESET, default=False): bool, + vol.Optional(CONF_MANUAL_THRESHOLD): vol.All( + vol.Coerce(int), vol.Range(min=0, max=99) + ), + vol.Optional(CONF_MANUAL_IGNORE_INTERMEDIATE, default=False): bool, + } +) + +OPTIONS = vol.Schema( + { + vol.Required(CONF_AZIMUTH, default=180): selector.NumberSelector( + selector.NumberSelectorConfig( + min=0, max=359, mode="slider", unit_of_measurement="°" + ) + ), + vol.Required("section_fov"): data_entry_flow.section(FOV, {"collapsed": False}), + vol.Required("section_default"): data_entry_flow.section( + DEFAULT, {"collapsed": False} + ), + vol.Optional("section_sun_offset"): data_entry_flow.section( + SUN_OFFSET, {"collapsed": True} + ), + vol.Optional("section_elevation"): data_entry_flow.section( + ELEVATION, {"collapsed": True} + ), + vol.Optional("section_position_limits"): data_entry_flow.section( + POSITION_LIMITS, {"collapsed": True} + ), vol.Required(CONF_INVERSE_STATE, default=False): bool, vol.Required(CONF_ENABLE_BLIND_SPOT, default=False): bool, vol.Required(CONF_INTERP, default=False): bool, @@ -216,23 +354,8 @@ CLIMATE_OPTIONS = vol.Schema( { - vol.Required(CONF_TEMP_ENTITY): selector.EntitySelector( - selector.EntityFilterSelectorConfig(domain=["climate", "sensor"]) - ), - vol.Required(CONF_TEMP_LOW, default=21): selector.NumberSelector( - selector.NumberSelectorConfig( - min=0, max=86, step=1, mode="slider", unit_of_measurement="°" - ) - ), - vol.Required(CONF_TEMP_HIGH, default=25): selector.NumberSelector( - selector.NumberSelectorConfig( - min=0, max=90, step=1, mode="slider", unit_of_measurement="°" - ) - ), - vol.Optional( - CONF_OUTSIDETEMP_ENTITY, default=vol.UNDEFINED - ): selector.EntitySelector( - selector.EntityFilterSelectorConfig(domain=["sensor"]) + vol.Required("section_temp"): data_entry_flow.section( + TEMPERATURE, {"collapsed": False} ), vol.Optional( CONF_PRESENCE_ENTITY, default=vol.UNDEFINED @@ -241,23 +364,9 @@ domain=["device_tracker", "zone", "binary_sensor", "input_boolean"] ) ), - vol.Optional(CONF_LUX_ENTITY, default=vol.UNDEFINED): selector.EntitySelector( - selector.EntityFilterSelectorConfig( - domain=["sensor"], device_class="illuminance" - ) - ), - vol.Optional(CONF_LUX_THRESHOLD, default=1000): selector.NumberSelector( - selector.NumberSelectorConfig(mode="box", unit_of_measurement="lux") - ), - vol.Optional( - CONF_IRRADIANCE_ENTITY, default=vol.UNDEFINED - ): selector.EntitySelector( - selector.EntityFilterSelectorConfig( - domain=["sensor"], device_class="irradiance" - ) - ), - vol.Optional(CONF_IRRADIANCE_THRESHOLD, default=300): selector.NumberSelector( - selector.NumberSelectorConfig(mode="box", unit_of_measurement="W/m²") + vol.Optional("section_lux"): data_entry_flow.section(LUX, {"collapsed": True}), + vol.Optional("section_irradiance"): data_entry_flow.section( + IRRADIANCE, {"collapsed": True} ), vol.Optional(CONF_TRANSPARENT_BLIND, default=False): selector.BooleanSelector(), vol.Optional( @@ -302,33 +411,16 @@ AUTOMATION_CONFIG = vol.Schema( { - vol.Required(CONF_DELTA_POSITION, default=1): selector.NumberSelector( - selector.NumberSelectorConfig( - min=1, max=90, step=1, mode="slider", unit_of_measurement="%" - ) + vol.Required("section_delta"): data_entry_flow.section( + DELTA, {"collapsed": False} ), - vol.Optional(CONF_DELTA_TIME, default=2): selector.NumberSelector( - selector.NumberSelectorConfig( - min=2, mode="box", unit_of_measurement="minutes" - ) + vol.Optional("section_start"): data_entry_flow.section( + START, {"collapsed": True} ), - vol.Optional(CONF_START_TIME, default="00:00:00"): selector.TimeSelector(), - vol.Optional(CONF_START_ENTITY): selector.EntitySelector( - selector.EntitySelectorConfig(domain=["sensor", "input_datetime"]) + vol.Optional("section_end"): data_entry_flow.section(END, {"collapsed": True}), + vol.Optional("section_manual"): data_entry_flow.section( + MANUAL, {"collapsed": True} ), - vol.Required( - CONF_MANUAL_OVERRIDE_DURATION, default={"minutes": 15} - ): selector.DurationSelector(), - vol.Required(CONF_MANUAL_OVERRIDE_RESET, default=False): bool, - vol.Optional(CONF_MANUAL_THRESHOLD): vol.All( - vol.Coerce(int), vol.Range(min=0, max=99) - ), - vol.Optional(CONF_MANUAL_IGNORE_INTERMEDIATE, default=False): bool, - vol.Optional(CONF_END_TIME, default="00:00:00"): selector.TimeSelector(), - vol.Optional(CONF_END_ENTITY): selector.EntitySelector( - selector.EntitySelectorConfig(domain=["sensor", "input_datetime"]) - ), - vol.Optional(CONF_RETURN_SUNSET, default=False): bool, } ) diff --git a/requirements.txt b/requirements.txt index 291eebf..b30cc94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -homeassistant~=2024.5 +homeassistant~=2024.7 pip>=21.0,<24.1 pandas~=2.2 From 5f591b2fc3e30964a274bff7c42a193a16f71eb5 Mon Sep 17 00:00:00 2001 From: basbruss <4a3.brussee.bas@gmail.com> Date: Thu, 4 Jul 2024 13:24:44 +0200 Subject: [PATCH 2/6] initial sections --- config/configuration.yaml | 2 + .../adaptive_cover/config_flow.py | 197 +++++++++++++----- 2 files changed, 152 insertions(+), 47 deletions(-) diff --git a/config/configuration.yaml b/config/configuration.yaml index 11df546..98c0a68 100644 --- a/config/configuration.yaml +++ b/config/configuration.yaml @@ -75,3 +75,5 @@ template: state: "{{21}}" device_class: temperature unit_of_measurement: "°C" + +kitchen_sink: \ No newline at end of file diff --git a/custom_components/adaptive_cover/config_flow.py b/custom_components/adaptive_cover/config_flow.py index 077de48..d9d58ae 100644 --- a/custom_components/adaptive_cover/config_flow.py +++ b/custom_components/adaptive_cover/config_flow.py @@ -13,6 +13,7 @@ from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult from homeassistant.helpers import selector +from homeassistant import data_entry_flow from .const import ( CONF_AWNING_ANGLE, @@ -99,16 +100,53 @@ } ) -OPTIONS = vol.Schema( +ELEVATION = vol.Schema( { - vol.Required(CONF_AZIMUTH, default=180): selector.NumberSelector( - selector.NumberSelectorConfig( - min=0, max=359, mode="slider", unit_of_measurement="°" + vol.Optional(CONF_MIN_ELEVATION): vol.All( + vol.Coerce(int), vol.Range(min=0, max=90) + ), + vol.Optional(CONF_MAX_ELEVATION): vol.All( + vol.Coerce(int), vol.Range(min=0, max=90) + ), + } +) + +LUX = vol.Schema( + { + vol.Optional(CONF_LUX_ENTITY, default=vol.UNDEFINED): selector.EntitySelector( + selector.EntityFilterSelectorConfig( + domain=["sensor"], device_class="illuminance" ) ), - vol.Required(CONF_DEFAULT_HEIGHT, default=60): selector.NumberSelector( + vol.Optional(CONF_LUX_THRESHOLD, default=1000): selector.NumberSelector( + selector.NumberSelectorConfig(mode="box", unit_of_measurement="lux") + ), + } +) + +IRRADIANCE = vol.Schema( + { + vol.Optional( + CONF_IRRADIANCE_ENTITY, default=vol.UNDEFINED + ): selector.EntitySelector( + selector.EntityFilterSelectorConfig( + domain=["sensor"], device_class="irradiance" + ) + ), + vol.Optional(CONF_IRRADIANCE_THRESHOLD, default=300): selector.NumberSelector( + selector.NumberSelectorConfig(mode="box", unit_of_measurement="W/m²") + ), + } +) + +TEMPERATURE = vol.Schema( + { + vol.Required(CONF_TEMP_ENTITY): selector.EntitySelector( + selector.EntityFilterSelectorConfig(domain=["climate", "sensor"]) + ), + vol.Required(CONF_TEMP_LOW, default=21): selector.NumberSelector( selector.NumberSelectorConfig( - min=0, max=100, step=1, mode="slider", unit_of_measurement="%" + min=0, max=86, step=1, mode="slider", unit_of_measurement="°" ) ), vol.Optional(CONF_MAX_POSITION): vol.All( @@ -135,17 +173,113 @@ min=1, max=90, step=1, mode="slider", unit_of_measurement="°" ) ), + } +) + + +DEFAULT = vol.Schema( + { + vol.Required(CONF_DEFAULT_HEIGHT, default=60): selector.NumberSelector( + selector.NumberSelectorConfig( + min=0, max=100, step=1, mode="slider", unit_of_measurement="%" + ) + ), vol.Required(CONF_SUNSET_POS, default=0): selector.NumberSelector( selector.NumberSelectorConfig( min=0, max=100, step=1, mode="slider", unit_of_measurement="%" ) ), + } +) + +SUN_OFFSET = vol.Schema( + { vol.Required(CONF_SUNSET_OFFSET, default=0): selector.NumberSelector( selector.NumberSelectorConfig(mode="box", unit_of_measurement="minutes") ), vol.Required(CONF_SUNRISE_OFFSET, default=0): selector.NumberSelector( selector.NumberSelectorConfig(mode="box", unit_of_measurement="minutes") ), + } +) + +POSITION_LIMITS = vol.Schema( + { + vol.Optional(CONF_MAX_POSITION, default=100): selector.NumberSelector( + selector.NumberSelectorConfig( + min=1, max=100, step=1, mode="slider", unit_of_measurement="%" + ) + ), + } +) + +DELTA = vol.Schema( + { + vol.Required(CONF_DELTA_POSITION, default=1): selector.NumberSelector( + selector.NumberSelectorConfig( + min=1, max=90, step=1, mode="slider", unit_of_measurement="%" + ) + ), + vol.Optional(CONF_DELTA_TIME, default=2): selector.NumberSelector( + selector.NumberSelectorConfig( + min=2, mode="box", unit_of_measurement="minutes" + ) + ), + } +) + +START = vol.Schema( + { + vol.Optional(CONF_START_TIME, default="00:00:00"): selector.TimeSelector(), + vol.Optional(CONF_START_ENTITY): selector.EntitySelector( + selector.EntitySelectorConfig(domain=["sensor", "input_datetime"]) + ), + } +) + +END = vol.Schema( + { + vol.Optional(CONF_END_TIME, default="00:00:00"): selector.TimeSelector(), + vol.Optional(CONF_END_ENTITY): selector.EntitySelector( + selector.EntitySelectorConfig(domain=["sensor", "input_datetime"]) + ), + vol.Optional(CONF_RETURN_SUNSET, default=False): bool, + } +) + +MANUAL = vol.Schema( + { + vol.Required( + CONF_MANUAL_OVERRIDE_DURATION, default={"minutes": 15} + ): selector.DurationSelector(), + vol.Required(CONF_MANUAL_OVERRIDE_RESET, default=False): bool, + vol.Optional(CONF_MANUAL_THRESHOLD): vol.All( + vol.Coerce(int), vol.Range(min=0, max=99) + ), + vol.Optional(CONF_MANUAL_IGNORE_INTERMEDIATE, default=False): bool, + } +) + +OPTIONS = vol.Schema( + { + vol.Required(CONF_AZIMUTH, default=180): selector.NumberSelector( + selector.NumberSelectorConfig( + min=0, max=359, mode="slider", unit_of_measurement="°" + ) + ), + vol.Required("section_fov"): data_entry_flow.section(FOV, {"collapsed": False}), + vol.Required("section_default"): data_entry_flow.section( + DEFAULT, {"collapsed": False} + ), + vol.Optional("section_sun_offset"): data_entry_flow.section( + SUN_OFFSET, {"collapsed": True} + ), + vol.Optional("section_elevation"): data_entry_flow.section( + ELEVATION, {"collapsed": True} + ), + vol.Optional("section_position_limits"): data_entry_flow.section( + POSITION_LIMITS, {"collapsed": True} + ), vol.Required(CONF_INVERSE_STATE, default=False): bool, vol.Required(CONF_ENABLE_BLIND_SPOT, default=False): bool, vol.Required(CONF_INTERP, default=False): bool, @@ -251,23 +385,9 @@ domain=["device_tracker", "zone", "binary_sensor", "input_boolean"] ) ), - vol.Optional(CONF_LUX_ENTITY, default=vol.UNDEFINED): selector.EntitySelector( - selector.EntityFilterSelectorConfig( - domain=["sensor"], device_class="illuminance" - ) - ), - vol.Optional(CONF_LUX_THRESHOLD, default=1000): selector.NumberSelector( - selector.NumberSelectorConfig(mode="box", unit_of_measurement="lux") - ), - vol.Optional( - CONF_IRRADIANCE_ENTITY, default=vol.UNDEFINED - ): selector.EntitySelector( - selector.EntityFilterSelectorConfig( - domain=["sensor"], device_class="irradiance" - ) - ), - vol.Optional(CONF_IRRADIANCE_THRESHOLD, default=300): selector.NumberSelector( - selector.NumberSelectorConfig(mode="box", unit_of_measurement="W/m²") + vol.Optional("section_lux"): data_entry_flow.section(LUX, {"collapsed": True}), + vol.Optional("section_irradiance"): data_entry_flow.section( + IRRADIANCE, {"collapsed": True} ), vol.Optional(CONF_TRANSPARENT_BLIND, default=False): selector.BooleanSelector(), vol.Optional( @@ -312,33 +432,16 @@ AUTOMATION_CONFIG = vol.Schema( { - vol.Required(CONF_DELTA_POSITION, default=1): selector.NumberSelector( - selector.NumberSelectorConfig( - min=1, max=90, step=1, mode="slider", unit_of_measurement="%" - ) + vol.Required("section_delta"): data_entry_flow.section( + DELTA, {"collapsed": False} ), - vol.Optional(CONF_DELTA_TIME, default=2): selector.NumberSelector( - selector.NumberSelectorConfig( - min=2, mode="box", unit_of_measurement="minutes" - ) - ), - vol.Optional(CONF_START_TIME, default="00:00:00"): selector.TimeSelector(), - vol.Optional(CONF_START_ENTITY): selector.EntitySelector( - selector.EntitySelectorConfig(domain=["sensor", "input_datetime"]) - ), - vol.Required( - CONF_MANUAL_OVERRIDE_DURATION, default={"minutes": 15} - ): selector.DurationSelector(), - vol.Required(CONF_MANUAL_OVERRIDE_RESET, default=False): bool, - vol.Optional(CONF_MANUAL_THRESHOLD): vol.All( - vol.Coerce(int), vol.Range(min=0, max=99) + vol.Optional("section_start"): data_entry_flow.section( + START, {"collapsed": True} ), - vol.Optional(CONF_MANUAL_IGNORE_INTERMEDIATE, default=False): bool, - vol.Optional(CONF_END_TIME, default="00:00:00"): selector.TimeSelector(), - vol.Optional(CONF_END_ENTITY): selector.EntitySelector( - selector.EntitySelectorConfig(domain=["sensor", "input_datetime"]) + vol.Optional("section_end"): data_entry_flow.section(END, {"collapsed": True}), + vol.Optional("section_manual"): data_entry_flow.section( + MANUAL, {"collapsed": True} ), - vol.Optional(CONF_RETURN_SUNSET, default=False): bool, } ) From d4c262a5a3a4d2799afcab92c85e366f7572373c Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:38:54 +0200 Subject: [PATCH 3/6] Add sections --- .../adaptive_cover/config_flow.py | 29 +- .../adaptive_cover/translations/en.json | 570 ++++++++++++++---- 2 files changed, 459 insertions(+), 140 deletions(-) diff --git a/custom_components/adaptive_cover/config_flow.py b/custom_components/adaptive_cover/config_flow.py index e1683bc..f944864 100644 --- a/custom_components/adaptive_cover/config_flow.py +++ b/custom_components/adaptive_cover/config_flow.py @@ -5,6 +5,7 @@ from typing import Any import voluptuous as vol +from homeassistant import data_entry_flow from homeassistant.config_entries import ( ConfigEntry, ConfigFlow, @@ -13,7 +14,6 @@ from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult from homeassistant.helpers import selector -from homeassistant import data_entry_flow from .const import ( CONF_AWNING_ANGLE, @@ -27,6 +27,8 @@ CONF_DELTA_TIME, CONF_DISTANCE, CONF_ENABLE_BLIND_SPOT, + CONF_ENABLE_MAX_POSITION, + CONF_ENABLE_MIN_POSITION, CONF_END_ENTITY, CONF_END_TIME, CONF_ENTITIES, @@ -51,7 +53,9 @@ CONF_MAX_ELEVATION, CONF_MAX_POSITION, CONF_MIN_ELEVATION, + CONF_MIN_POSITION, CONF_MODE, + CONF_OUTSIDE_THRESHOLD, CONF_OUTSIDETEMP_ENTITY, CONF_PRESENCE_ENTITY, CONF_RETURN_SUNSET, @@ -70,10 +74,8 @@ CONF_TRANSPARENT_BLIND, CONF_WEATHER_ENTITY, CONF_WEATHER_STATE, - CONF_OUTSIDE_THRESHOLD, DOMAIN, SensorType, - CONF_MIN_POSITION, ) # DEFAULT_NAME = "Adaptive Cover" @@ -100,11 +102,15 @@ ELEVATION = vol.Schema( { - vol.Optional(CONF_MIN_ELEVATION): vol.All( - vol.Coerce(int), vol.Range(min=0, max=90) + vol.Optional(CONF_MIN_ELEVATION, default=0): selector.NumberSelector( + selector.NumberSelectorConfig( + min=0, max=90, mode="slider", unit_of_measurement="°" + ) ), - vol.Optional(CONF_MAX_ELEVATION): vol.All( - vol.Coerce(int), vol.Range(min=0, max=90) + vol.Optional(CONF_MAX_ELEVATION, default=90): selector.NumberSelector( + selector.NumberSelectorConfig( + min=0, max=90, mode="slider", unit_of_measurement="°" + ) ), } ) @@ -206,9 +212,16 @@ { vol.Optional(CONF_MAX_POSITION, default=100): selector.NumberSelector( selector.NumberSelectorConfig( - min=1, max=100, step=1, mode="slider", unit_of_measurement="%" + min=1, max=100, mode="slider", unit_of_measurement="°" + ) + ), + vol.Optional(CONF_ENABLE_MAX_POSITION, default=False): bool, + vol.Optional(CONF_MIN_POSITION, default=0): selector.NumberSelector( + selector.NumberSelectorConfig( + min=0, max=99, mode="slider", unit_of_measurement="°" ) ), + vol.Optional(CONF_ENABLE_MIN_POSITION, default=False): bool, } ) diff --git a/custom_components/adaptive_cover/translations/en.json b/custom_components/adaptive_cover/translations/en.json index 8b5f93a..4bf7e32 100644 --- a/custom_components/adaptive_cover/translations/en.json +++ b/custom_components/adaptive_cover/translations/en.json @@ -35,47 +35,117 @@ } }, "vertical": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Field of view left", + "fov_right": "Field of view right" + }, + "data_description": { + "fov_left": "Field of view angle to the left of the window center", + "fov_right": "Field of view angle to the right of the window center" + }, + "name": "Field of view Options", + "description": "Set the field of view for the cover" + }, + "section_default": { + "data": { + "default_percentage": "Default Position cover", + "sunset_position": "After Sunset Position" + }, + "data_description": { + "default_percentage": "Default cover position when the sun is not in front of the window", + "sunset_position": "Cover position after sunset +- time offset" + }, + "name": "Default Position Options", + "description": "Set the default positions for the cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Sunset Offset", + "sunrise_offset": "Sunrise Offset" + }, + "data_description": { + "sunset_offset": "Offset from local sunset time in minutes", + "sunrise_offset": "Offset from local sunrise time in minutes" + }, + "name": "Sun Offset Options (Optional)", + "description": "Adjust the local sunrise and sunset times with a standard offset" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimum Elevation angle of the sun", + "max_elevation": "Maximum Elevation angle of the sun" + }, + "data_description": { + "min_elevation": "Minimum Elevation angle of the sun to consider when the sun is in front of the window", + "max_elevation": "Maximum Elevation angle of the sun to consider when the sun is in front of the window" + }, + "name": "Elevation Options (Optional)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "max_position": "Maximum cover position as a percentage", + "min_position": "Minimum cover position as a percentage", + "enable_max_position": "Only force the maximum position when the sun is in front of the window", + "enable_min_position": "Only force the minimum position when the sun is in front of the window" + }, + "data_description": { + "max_position": "Maximum cover position it is allowed to change to", + "min_position": "Minimum cover position it is allowed to change to" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Window Azimuth", "window_height": "Window Height", "distance_shaded_area": "Shaded area", "default_percentage": "Default Position", - "min_position": "Minimum Position", - "max_position": "Maximum Position", - "enable_min_position": "Only force the minimum position when the sun is in front of the window", - "enable_max_position": "Only force the maximum position when the sun is in front of the window", - "fov_left": "Field of view left", - "fov_right": "Field of view right", "group": "Cover Entities", "inverse_state": "Inverse the state (needed for some covers that don't follow HA guidelines)", - "sunset_position": "Sunset Position", - "sunset_offset": "Sunset Offset", - "sunrise_offset": "Sunrise Offset", "climate_mode": "Climate Mode", - "blind_spot": "Setup Blindspot", - "min_elevation": "Minimum Elevation of the sun", - "max_elevation": "Maximum Elevation of the sun", "interp": "Set custom open/close positions for My Cover, if it doesn't fully operate at 0-100%" }, "data_description": { "set_azimuth": "Adjust Azimuth", "window_height": "Specify window height in meters", "distance_shaded_area": "Distance from cover to shaded area in meters", - "default_percentage": "Default cover position as a percentage", - "min_position": "Minimum adjustable cover position as a percentage", - "max_position": "Maximum adjustable cover position as a percentage", - "fov_left": "Field of view angle to the left of the window center", - "fov_right": "Field of view angle to the right of the window center", - "group": "Select entities to control via integration", - "sunset_position": "Position to switch to after sunset", - "sunset_offset": "Offset (±) from sunset time in minutes", - "sunrise_offset": "Offset (±) from sunrise time in minutes", + "group": "Select entities to control via integration, when none is selected the integration will provide you with multiple sensors that can be used in automations", "climate_mode": "Configure variables for climate mode" }, "description": "Add configuration variables to the sensor", "title": "Vertical cover" }, "climate": { + "sections": { + "section_lux": { + "data": { + "lux_entity": "Lux sensor", + "lux_threshold": "Lux threshold" + }, + "data_description": { + "lux_entity": "Use lux sensor to determine if cover should reduce glare in presence mode", + "lux_threshold": "Threshold for lux sensor, above this value glare should be reduced" + }, + "name": "Lux Options (Opional)", + "description": "Set the lux sensor and threshold for glare reduction" + }, + "section_irradiance": { + "data": { + "irradiance_entity": "Irradiance sensor", + "irradiance_threshold": "Irradiance threshold" + }, + "data_description": { + "irradiance_entity": "Use irradiance sensor to determine if cover should reduce glare in presence mode", + "irradiance_threshold": "Threshold for irradiance sensor, above this value glare should be reduced" + }, + "name": "Irradiance Options (Opional)", + "description": "Set the irradiance sensor and threshold for glare reduction" + } + }, "data": { "temp_entity": "Inside temperature entity", "presence_entity": "Presence entity (optional)", @@ -84,10 +154,6 @@ "temp_low": "Low temperature threshold", "temp_high": "High temperature threshold", "transparent_blind": "Transparent blind", - "lux_entity": "Lux sensor (optional)", - "lux_threshold": "Lux threshold", - "irradiance_entity": "Irradiance sensor (optional)", - "irradiance_threshold": "Irradiance threshold", "outside_threshold": "Minimum outside temperature for summer mode" }, "data_description": { @@ -113,28 +179,80 @@ "title": "Weather Conditions" }, "horizontal": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Field of view left", + "fov_right": "Field of view right" + }, + "data_description": { + "fov_left": "Field of view angle to the left of the window center", + "fov_right": "Field of view angle to the right of the window center" + }, + "name": "Field of view Options", + "description": "Set the field of view for the cover" + }, + "section_default": { + "data": { + "default_percentage": "Default Position cover", + "sunset_position": "After Sunset Position" + }, + "data_description": { + "default_percentage": "Default cover position when the sun is not in front of the window", + "sunset_position": "Cover position after sunset +- time offset" + }, + "name": "Default Position Options", + "description": "Set the default positions for the cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Sunset Offset", + "sunrise_offset": "Sunrise Offset" + }, + "data_description": { + "sunset_offset": "Offset from local sunset time in minutes", + "sunrise_offset": "Offset from local sunrise time in minutes" + }, + "name": "Sun Offset Options (Optional)", + "description": "Adjust the local sunrise and sunset times with a standard offset" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimum Elevation angle of the sun", + "max_elevation": "Maximum Elevation angle of the sun" + }, + "data_description": { + "min_elevation": "Minimum Elevation angle of the sun to consider when the sun is in front of the window", + "max_elevation": "Maximum Elevation angle of the sun to consider when the sun is in front of the window" + }, + "name": "Elevation Options (Optional)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "max_position": "Maximum cover position as a percentage", + "min_position": "Minimum cover position as a percentage", + "enable_max_position": "Only force the maximum position when the sun is in front of the window", + "enable_min_position": "Only force the minimum position when the sun is in front of the window" + }, + "data_description": { + "max_position": "Maximum cover position it is allowed to change to", + "min_position": "Minimum cover position it is allowed to change to" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Window Azimuth", "length_awning": "Awning Span Length", "window_height": "Awning Height", "angle": "Awning Angle", "distance_shaded_area": "Shaded area", - "default_percentage": "Default Position", - "min_position": "Minimum Position", - "max_position": "Maximum Position", - "enable_min_position": "Only force the minimum position when the sun is in front of the window", - "enable_max_position": "Only force the maximum position when the sun is in front of the window", - "fov_left": "Field of view left", - "fov_right": "Field of view right", "group": "Cover Entities", "inverse_state": "Inverse the state (needed for some covers that don't follow HA guidelines)", - "sunset_position": "Sunset Position", - "sunset_offset": "Sunset Offset", - "sunrise_offset": "Sunrise Offset", "climate_mode": "Climate Mode", "blind_spot": "Setup Blindspot", - "min_elevation": "Minimum Elevation of the sun", - "max_elevation": "Maximum Elevation of the sun", "interp": "Set custom open/close positions for My Cover, if it doesn't fully operate at 0-100%" }, "data_description": { @@ -143,57 +261,92 @@ "length_awning": "Total span length in meters", "angle": "Angle of the attached awning measured perpendicular from the wall to the ground", "distance_shaded_area": "Distance from cover to shaded area in meters", - "default_percentage": "Default cover position as a percentage", - "min_position": "Minimum adjustable cover position as a percentage", - "max_position": "Maximum adjustable cover position as a percentage", - "fov_left": "Field of view degrees to the left of the window center", - "fov_right": "Field of view degrees to the right of the window center", - "group": "Select entities to control via integration", - "sunset_position": "Position to switch to after sunset", - "sunset_offset": "Offset (±) from sunset time in minutes", - "sunrise_offset": "Offset (±) from sunrise time in minutes", "climate_mode": "Configure variables for climate mode" }, "description": "Add configuration variables to the sensor", "title": "Horizontal cover" }, "tilt": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Field of view left", + "fov_right": "Field of view right" + }, + "data_description": { + "fov_left": "Field of view angle to the left of the window center", + "fov_right": "Field of view angle to the right of the window center" + }, + "name": "Field of view Options", + "description": "Set the field of view for the cover" + }, + "section_default": { + "data": { + "default_percentage": "Default Position cover", + "sunset_position": "After Sunset Position" + }, + "data_description": { + "default_percentage": "Default cover position when the sun is not in front of the window", + "sunset_position": "Cover position after sunset +- time offset" + }, + "name": "Default Position Options", + "description": "Set the default positions for the cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Sunset Offset", + "sunrise_offset": "Sunrise Offset" + }, + "data_description": { + "sunset_offset": "Offset from local sunset time in minutes", + "sunrise_offset": "Offset from local sunrise time in minutes" + }, + "name": "Sun Offset Options (Optional)", + "description": "Adjust the local sunrise and sunset times with a standard offset" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimum Elevation angle of the sun", + "max_elevation": "Maximum Elevation angle of the sun" + }, + "data_description": { + "min_elevation": "Minimum Elevation angle of the sun to consider when the sun is in front of the window", + "max_elevation": "Maximum Elevation angle of the sun to consider when the sun is in front of the window" + }, + "name": "Elevation Options (Optional)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "max_position": "Maximum cover position as a percentage", + "min_position": "Minimum cover position as a percentage", + "enable_max_position": "Only force the maximum position when the sun is in front of the window", + "enable_min_position": "Only force the minimum position when the sun is in front of the window" + }, + "data_description": { + "max_position": "Maximum cover position it is allowed to change to", + "min_position": "Minimum cover position it is allowed to change to" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Window Azimuth", "slat_depth": "Slat Depth", "slat_distance": "Slat Spacing", - "default_percentage": "Default Position", - "min_position": "Minimum Position", - "max_position": "Maximum Position", - "enable_min_position": "Only force the minimum position when the sun is in front of the window", - "enable_max_position": "Only force the maximum position when the sun is in front of the window", - "fov_left": "Field of view left", - "fov_right": "Field of view right", "group": "Cover Entities", "inverse_state": "Inverse the state (needed for some covers that don't follow HA guidelines)", - "sunset_position": "Sunset Position", - "sunset_offset": "Sunset Offset", - "sunrise_offset": "Sunrise Offset", "climate_mode": "Climate Mode", "tilt_mode": "Type of movement", "blind_spot": "Setup Blindspot", - "min_elevation": "Minimum Elevation of the sun", - "max_elevation": "Maximum Elevation of the sun", "interp": "Set custom open/close positions for My Cover, if it doesn't fully operate at 0-100%" }, "data_description": { "set_azimuth": "Specify the Azimuth", "slat_depth": "Depth of each individual slat in centimeters", "slat_distance": "Vertical distance between two slats in centimeters", - "default_percentage": "Default cover position as a percentage", - "min_position": "Minimum adjustable cover position as a percentage", - "max_position": "Maximum adjustable cover position as a percentage", - "fov_left": "Degrees to consider from the left side of the window center", - "fov_right": "Degrees to consider from the right side of the window center", "group": "Select entities to control via integration", - "sunset_position": "Position to transition to after sunset", - "sunset_offset": "Offset (±) from sunset time in minutes", - "sunrise_offset": "Offset (±) from sunrise time in minutes", "climate_mode": "Configure variables for climate mode", "tilt_mode": "Choose the type of movement" }, @@ -268,47 +421,117 @@ } }, "vertical": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Field of view left", + "fov_right": "Field of view right" + }, + "data_description": { + "fov_left": "Field of view angle to the left of the window center", + "fov_right": "Field of view angle to the right of the window center" + }, + "name": "Field of view Options", + "description": "Set the field of view for the cover" + }, + "section_default": { + "data": { + "default_percentage": "Default Position cover", + "sunset_position": "After Sunset Position" + }, + "data_description": { + "default_percentage": "Default cover position when the sun is not in front of the window", + "sunset_position": "Cover position after sunset +- time offset" + }, + "name": "Default Position Options", + "description": "Set the default positions for the cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Sunset Offset", + "sunrise_offset": "Sunrise Offset" + }, + "data_description": { + "sunset_offset": "Offset from local sunset time in minutes", + "sunrise_offset": "Offset from local sunrise time in minutes" + }, + "name": "Sun Offset Options (Optional)", + "description": "Adjust the local sunrise and sunset times with a standard offset" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimum Elevation angle of the sun", + "max_elevation": "Maximum Elevation angle of the sun" + }, + "data_description": { + "min_elevation": "Minimum Elevation angle of the sun to consider when the sun is in front of the window", + "max_elevation": "Maximum Elevation angle of the sun to consider when the sun is in front of the window" + }, + "name": "Elevation Options (Optional)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "max_position": "Maximum cover position as a percentage", + "min_position": "Minimum cover position as a percentage", + "enable_max_position": "Only force the maximum position when the sun is in front of the window", + "enable_min_position": "Only force the minimum position when the sun is in front of the window" + }, + "data_description": { + "max_position": "Maximum cover position it is allowed to change to", + "min_position": "Minimum cover position it is allowed to change to" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Window Azimuth", "window_height": "Window Height", "distance_shaded_area": "Shaded area", "default_percentage": "Default Position", - "min_position": "Minimum Position", - "max_position": "Maximum Position", - "enable_min_position": "Only force the minimum position when the sun is in front of the window", - "enable_max_position": "Only force the maximum position when the sun is in front of the window", - "fov_left": "Field of view left", - "fov_right": "Field of view right", "group": "Cover Entities", "inverse_state": "Inverse the state (needed for some covers that don't follow HA guidelines)", - "sunset_position": "Sunset Position", - "sunset_offset": "Sunset Offset", - "sunrise_offset": "Sunrise Offset", "climate_mode": "Climate Mode", - "blind_spot": "Setup Blindspot", - "min_elevation": "Minimum Elevation of the sun", - "max_elevation": "Maximum Elevation of the sun", "interp": "Set custom open/close positions for My Cover, if it doesn't fully operate at 0-100%" }, "data_description": { "set_azimuth": "Adjust Azimuth", "window_height": "Specify window height in meters", "distance_shaded_area": "Distance from cover to shaded area in meters", - "default_percentage": "Default cover position as a percentage", - "min_position": "Minimum adjustable cover position as a percentage", - "max_position": "Maximum adjustable cover position as a percentage", - "fov_left": "Field of view angle to the left of the window center", - "fov_right": "Field of view angle to the right of the window center", - "group": "Select entities to control via integration", - "sunset_position": "Position to switch to after sunset", - "sunset_offset": "Offset (±) from sunset time in minutes", - "sunrise_offset": "Offset (±) from sunrise time in minutes", + "group": "Select entities to control via integration, when none is selected the integration will provide you with multiple sensors that can be used in automations", "climate_mode": "Configure variables for climate mode" }, "description": "Add configuration variables to the sensor", "title": "Vertical cover" }, "climate": { + "sections": { + "section_lux": { + "data": { + "lux_entity": "Lux sensor", + "lux_threshold": "Lux threshold" + }, + "data_description": { + "lux_entity": "Use lux sensor to determine if cover should reduce glare in presence mode", + "lux_threshold": "Threshold for lux sensor, above this value glare should be reduced" + }, + "name": "Lux Options (Opional)", + "description": "Set the lux sensor and threshold for glare reduction" + }, + "section_irradiance": { + "data": { + "irradiance_entity": "Irradiance sensor", + "irradiance_threshold": "Irradiance threshold" + }, + "data_description": { + "irradiance_entity": "Use irradiance sensor to determine if cover should reduce glare in presence mode", + "irradiance_threshold": "Threshold for irradiance sensor, above this value glare should be reduced" + }, + "name": "Irradiance Options (Opional)", + "description": "Set the irradiance sensor and threshold for glare reduction" + } + }, "data": { "temp_entity": "Inside temperature entity", "presence_entity": "Presence entity (optional)", @@ -317,10 +540,6 @@ "temp_low": "Low temperature threshold", "temp_high": "High temperature threshold", "transparent_blind": "Transparent blind", - "lux_entity": "Lux sensor (optional)", - "lux_threshold": "Lux threshold", - "irradiance_entity": "Irradiance sensor (optional)", - "irradiance_threshold": "Irradiance threshold", "outside_threshold": "Minimum outside temperature for summer mode" }, "data_description": { @@ -346,28 +565,80 @@ "title": "Weather Conditions" }, "horizontal": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Field of view left", + "fov_right": "Field of view right" + }, + "data_description": { + "fov_left": "Field of view angle to the left of the window center", + "fov_right": "Field of view angle to the right of the window center" + }, + "name": "Field of view Options", + "description": "Set the field of view for the cover" + }, + "section_default": { + "data": { + "default_percentage": "Default Position cover", + "sunset_position": "After Sunset Position" + }, + "data_description": { + "default_percentage": "Default cover position when the sun is not in front of the window", + "sunset_position": "Cover position after sunset +- time offset" + }, + "name": "Default Position Options", + "description": "Set the default positions for the cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Sunset Offset", + "sunrise_offset": "Sunrise Offset" + }, + "data_description": { + "sunset_offset": "Offset from local sunset time in minutes", + "sunrise_offset": "Offset from local sunrise time in minutes" + }, + "name": "Sun Offset Options (Optional)", + "description": "Adjust the local sunrise and sunset times with a standard offset" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimum Elevation angle of the sun", + "max_elevation": "Maximum Elevation angle of the sun" + }, + "data_description": { + "min_elevation": "Minimum Elevation angle of the sun to consider when the sun is in front of the window", + "max_elevation": "Maximum Elevation angle of the sun to consider when the sun is in front of the window" + }, + "name": "Elevation Options (Optional)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "max_position": "Maximum cover position as a percentage", + "min_position": "Minimum cover position as a percentage", + "enable_max_position": "Only force the maximum position when the sun is in front of the window", + "enable_min_position": "Only force the minimum position when the sun is in front of the window" + }, + "data_description": { + "max_position": "Maximum cover position it is allowed to change to", + "min_position": "Minimum cover position it is allowed to change to" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Window Azimuth", "length_awning": "Awning Span Length", "window_height": "Awning Height", "angle": "Awning Angle", "distance_shaded_area": "Shaded area", - "default_percentage": "Default Position", - "min_position": "Minimum Position", - "max_position": "Maximum Position", - "enable_min_position": "Only force the minimum position when the sun is in front of the window", - "enable_max_position": "Only force the maximum position when the sun is in front of the window", - "fov_left": "Field of view left", - "fov_right": "Field of view right", "group": "Cover Entities", "inverse_state": "Inverse the state (needed for some covers that don't follow HA guidelines)", - "sunset_position": "Sunset Position", - "sunset_offset": "Sunset Offset", - "sunrise_offset": "Sunrise Offset", "climate_mode": "Climate Mode", "blind_spot": "Setup Blindspot", - "min_elevation": "Minimum Elevation of the sun", - "max_elevation": "Maximum Elevation of the sun", "interp": "Set custom open/close positions for My Cover, if it doesn't fully operate at 0-100%" }, "data_description": { @@ -376,57 +647,92 @@ "length_awning": "Total span length in meters", "angle": "Angle of the attached awning measured perpendicular from the wall to the ground", "distance_shaded_area": "Distance from cover to shaded area in meters", - "default_percentage": "Default cover position as a percentage", - "min_position": "Minimum adjustable cover position as a percentage", - "max_position": "Maximum adjustable cover position as a percentage", - "fov_left": "Field of view degrees to the left of the window center", - "fov_right": "Field of view degrees to the right of the window center", - "group": "Select entities to control via integration", - "sunset_position": "Position to switch to after sunset", - "sunset_offset": "Offset (±) from sunset time in minutes", - "sunrise_offset": "Offset (±) from sunrise time in minutes", "climate_mode": "Configure variables for climate mode" }, "description": "Add configuration variables to the sensor", "title": "Horizontal cover" }, "tilt": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Field of view left", + "fov_right": "Field of view right" + }, + "data_description": { + "fov_left": "Field of view angle to the left of the window center", + "fov_right": "Field of view angle to the right of the window center" + }, + "name": "Field of view Options", + "description": "Set the field of view for the cover" + }, + "section_default": { + "data": { + "default_percentage": "Default Position cover", + "sunset_position": "After Sunset Position" + }, + "data_description": { + "default_percentage": "Default cover position when the sun is not in front of the window", + "sunset_position": "Cover position after sunset +- time offset" + }, + "name": "Default Position Options", + "description": "Set the default positions for the cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Sunset Offset", + "sunrise_offset": "Sunrise Offset" + }, + "data_description": { + "sunset_offset": "Offset from local sunset time in minutes", + "sunrise_offset": "Offset from local sunrise time in minutes" + }, + "name": "Sun Offset Options (Optional)", + "description": "Adjust the local sunrise and sunset times with a standard offset" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimum Elevation angle of the sun", + "max_elevation": "Maximum Elevation angle of the sun" + }, + "data_description": { + "min_elevation": "Minimum Elevation angle of the sun to consider when the sun is in front of the window", + "max_elevation": "Maximum Elevation angle of the sun to consider when the sun is in front of the window" + }, + "name": "Elevation Options (Optional)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "max_position": "Maximum cover position as a percentage", + "min_position": "Minimum cover position as a percentage", + "enable_max_position": "Only force the maximum position when the sun is in front of the window", + "enable_min_position": "Only force the minimum position when the sun is in front of the window" + }, + "data_description": { + "max_position": "Maximum cover position it is allowed to change to", + "min_position": "Minimum cover position it is allowed to change to" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Window Azimuth", "slat_depth": "Slat Depth", "slat_distance": "Slat Spacing", - "default_percentage": "Default Position", - "min_position": "Minimum Position", - "max_position": "Maximum Position", - "enable_min_position": "Only force the minimum position when the sun is in front of the window", - "enable_max_position": "Only force the maximum position when the sun is in front of the window", - "fov_left": "Field of view left", - "fov_right": "Field of view right", "group": "Cover Entities", "inverse_state": "Inverse the state (needed for some covers that don't follow HA guidelines)", - "sunset_position": "Sunset Position", - "sunset_offset": "Sunset Offset", - "sunrise_offset": "Sunrise Offset", "climate_mode": "Climate Mode", "tilt_mode": "Type of movement", "blind_spot": "Setup Blindspot", - "min_elevation": "Minimum Elevation of the sun", - "max_elevation": "Maximum Elevation of the sun", "interp": "Set custom open/close positions for My Cover, if it doesn't fully operate at 0-100%" }, "data_description": { "set_azimuth": "Specify the Azimuth", "slat_depth": "Depth of each individual slat in centimeters", "slat_distance": "Vertical distance between two slats in centimeters", - "default_percentage": "Default cover position as a percentage", - "min_position": "Minimum Position", - "max_position": "Maximum adjustable cover position as a percentage", - "fov_left": "Degrees to consider from the left side of the window center", - "fov_right": "Degrees to consider from the right side of the window center", "group": "Select entities to control via integration", - "sunset_position": "Position to transition to after sunset", - "sunset_offset": "Offset (±) from sunset time in minutes", - "sunrise_offset": "Offset (±) from sunrise time in minutes", "climate_mode": "Configure variables for climate mode", "tilt_mode": "Choose the type of movement" }, From 414ee6968c555aaca9bbad7db6410f1982d9b8cd Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:36:19 +0200 Subject: [PATCH 4/6] solar times and cache --- .../adaptive_cover/coordinator.py | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/custom_components/adaptive_cover/coordinator.py b/custom_components/adaptive_cover/coordinator.py index 58fac59..b0bfe88 100644 --- a/custom_components/adaptive_cover/coordinator.py +++ b/custom_components/adaptive_cover/coordinator.py @@ -7,6 +7,7 @@ from dataclasses import dataclass import numpy as np +import pytz from homeassistant.components.cover import DOMAIN as COVER_DOMAIN from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( @@ -137,6 +138,8 @@ def __init__(self, hass: HomeAssistant) -> None: # noqa: D107 self._lux_toggle = None self._irradiance_toggle = None self._start_time = None + self._sun_end_time = None + self._sun_start_time = None # self._end_time = None self.manual_reset = self.config_entry.options.get( CONF_MANUAL_OVERRIDE_RESET, False @@ -160,6 +163,8 @@ def __init__(self, hass: HomeAssistant) -> None: # noqa: D107 self._update_listener = None self._scheduled_time = dt.datetime.now() + self._cached_options = None + async def async_config_entry_first_refresh(self) -> None: """Config entry first refresh.""" self.first_refresh = True @@ -252,6 +257,9 @@ async def async_timed_end_time(self) -> None: async def _async_update_data(self) -> AdaptiveCoverData: _LOGGER.debug("Updating data") + if self.first_refresh: + self._cached_options = self.config_entry.options + options = self.config_entry.options self._update_options(options) @@ -292,8 +300,19 @@ async def _async_update_data(self) -> AdaptiveCoverData: normal_cover = self.normal_cover_state.cover # Run the solar_times method in a separate thread - loop = asyncio.get_event_loop() - start, end = await loop.run_in_executor(None, normal_cover.solar_times) + if ( + self.first_refresh + or self._sun_start_time is None + or dt.datetime.now(pytz.UTC).date() != self._sun_start_time.date() + ): + _LOGGER.debug("Calculating solar times") + loop = asyncio.get_event_loop() + start, end = await loop.run_in_executor(None, normal_cover.solar_times) + self._sun_start_time = start + self._sun_end_time = end + _LOGGER.debug("Sun start time: %s, Sun end time: %s", start, end) + else: + start, end = self._sun_start_time, self._sun_end_time return AdaptiveCoverData( climate_mode_toggle=self.switch_mode, states={ From e4e18ec7de569464f94e9484152a41c9aca371ab Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Tue, 15 Oct 2024 20:19:52 +0200 Subject: [PATCH 5/6] Filter from unknown states --- custom_components/adaptive_cover/coordinator.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/custom_components/adaptive_cover/coordinator.py b/custom_components/adaptive_cover/coordinator.py index b0bfe88..515b8e1 100644 --- a/custom_components/adaptive_cover/coordinator.py +++ b/custom_components/adaptive_cover/coordinator.py @@ -206,9 +206,12 @@ async def async_check_cover_state_change( self.state_change_data = StateChangedData( data["entity_id"], data["old_state"], data["new_state"] ) - self.cover_state_change = True - self.process_entity_state_change() - await self.async_refresh() + if self.state_change_data.old_state.state != "unknown": + self.cover_state_change = True + self.process_entity_state_change() + await self.async_refresh() + else: + _LOGGER.debug("Old state is unknown, not processing") def process_entity_state_change(self): """Process state change event.""" From fbfc756fad553a1ed72a0155c18ec468766288e0 Mon Sep 17 00:00:00 2001 From: basbruss <68892092+basbruss@users.noreply.github.com> Date: Sun, 20 Oct 2024 15:52:30 +0200 Subject: [PATCH 6/6] Update nl.json --- .../adaptive_cover/translations/nl.json | 455 +++++++++++++++++- 1 file changed, 436 insertions(+), 19 deletions(-) diff --git a/custom_components/adaptive_cover/translations/nl.json b/custom_components/adaptive_cover/translations/nl.json index c2c360a..b05775c 100644 --- a/custom_components/adaptive_cover/translations/nl.json +++ b/custom_components/adaptive_cover/translations/nl.json @@ -35,46 +35,117 @@ } }, "vertical": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Links gezichtsveld", + "fov_right": "Rechts gezichtsveld" + }, + "data_description": { + "fov_left": "Gezichtshoek naar links van het raamcentrum", + "fov_right": "Gezichtshoek naar rechts van het raamcentrum" + }, + "name": "Gezichtsveld Opties", + "description": "Stel de gezichtshoeken in voor de cover" + }, + "section_default": { + "data": { + "default_percentage": "Standaard positie", + "sunset_position": "Zonsondergang Posistie" + }, + "data_description": { + "default_percentage": "Standaard positie van de cover als de zon niet voor het raam staat", + "sunset_position": "Cover positie om naar over te schakelen na zonsondergang" + }, + "name": "Standaard positie Opties", + "description": "Stel de standaard posities in voor de cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Afwijking Zonsondergang", + "sunrise_offset": "Afwijking Zonsopkomst" + }, + "data_description": { + "sunset_offset": "Verschil (±) vanaf zonsondergang in minuten", + "sunrise_offset": "Verschil (±) vanaf zonsopkomst in minuten" + }, + "name": "Offset voor Zonsondergang en Zonsopkomst (Optioneel)", + "description": "Stel de offset in voor zonsondergang en zonsopkomst" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimale zonhoogte", + "max_elevation": "Maximale zonhoogte" + }, + "data_description": { + "min_elevation": "Minimum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat", + "max_elevation": "Maximum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat" + }, + "name": "Zonelevatie Opties (Optioneel)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "min_position": "Minimale positie", + "max_position": "Maximale positie", + "enable_min_position": "Forceer alleen de minimale positie wanneer de zon voor het raam staat", + "enable_max_position": "Forceer alleen de maximale positie wanneer de zon voor het raam staat" + }, + "data_description": { + "min_position": "Minimale verstelbare coverpositie", + "max_position": "Maximale verstelbare coverpositie" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Raam Azimuth", "window_height": "Raamhoogte", "distance_shaded_area": "Beschaduwde gebied", - "default_percentage": "Standaard positie", - "min_position": "Minimale positie", - "max_position": "Maximale positie", - "enable_min_position": "Forceer alleen de minimale positie wanneer de zon voor het raam staat", - "enable_max_position": "Forceer alleen de maximale positie wanneer de zon voor het raam staat", - "fov_left": "Links gezichtsveld", - "fov_right": "Rechts gezichtsveld", "group": "Cover Entiteiten", "inverse_state": "Draai de status om (nodig voor sommige covers die omgekeerde percentages hanteren)", - "sunset_position": "Zonsondergang Posistie", - "sunset_offset": "Afwijking Zonsondergang", "climate_mode": "Klimaatmodus", "blind_spot": "Configureer schaduwzone", - "min_elevation": "Minimale zonhoogte", - "max_elevation": "Maximale zonhoogte", "interp": "Stel aangepaste open/sluit posities in voor jouw Cover, als deze niet volledig functioneert bij 0-100%" }, "data_description": { "set_azimuth": "Stel Azimuth in", "window_height": "Specificeer raamhoogte in meters", "distance_shaded_area": "Afstand van bekleding tot beschaduwd gebied in meters", - "default_percentage": "Standaard bekledingspositie als percentage", - "min_position": "Minimale verstelbare bekledingspositie als percentage", - "max_position": "Maximale verstelbare bekledingspositie als percentage", - "fov_left": "Gezichtshoek naar links van het raamcentrum", - "fov_right": "Gezichtshoek naar rechts van het raamcentrum", "group": "Selecteer entiteiten om te besturen via integratie", - "sunset_position": "Positie om naar over te schakelen na zonsondergang", - "sunset_offset": "Verschil (±) vanaf zonsondergang in minuten", - "sunrise_offset": "Verschil (±) vanaf zonsopkomst in minuten", "climate_mode": "Configureer variabelen voor klimaatmodus" }, "description": "Voeg configuratie variabelen toe", "title": "Verticaal scherm" }, "climate": { + "sections": { + "section_lux": { + "data": { + "lux_entity": "Lux sensor", + "lux_threshold": "Lux drempelwaarde" + }, + "data_description": { + "lux_entity": "Gebruik de lux sensor om te bepalen of de zonwering verblinding moet verminderen in aanwezigheid modus", + "lux_threshold": "Drempelwaarde voor de lux sensor, boven deze waarde moet de verblinding worden verminderd" + }, + "name": "Lux Opties (Optioneel)", + "description": "Stel de lux sensor en drempelwaarde in voor verblindingsreductie" + }, + "section_irradiance": { + "data": { + "irradiance_entity": "Stralingssensor", + "irradiance_threshold": "Stralingsdrempelwaarde" + }, + "data_description": { + "irradiance_entity": "Gebruik de stralingssensor om te bepalen of de zonwering verblinding moet verminderen in aanwezigheid modus", + "irradiance_threshold": "Drempelwaarde voor de stralingssensor, boven deze waarde moet de verblinding worden verminderd" + }, + "name": "Stralingsopties (Optioneel)", + "description": "Stel de stralingssensor en drempelwaarde in voor verblindingsreductie" + } + }, "data": { "temp_entity": "Binnen temperatuur entiteit", "presence_entity": "Aanwezigheid entiteit (optioneel)", @@ -112,6 +183,70 @@ "title": "Weer Condities" }, "horizontal": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Links gezichtsveld", + "fov_right": "Rechts gezichtsveld" + }, + "data_description": { + "fov_left": "Gezichtshoek naar links van het raamcentrum", + "fov_right": "Gezichtshoek naar rechts van het raamcentrum" + }, + "name": "Gezichtsveld Opties", + "description": "Stel de gezichtshoeken in voor de cover" + }, + "section_default": { + "data": { + "default_percentage": "Standaard positie", + "sunset_position": "Zonsondergang Posistie" + }, + "data_description": { + "default_percentage": "Standaard positie van de cover als de zon niet voor het raam staat", + "sunset_position": "Cover positie om naar over te schakelen na zonsondergang" + }, + "name": "Standaard positie Opties", + "description": "Stel de standaard posities in voor de cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Afwijking Zonsondergang", + "sunrise_offset": "Afwijking Zonsopkomst" + }, + "data_description": { + "sunset_offset": "Verschil (±) vanaf zonsondergang in minuten", + "sunrise_offset": "Verschil (±) vanaf zonsopkomst in minuten" + }, + "name": "Offset voor Zonsondergang en Zonsopkomst (Optioneel)", + "description": "Stel de offset in voor zonsondergang en zonsopkomst" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimale zonhoogte", + "max_elevation": "Maximale zonhoogte" + }, + "data_description": { + "min_elevation": "Minimum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat", + "max_elevation": "Maximum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat" + }, + "name": "Zonelevatie Opties (Optioneel)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "min_position": "Minimale positie", + "max_position": "Maximale positie", + "enable_min_position": "Forceer alleen de minimale positie wanneer de zon voor het raam staat", + "enable_max_position": "Forceer alleen de maximale positie wanneer de zon voor het raam staat" + }, + "data_description": { + "min_position": "Minimale verstelbare coverpositie", + "max_position": "Maximale verstelbare coverpositie" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Raam Azimuth", "length_awning": "Zonneschermspanlengte", @@ -156,6 +291,70 @@ "title": "Horizontaal scherm" }, "tilt": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Links gezichtsveld", + "fov_right": "Rechts gezichtsveld" + }, + "data_description": { + "fov_left": "Gezichtshoek naar links van het raamcentrum", + "fov_right": "Gezichtshoek naar rechts van het raamcentrum" + }, + "name": "Gezichtsveld Opties", + "description": "Stel de gezichtshoeken in voor de cover" + }, + "section_default": { + "data": { + "default_percentage": "Standaard positie", + "sunset_position": "Zonsondergang Posistie" + }, + "data_description": { + "default_percentage": "Standaard positie van de cover als de zon niet voor het raam staat", + "sunset_position": "Cover positie om naar over te schakelen na zonsondergang" + }, + "name": "Standaard positie Opties", + "description": "Stel de standaard posities in voor de cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Afwijking Zonsondergang", + "sunrise_offset": "Afwijking Zonsopkomst" + }, + "data_description": { + "sunset_offset": "Verschil (±) vanaf zonsondergang in minuten", + "sunrise_offset": "Verschil (±) vanaf zonsopkomst in minuten" + }, + "name": "Offset voor Zonsondergang en Zonsopkomst (Optioneel)", + "description": "Stel de offset in voor zonsondergang en zonsopkomst" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimale zonhoogte", + "max_elevation": "Maximale zonhoogte" + }, + "data_description": { + "min_elevation": "Minimum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat", + "max_elevation": "Maximum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat" + }, + "name": "Zonelevatie Opties (Optioneel)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "min_position": "Minimale positie", + "max_position": "Maximale positie", + "enable_min_position": "Forceer alleen de minimale positie wanneer de zon voor het raam staat", + "enable_max_position": "Forceer alleen de maximale positie wanneer de zon voor het raam staat" + }, + "data_description": { + "min_position": "Minimale verstelbare coverpositie", + "max_position": "Maximale verstelbare coverpositie" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Raam Azimuth", "slat_depth": "Lameldiepte", @@ -265,6 +464,70 @@ } }, "vertical": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Links gezichtsveld", + "fov_right": "Rechts gezichtsveld" + }, + "data_description": { + "fov_left": "Gezichtshoek naar links van het raamcentrum", + "fov_right": "Gezichtshoek naar rechts van het raamcentrum" + }, + "name": "Gezichtsveld Opties", + "description": "Stel de gezichtshoeken in voor de cover" + }, + "section_default": { + "data": { + "default_percentage": "Standaard positie", + "sunset_position": "Zonsondergang Posistie" + }, + "data_description": { + "default_percentage": "Standaard positie van de cover als de zon niet voor het raam staat", + "sunset_position": "Cover positie om naar over te schakelen na zonsondergang" + }, + "name": "Standaard positie Opties", + "description": "Stel de standaard posities in voor de cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Afwijking Zonsondergang", + "sunrise_offset": "Afwijking Zonsopkomst" + }, + "data_description": { + "sunset_offset": "Verschil (±) vanaf zonsondergang in minuten", + "sunrise_offset": "Verschil (±) vanaf zonsopkomst in minuten" + }, + "name": "Offset voor Zonsondergang en Zonsopkomst (Optioneel)", + "description": "Stel de offset in voor zonsondergang en zonsopkomst" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimale zonhoogte", + "max_elevation": "Maximale zonhoogte" + }, + "data_description": { + "min_elevation": "Minimum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat", + "max_elevation": "Maximum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat" + }, + "name": "Zonelevatie Opties (Optioneel)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "min_position": "Minimale positie", + "max_position": "Maximale positie", + "enable_min_position": "Forceer alleen de minimale positie wanneer de zon voor het raam staat", + "enable_max_position": "Forceer alleen de maximale positie wanneer de zon voor het raam staat" + }, + "data_description": { + "min_position": "Minimale verstelbare coverpositie", + "max_position": "Maximale verstelbare coverpositie" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Raam Azimuth", "window_height": "Raamhoogte", @@ -305,6 +568,32 @@ "title": "Verticaal scherm" }, "climate": { + "sections": { + "section_lux": { + "data": { + "lux_entity": "Lux sensor", + "lux_threshold": "Lux drempelwaarde" + }, + "data_description": { + "lux_entity": "Gebruik de lux sensor om te bepalen of de zonwering verblinding moet verminderen in aanwezigheid modus", + "lux_threshold": "Drempelwaarde voor de lux sensor, boven deze waarde moet de verblinding worden verminderd" + }, + "name": "Lux Opties (Optioneel)", + "description": "Stel de lux sensor en drempelwaarde in voor verblindingsreductie" + }, + "section_irradiance": { + "data": { + "irradiance_entity": "Stralingssensor", + "irradiance_threshold": "Stralingsdrempelwaarde" + }, + "data_description": { + "irradiance_entity": "Gebruik de stralingssensor om te bepalen of de zonwering verblinding moet verminderen in aanwezigheid modus", + "irradiance_threshold": "Drempelwaarde voor de stralingssensor, boven deze waarde moet de verblinding worden verminderd" + }, + "name": "Stralingsopties (Optioneel)", + "description": "Stel de stralingssensor en drempelwaarde in voor verblindingsreductie" + } + }, "data": { "temp_entity": "Binnen temperatuur entiteit", "presence_entity": "Aanwezigheid entiteit (optioneel)", @@ -334,6 +623,70 @@ "title": "Weer Condities" }, "horizontal": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Links gezichtsveld", + "fov_right": "Rechts gezichtsveld" + }, + "data_description": { + "fov_left": "Gezichtshoek naar links van het raamcentrum", + "fov_right": "Gezichtshoek naar rechts van het raamcentrum" + }, + "name": "Gezichtsveld Opties", + "description": "Stel de gezichtshoeken in voor de cover" + }, + "section_default": { + "data": { + "default_percentage": "Standaard positie", + "sunset_position": "Zonsondergang Posistie" + }, + "data_description": { + "default_percentage": "Standaard positie van de cover als de zon niet voor het raam staat", + "sunset_position": "Cover positie om naar over te schakelen na zonsondergang" + }, + "name": "Standaard positie Opties", + "description": "Stel de standaard posities in voor de cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Afwijking Zonsondergang", + "sunrise_offset": "Afwijking Zonsopkomst" + }, + "data_description": { + "sunset_offset": "Verschil (±) vanaf zonsondergang in minuten", + "sunrise_offset": "Verschil (±) vanaf zonsopkomst in minuten" + }, + "name": "Offset voor Zonsondergang en Zonsopkomst (Optioneel)", + "description": "Stel de offset in voor zonsondergang en zonsopkomst" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimale zonhoogte", + "max_elevation": "Maximale zonhoogte" + }, + "data_description": { + "min_elevation": "Minimum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat", + "max_elevation": "Maximum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat" + }, + "name": "Zonelevatie Opties (Optioneel)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "min_position": "Minimale positie", + "max_position": "Maximale positie", + "enable_min_position": "Forceer alleen de minimale positie wanneer de zon voor het raam staat", + "enable_max_position": "Forceer alleen de maximale positie wanneer de zon voor het raam staat" + }, + "data_description": { + "min_position": "Minimale verstelbare coverpositie", + "max_position": "Maximale verstelbare coverpositie" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Raam Azimuth", "length_awning": "Zonneschermspanlengte", @@ -378,6 +731,70 @@ "title": "Horizontaal scherm" }, "tilt": { + "sections": { + "section_fov": { + "data": { + "fov_left": "Links gezichtsveld", + "fov_right": "Rechts gezichtsveld" + }, + "data_description": { + "fov_left": "Gezichtshoek naar links van het raamcentrum", + "fov_right": "Gezichtshoek naar rechts van het raamcentrum" + }, + "name": "Gezichtsveld Opties", + "description": "Stel de gezichtshoeken in voor de cover" + }, + "section_default": { + "data": { + "default_percentage": "Standaard positie", + "sunset_position": "Zonsondergang Posistie" + }, + "data_description": { + "default_percentage": "Standaard positie van de cover als de zon niet voor het raam staat", + "sunset_position": "Cover positie om naar over te schakelen na zonsondergang" + }, + "name": "Standaard positie Opties", + "description": "Stel de standaard posities in voor de cover" + }, + "section_sun_offset": { + "data": { + "sunset_offset": "Afwijking Zonsondergang", + "sunrise_offset": "Afwijking Zonsopkomst" + }, + "data_description": { + "sunset_offset": "Verschil (±) vanaf zonsondergang in minuten", + "sunrise_offset": "Verschil (±) vanaf zonsopkomst in minuten" + }, + "name": "Offset voor Zonsondergang en Zonsopkomst (Optioneel)", + "description": "Stel de offset in voor zonsondergang en zonsopkomst" + }, + "section_elevation": { + "data": { + "min_elevation": "Minimale zonhoogte", + "max_elevation": "Maximale zonhoogte" + }, + "data_description": { + "min_elevation": "Minimum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat", + "max_elevation": "Maximum Elevation hoek van de zon om te overwegen wanneer de zon voor het raam staat" + }, + "name": "Zonelevatie Opties (Optioneel)", + "description": "Set the considered elevation angles for the cover" + }, + "section_position_limits": { + "data": { + "min_position": "Minimale positie", + "max_position": "Maximale positie", + "enable_min_position": "Forceer alleen de minimale positie wanneer de zon voor het raam staat", + "enable_max_position": "Forceer alleen de maximale positie wanneer de zon voor het raam staat" + }, + "data_description": { + "min_position": "Minimale verstelbare coverpositie", + "max_position": "Maximale verstelbare coverpositie" + }, + "name": "Cover Position limit Options (Optional)", + "description": "Set the limits for the cover position" + } + }, "data": { "set_azimuth": "Raam Azimuth", "slat_depth": "Lameldiepte",