mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Migrate climate services to support translations (#96314)
* Migrate climate services to support translations * Apply suggestions from code review Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
5d5c58338f
commit
2330af82a5
@ -1,8 +1,6 @@
|
|||||||
# Describes the format for available climate services
|
# Describes the format for available climate services
|
||||||
|
|
||||||
set_aux_heat:
|
set_aux_heat:
|
||||||
name: Turn on/off auxiliary heater
|
|
||||||
description: Turn auxiliary heater on/off for climate device.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: climate
|
domain: climate
|
||||||
@ -10,15 +8,11 @@ set_aux_heat:
|
|||||||
- climate.ClimateEntityFeature.AUX_HEAT
|
- climate.ClimateEntityFeature.AUX_HEAT
|
||||||
fields:
|
fields:
|
||||||
aux_heat:
|
aux_heat:
|
||||||
name: Auxiliary heating
|
|
||||||
description: New value of auxiliary heater.
|
|
||||||
required: true
|
required: true
|
||||||
selector:
|
selector:
|
||||||
boolean:
|
boolean:
|
||||||
|
|
||||||
set_preset_mode:
|
set_preset_mode:
|
||||||
name: Set preset mode
|
|
||||||
description: Set preset mode for climate device.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: climate
|
domain: climate
|
||||||
@ -26,16 +20,12 @@ set_preset_mode:
|
|||||||
- climate.ClimateEntityFeature.PRESET_MODE
|
- climate.ClimateEntityFeature.PRESET_MODE
|
||||||
fields:
|
fields:
|
||||||
preset_mode:
|
preset_mode:
|
||||||
name: Preset mode
|
|
||||||
description: New value of preset mode.
|
|
||||||
required: true
|
required: true
|
||||||
example: "away"
|
example: "away"
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
|
|
||||||
set_temperature:
|
set_temperature:
|
||||||
name: Set temperature
|
|
||||||
description: Set target temperature of climate device.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: climate
|
domain: climate
|
||||||
@ -44,8 +34,6 @@ set_temperature:
|
|||||||
- climate.ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
- climate.ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
||||||
fields:
|
fields:
|
||||||
temperature:
|
temperature:
|
||||||
name: Temperature
|
|
||||||
description: New target temperature for HVAC.
|
|
||||||
filter:
|
filter:
|
||||||
supported_features:
|
supported_features:
|
||||||
- climate.ClimateEntityFeature.TARGET_TEMPERATURE
|
- climate.ClimateEntityFeature.TARGET_TEMPERATURE
|
||||||
@ -56,8 +44,6 @@ set_temperature:
|
|||||||
step: 0.1
|
step: 0.1
|
||||||
mode: box
|
mode: box
|
||||||
target_temp_high:
|
target_temp_high:
|
||||||
name: Target temperature high
|
|
||||||
description: New target high temperature for HVAC.
|
|
||||||
filter:
|
filter:
|
||||||
supported_features:
|
supported_features:
|
||||||
- climate.ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
- climate.ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
||||||
@ -69,8 +55,6 @@ set_temperature:
|
|||||||
step: 0.1
|
step: 0.1
|
||||||
mode: box
|
mode: box
|
||||||
target_temp_low:
|
target_temp_low:
|
||||||
name: Target temperature low
|
|
||||||
description: New target low temperature for HVAC.
|
|
||||||
filter:
|
filter:
|
||||||
supported_features:
|
supported_features:
|
||||||
- climate.ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
- climate.ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
||||||
@ -82,29 +66,18 @@ set_temperature:
|
|||||||
step: 0.1
|
step: 0.1
|
||||||
mode: box
|
mode: box
|
||||||
hvac_mode:
|
hvac_mode:
|
||||||
name: HVAC mode
|
|
||||||
description: HVAC operation mode to set temperature to.
|
|
||||||
selector:
|
selector:
|
||||||
select:
|
select:
|
||||||
options:
|
options:
|
||||||
- label: "Off"
|
- "off"
|
||||||
value: "off"
|
- "auto"
|
||||||
- label: "Auto"
|
- "cool"
|
||||||
value: "auto"
|
- "dry"
|
||||||
- label: "Cool"
|
- "fan_only"
|
||||||
value: "cool"
|
- "heat_cool"
|
||||||
- label: "Dry"
|
- "heat"
|
||||||
value: "dry"
|
translation_key: hvac_mode
|
||||||
- label: "Fan Only"
|
|
||||||
value: "fan_only"
|
|
||||||
- label: "Heat/Cool"
|
|
||||||
value: "heat_cool"
|
|
||||||
- label: "Heat"
|
|
||||||
value: "heat"
|
|
||||||
|
|
||||||
set_humidity:
|
set_humidity:
|
||||||
name: Set target humidity
|
|
||||||
description: Set target humidity of climate device.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: climate
|
domain: climate
|
||||||
@ -112,8 +85,6 @@ set_humidity:
|
|||||||
- climate.ClimateEntityFeature.TARGET_HUMIDITY
|
- climate.ClimateEntityFeature.TARGET_HUMIDITY
|
||||||
fields:
|
fields:
|
||||||
humidity:
|
humidity:
|
||||||
name: Humidity
|
|
||||||
description: New target humidity for climate device.
|
|
||||||
required: true
|
required: true
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
@ -122,8 +93,6 @@ set_humidity:
|
|||||||
unit_of_measurement: "%"
|
unit_of_measurement: "%"
|
||||||
|
|
||||||
set_fan_mode:
|
set_fan_mode:
|
||||||
name: Set fan mode
|
|
||||||
description: Set fan operation for climate device.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: climate
|
domain: climate
|
||||||
@ -131,44 +100,29 @@ set_fan_mode:
|
|||||||
- climate.ClimateEntityFeature.FAN_MODE
|
- climate.ClimateEntityFeature.FAN_MODE
|
||||||
fields:
|
fields:
|
||||||
fan_mode:
|
fan_mode:
|
||||||
name: Fan mode
|
|
||||||
description: New value of fan mode.
|
|
||||||
required: true
|
required: true
|
||||||
example: "low"
|
example: "low"
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
|
|
||||||
set_hvac_mode:
|
set_hvac_mode:
|
||||||
name: Set HVAC mode
|
|
||||||
description: Set HVAC operation mode for climate device.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: climate
|
domain: climate
|
||||||
fields:
|
fields:
|
||||||
hvac_mode:
|
hvac_mode:
|
||||||
name: HVAC mode
|
|
||||||
description: New value of operation mode.
|
|
||||||
selector:
|
selector:
|
||||||
select:
|
select:
|
||||||
options:
|
options:
|
||||||
- label: "Off"
|
- "off"
|
||||||
value: "off"
|
- "auto"
|
||||||
- label: "Auto"
|
- "cool"
|
||||||
value: "auto"
|
- "dry"
|
||||||
- label: "Cool"
|
- "fan_only"
|
||||||
value: "cool"
|
- "heat_cool"
|
||||||
- label: "Dry"
|
- "heat"
|
||||||
value: "dry"
|
translation_key: hvac_mode
|
||||||
- label: "Fan Only"
|
|
||||||
value: "fan_only"
|
|
||||||
- label: "Heat/Cool"
|
|
||||||
value: "heat_cool"
|
|
||||||
- label: "Heat"
|
|
||||||
value: "heat"
|
|
||||||
|
|
||||||
set_swing_mode:
|
set_swing_mode:
|
||||||
name: Set swing mode
|
|
||||||
description: Set swing operation for climate device.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: climate
|
domain: climate
|
||||||
@ -176,23 +130,17 @@ set_swing_mode:
|
|||||||
- climate.ClimateEntityFeature.SWING_MODE
|
- climate.ClimateEntityFeature.SWING_MODE
|
||||||
fields:
|
fields:
|
||||||
swing_mode:
|
swing_mode:
|
||||||
name: Swing mode
|
|
||||||
description: New value of swing mode.
|
|
||||||
required: true
|
required: true
|
||||||
example: "horizontal"
|
example: "horizontal"
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
|
|
||||||
turn_on:
|
turn_on:
|
||||||
name: Turn on
|
|
||||||
description: Turn climate device on.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: climate
|
domain: climate
|
||||||
|
|
||||||
turn_off:
|
turn_off:
|
||||||
name: Turn off
|
|
||||||
description: Turn climate device off.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: climate
|
domain: climate
|
||||||
|
@ -28,9 +28,15 @@
|
|||||||
"fan_only": "Fan only"
|
"fan_only": "Fan only"
|
||||||
},
|
},
|
||||||
"state_attributes": {
|
"state_attributes": {
|
||||||
"aux_heat": { "name": "Aux heat" },
|
"aux_heat": {
|
||||||
"current_humidity": { "name": "Current humidity" },
|
"name": "Aux heat"
|
||||||
"current_temperature": { "name": "Current temperature" },
|
},
|
||||||
|
"current_humidity": {
|
||||||
|
"name": "Current humidity"
|
||||||
|
},
|
||||||
|
"current_temperature": {
|
||||||
|
"name": "Current temperature"
|
||||||
|
},
|
||||||
"fan_mode": {
|
"fan_mode": {
|
||||||
"name": "Fan mode",
|
"name": "Fan mode",
|
||||||
"state": {
|
"state": {
|
||||||
@ -49,7 +55,9 @@
|
|||||||
"fan_modes": {
|
"fan_modes": {
|
||||||
"name": "Fan modes"
|
"name": "Fan modes"
|
||||||
},
|
},
|
||||||
"humidity": { "name": "Target humidity" },
|
"humidity": {
|
||||||
|
"name": "Target humidity"
|
||||||
|
},
|
||||||
"hvac_action": {
|
"hvac_action": {
|
||||||
"name": "Current action",
|
"name": "Current action",
|
||||||
"state": {
|
"state": {
|
||||||
@ -65,10 +73,18 @@
|
|||||||
"hvac_modes": {
|
"hvac_modes": {
|
||||||
"name": "HVAC modes"
|
"name": "HVAC modes"
|
||||||
},
|
},
|
||||||
"max_humidity": { "name": "Max target humidity" },
|
"max_humidity": {
|
||||||
"max_temp": { "name": "Max target temperature" },
|
"name": "Max target humidity"
|
||||||
"min_humidity": { "name": "Min target humidity" },
|
},
|
||||||
"min_temp": { "name": "Min target temperature" },
|
"max_temp": {
|
||||||
|
"name": "Max target temperature"
|
||||||
|
},
|
||||||
|
"min_humidity": {
|
||||||
|
"name": "Min target humidity"
|
||||||
|
},
|
||||||
|
"min_temp": {
|
||||||
|
"name": "Min target temperature"
|
||||||
|
},
|
||||||
"preset_mode": {
|
"preset_mode": {
|
||||||
"name": "Preset",
|
"name": "Preset",
|
||||||
"state": {
|
"state": {
|
||||||
@ -98,10 +114,123 @@
|
|||||||
"swing_modes": {
|
"swing_modes": {
|
||||||
"name": "Swing modes"
|
"name": "Swing modes"
|
||||||
},
|
},
|
||||||
"target_temp_high": { "name": "Upper target temperature" },
|
"target_temp_high": {
|
||||||
"target_temp_low": { "name": "Lower target temperature" },
|
"name": "Upper target temperature"
|
||||||
"target_temp_step": { "name": "Target temperature step" },
|
},
|
||||||
"temperature": { "name": "Target temperature" }
|
"target_temp_low": {
|
||||||
|
"name": "Lower target temperature"
|
||||||
|
},
|
||||||
|
"target_temp_step": {
|
||||||
|
"name": "Target temperature step"
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"name": "Target temperature"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"services": {
|
||||||
|
"set_aux_heat": {
|
||||||
|
"name": "Turn on/off auxiliary heater",
|
||||||
|
"description": "Turns auxiliary heater on/off.",
|
||||||
|
"fields": {
|
||||||
|
"aux_heat": {
|
||||||
|
"name": "Auxiliary heating",
|
||||||
|
"description": "New value of auxiliary heater."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"set_preset_mode": {
|
||||||
|
"name": "Set preset mode",
|
||||||
|
"description": "Sets preset mode.",
|
||||||
|
"fields": {
|
||||||
|
"preset_mode": {
|
||||||
|
"name": "Preset mode",
|
||||||
|
"description": "Preset mode."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"set_temperature": {
|
||||||
|
"name": "Set target temperature",
|
||||||
|
"description": "Sets target temperature.",
|
||||||
|
"fields": {
|
||||||
|
"temperature": {
|
||||||
|
"name": "Temperature",
|
||||||
|
"description": "Target temperature."
|
||||||
|
},
|
||||||
|
"target_temp_high": {
|
||||||
|
"name": "Target temperature high",
|
||||||
|
"description": "High target temperature."
|
||||||
|
},
|
||||||
|
"target_temp_low": {
|
||||||
|
"name": "Target temperature low",
|
||||||
|
"description": "Low target temperature."
|
||||||
|
},
|
||||||
|
"hvac_mode": {
|
||||||
|
"name": "HVAC mode",
|
||||||
|
"description": "HVAC operation mode."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"set_humidity": {
|
||||||
|
"name": "Set target humidity",
|
||||||
|
"description": "Sets target humidity.",
|
||||||
|
"fields": {
|
||||||
|
"humidity": {
|
||||||
|
"name": "Humidity",
|
||||||
|
"description": "Target humidity."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"set_fan_mode": {
|
||||||
|
"name": "Set fan mode",
|
||||||
|
"description": "Sets fan operation mode.",
|
||||||
|
"fields": {
|
||||||
|
"fan_mode": {
|
||||||
|
"name": "Fan mode",
|
||||||
|
"description": "Fan operation mode."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"set_hvac_mode": {
|
||||||
|
"name": "Set HVAC mode",
|
||||||
|
"description": "Sets HVAC operation mode.",
|
||||||
|
"fields": {
|
||||||
|
"hvac_mode": {
|
||||||
|
"name": "HVAC mode",
|
||||||
|
"description": "HVAC operation mode."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"set_swing_mode": {
|
||||||
|
"name": "Set swing mode",
|
||||||
|
"description": "Sets swing operation mode.",
|
||||||
|
"fields": {
|
||||||
|
"swing_mode": {
|
||||||
|
"name": "Swing mode",
|
||||||
|
"description": "Swing operation mode."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"turn_on": {
|
||||||
|
"name": "Turn on",
|
||||||
|
"description": "Turns climate device on."
|
||||||
|
},
|
||||||
|
"turn_off": {
|
||||||
|
"name": "Turn off",
|
||||||
|
"description": "Turns climate device off."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"selector": {
|
||||||
|
"hvac_mode": {
|
||||||
|
"options": {
|
||||||
|
"off": "Off",
|
||||||
|
"auto": "Auto",
|
||||||
|
"cool": "Cool",
|
||||||
|
"dry": "Dry",
|
||||||
|
"fan_only": "Fan only",
|
||||||
|
"heat_cool": "Heat/cool",
|
||||||
|
"heat": "Heat"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user