mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +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 = {
|
||||
type: "thermostat",
|
||||
entity: entityId,
|
||||
features: [
|
||||
{
|
||||
type: "climate-hvac-modes",
|
||||
hvac_modes: states[entityId]?.attributes?.hvac_modes,
|
||||
},
|
||||
],
|
||||
features:
|
||||
(states[entityId]?.attributes?.hvac_modes?.length ?? 0) > 1
|
||||
? [
|
||||
{
|
||||
type: "climate-hvac-modes",
|
||||
hvac_modes: states[entityId]?.attributes?.hvac_modes,
|
||||
},
|
||||
]
|
||||
: undefined,
|
||||
};
|
||||
cards.push(cardConfig);
|
||||
} else if (domain === "humidifier") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user