mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Combine climate graph with temperature device_classes (#19485)
This commit is contained in:
parent
2b18db8525
commit
528533a2dd
@ -470,9 +470,15 @@ export const computeHistory = (
|
||||
}[domain];
|
||||
}
|
||||
|
||||
const deviceClass: string | undefined = (
|
||||
currentState?.attributes || numericStateFromHistory?.a
|
||||
)?.device_class;
|
||||
const specialDomainClasses = {
|
||||
climate: "temperature",
|
||||
humidifier: "humidity",
|
||||
water_heater: "temperature",
|
||||
};
|
||||
|
||||
const deviceClass: string | undefined =
|
||||
specialDomainClasses[domain] ||
|
||||
(currentState?.attributes || numericStateFromHistory?.a)?.device_class;
|
||||
|
||||
const key = computeGroupKey(unit, deviceClass, splitDeviceClasses);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user