mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Hide climate mode control on default dashboard if there is only one hvac mode (#18964)
Hide hvac mode on default dashboard if there is only one hvac mode
This commit is contained in:
parent
61117bb34f
commit
6d36b0e28c
@ -143,12 +143,15 @@ export const computeCards = (
|
|||||||
const cardConfig: ThermostatCardConfig = {
|
const cardConfig: ThermostatCardConfig = {
|
||||||
type: "thermostat",
|
type: "thermostat",
|
||||||
entity: entityId,
|
entity: entityId,
|
||||||
features: [
|
features:
|
||||||
{
|
(states[entityId]?.attributes?.hvac_modes?.length ?? 0) > 1
|
||||||
type: "climate-hvac-modes",
|
? [
|
||||||
hvac_modes: states[entityId]?.attributes?.hvac_modes,
|
{
|
||||||
},
|
type: "climate-hvac-modes",
|
||||||
],
|
hvac_modes: states[entityId]?.attributes?.hvac_modes,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
cards.push(cardConfig);
|
cards.push(cardConfig);
|
||||||
} else if (domain === "humidifier") {
|
} else if (domain === "humidifier") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user