mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
climate: Add preset exemple (#19092)
* Add none, frost_protection & auto preset mode icons * Revert preset icons addition
This commit is contained in:
parent
5de53964d9
commit
7ca5467f4c
@ -36,6 +36,45 @@ const ENTITIES = [
|
|||||||
friendly_name: "Nest",
|
friendly_name: "Nest",
|
||||||
supported_features: 43,
|
supported_features: 43,
|
||||||
}),
|
}),
|
||||||
|
getEntity("climate", "overkiz_radiator", "heat", {
|
||||||
|
current_temperature: 18,
|
||||||
|
min_temp: 7,
|
||||||
|
max_temp: 35,
|
||||||
|
temperature: 20,
|
||||||
|
hvac_modes: ["heat", "auto", "off"],
|
||||||
|
friendly_name: "Overkiz radiator",
|
||||||
|
supported_features: 17,
|
||||||
|
preset_mode: "comfort",
|
||||||
|
preset_modes: [
|
||||||
|
"none",
|
||||||
|
"frost_protection",
|
||||||
|
"eco",
|
||||||
|
"comfort",
|
||||||
|
"comfort-1",
|
||||||
|
"comfort-2",
|
||||||
|
"auto",
|
||||||
|
"boost",
|
||||||
|
"external",
|
||||||
|
"prog",
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
getEntity("climate", "overkiz_towel_dryer", "heat", {
|
||||||
|
current_temperature: null,
|
||||||
|
min_temp: 7,
|
||||||
|
max_temp: 35,
|
||||||
|
hvac_modes: ["heat", "off"],
|
||||||
|
friendly_name: "Overkiz towel dryer",
|
||||||
|
supported_features: 16,
|
||||||
|
preset_mode: "eco",
|
||||||
|
preset_modes: [
|
||||||
|
"none",
|
||||||
|
"frost_protection",
|
||||||
|
"eco",
|
||||||
|
"comfort",
|
||||||
|
"comfort-1",
|
||||||
|
"comfort-2",
|
||||||
|
],
|
||||||
|
}),
|
||||||
getEntity("climate", "sensibo", "fan_only", {
|
getEntity("climate", "sensibo", "fan_only", {
|
||||||
current_temperature: null,
|
current_temperature: null,
|
||||||
temperature: null,
|
temperature: null,
|
||||||
@ -61,8 +100,6 @@ const CONFIGS = [
|
|||||||
config: `
|
config: `
|
||||||
- type: thermostat
|
- type: thermostat
|
||||||
entity: climate.ecobee
|
entity: climate.ecobee
|
||||||
- type: thermostat
|
|
||||||
entity: climate.nest
|
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -72,6 +109,66 @@ const CONFIGS = [
|
|||||||
entity: climate.nest
|
entity: climate.nest
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
heading: "Feature example",
|
||||||
|
config: `
|
||||||
|
- type: thermostat
|
||||||
|
entity: climate.overkiz_radiator
|
||||||
|
features:
|
||||||
|
- type: climate-hvac-modes
|
||||||
|
hvac_modes:
|
||||||
|
- heat
|
||||||
|
- 'off'
|
||||||
|
- auto
|
||||||
|
- type: climate-preset-modes
|
||||||
|
style: icons
|
||||||
|
preset_modes:
|
||||||
|
- none
|
||||||
|
- frost_protection
|
||||||
|
- eco
|
||||||
|
- comfort
|
||||||
|
- comfort-1
|
||||||
|
- comfort-2
|
||||||
|
- auto
|
||||||
|
- boost
|
||||||
|
- external
|
||||||
|
- prog
|
||||||
|
- type: climate-preset-modes
|
||||||
|
style: dropdown
|
||||||
|
preset_modes:
|
||||||
|
- none
|
||||||
|
- frost_protection
|
||||||
|
- eco
|
||||||
|
- comfort
|
||||||
|
- comfort-1
|
||||||
|
- comfort-2
|
||||||
|
- auto
|
||||||
|
- boost
|
||||||
|
- external
|
||||||
|
- prog
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
heading: "Preset only example",
|
||||||
|
config: `
|
||||||
|
- type: thermostat
|
||||||
|
entity: climate.overkiz_towel_dryer
|
||||||
|
features:
|
||||||
|
- type: climate-hvac-modes
|
||||||
|
hvac_modes:
|
||||||
|
- heat
|
||||||
|
- 'off'
|
||||||
|
- type: climate-preset-modes
|
||||||
|
style: icons
|
||||||
|
preset_modes:
|
||||||
|
- none
|
||||||
|
- frost_protection
|
||||||
|
- eco
|
||||||
|
- comfort
|
||||||
|
- comfort-1
|
||||||
|
- comfort-2
|
||||||
|
`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
heading: "Fan only example",
|
heading: "Fan only example",
|
||||||
config: `
|
config: `
|
||||||
|
@ -11,7 +11,7 @@ import "../../components/demo-more-infos";
|
|||||||
import { ClimateEntityFeature } from "../../../../src/data/climate";
|
import { ClimateEntityFeature } from "../../../../src/data/climate";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("climate", "thermostat", "heat", {
|
getEntity("climate", "radiator", "heat", {
|
||||||
friendly_name: "Basic heater",
|
friendly_name: "Basic heater",
|
||||||
hvac_modes: ["heat", "off"],
|
hvac_modes: ["heat", "off"],
|
||||||
hvac_mode: "heat",
|
hvac_mode: "heat",
|
||||||
@ -80,6 +80,24 @@ const ENTITIES = [
|
|||||||
max_humidity: 100,
|
max_humidity: 100,
|
||||||
humidity: 50,
|
humidity: 50,
|
||||||
}),
|
}),
|
||||||
|
getEntity("climate", "towel_dryer", "heat", {
|
||||||
|
friendly_name: "Preset only heater",
|
||||||
|
hvac_modes: ["heat", "off"],
|
||||||
|
hvac_mode: "heat",
|
||||||
|
preset_modes: [
|
||||||
|
"none",
|
||||||
|
"frost_protection",
|
||||||
|
"eco",
|
||||||
|
"comfort",
|
||||||
|
"comfort-1",
|
||||||
|
"comfort-2",
|
||||||
|
],
|
||||||
|
preset_mode: "eco",
|
||||||
|
current_temperature: null,
|
||||||
|
min_temp: 7,
|
||||||
|
max_temp: 35,
|
||||||
|
supported_features: ClimateEntityFeature.PRESET_MODE,
|
||||||
|
}),
|
||||||
getEntity("climate", "unavailable", "unavailable", {
|
getEntity("climate", "unavailable", "unavailable", {
|
||||||
friendly_name: "Unavailable heater",
|
friendly_name: "Unavailable heater",
|
||||||
hvac_modes: ["heat", "off"],
|
hvac_modes: ["heat", "off"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user