diff --git a/homeassistant/components/ecobee/climate.py b/homeassistant/components/ecobee/climate.py index 1b0e65f7390c8f9e9bb16a55393c55664beab9e6..e15a8e1d3d887fadae2014fd9682e729a6e87f16 100644 --- a/homeassistant/components/ecobee/climate.py +++ b/homeassistant/components/ecobee/climate.py @@ -115,9 +115,12 @@ SERVICE_SET_DST_MODE = "set_dst_mode" SERVICE_SET_MIC_MODE = "set_mic_mode" SERVICE_SET_OCCUPANCY_MODES = "set_occupancy_modes" -DTGROUP_INCLUSIVE_MSG = ( - f"{ATTR_START_DATE}, {ATTR_START_TIME}, {ATTR_END_DATE}, " - f"and {ATTR_END_TIME} must be specified together" +DTGROUP_START_INCLUSIVE_MSG = ( + f"{ATTR_START_DATE} and {ATTR_START_TIME} must be specified together" +) + +DTGROUP_END_INCLUSIVE_MSG = ( + f"{ATTR_END_DATE} and {ATTR_END_TIME} must be specified together" ) CREATE_VACATION_SCHEMA = vol.Schema( @@ -127,13 +130,17 @@ CREATE_VACATION_SCHEMA = vol.Schema( vol.Required(ATTR_COOL_TEMP): vol.Coerce(float), vol.Required(ATTR_HEAT_TEMP): vol.Coerce(float), vol.Inclusive( - ATTR_START_DATE, "dtgroup", msg=DTGROUP_INCLUSIVE_MSG + ATTR_START_DATE, "dtgroup_start", msg=DTGROUP_START_INCLUSIVE_MSG + ): ecobee_date, + vol.Inclusive( + ATTR_START_TIME, "dtgroup_start", msg=DTGROUP_START_INCLUSIVE_MSG + ): ecobee_time, + vol.Inclusive( + ATTR_END_DATE, "dtgroup_end", msg=DTGROUP_END_INCLUSIVE_MSG ): ecobee_date, vol.Inclusive( - ATTR_START_TIME, "dtgroup", msg=DTGROUP_INCLUSIVE_MSG + ATTR_END_TIME, "dtgroup_end", msg=DTGROUP_END_INCLUSIVE_MSG ): ecobee_time, - vol.Inclusive(ATTR_END_DATE, "dtgroup", msg=DTGROUP_INCLUSIVE_MSG): ecobee_date, - vol.Inclusive(ATTR_END_TIME, "dtgroup", msg=DTGROUP_INCLUSIVE_MSG): ecobee_time, vol.Optional(ATTR_FAN_MODE, default="auto"): vol.Any("auto", "on"), vol.Optional(ATTR_FAN_MIN_ON_TIME, default=0): vol.All( int, vol.Range(min=0, max=60) diff --git a/homeassistant/components/ecobee/strings.json b/homeassistant/components/ecobee/strings.json index fc43fc3000ec52adb2fb8da784cde6b99176e62b..484d5bf1e1e6cd7079adf0622e63c52f2bc8f2ce 100644 --- a/homeassistant/components/ecobee/strings.json +++ b/homeassistant/components/ecobee/strings.json @@ -52,7 +52,7 @@ }, "start_date": { "name": "Start date", - "description": "Date the vacation starts in the YYYY-MM-DD format (optional, immediately if not provided along with start_time, end_date, and end_time)." + "description": "Date the vacation starts in the YYYY-MM-DD format (optional, immediately if not provided along with start_time)." }, "start_time": { "name": "Start time", @@ -60,7 +60,7 @@ }, "end_date": { "name": "End date", - "description": "Date the vacation ends in the YYYY-MM-DD format (optional, 14 days from now if not provided along with start_date, start_time, and end_time)." + "description": "Date the vacation ends in the YYYY-MM-DD format (optional, 14 days from now if not provided along with end_time)." }, "end_time": { "name": "End time",