updated the component and device api's to have as be a parameter for the function
This commit is contained in:
parent
c617ebf868
commit
b62c7dbe5c
39 changed files with 346 additions and 651 deletions
|
|
@ -90,7 +90,7 @@ export default function ObjectHeaterCharts(props: Props) {
|
|||
const now = moment();
|
||||
const theme = useTheme();
|
||||
const [mutationData, setMutationData] = useState<MutationData[]>([]);
|
||||
const [{ user }] = useGlobalState();
|
||||
const [{ user, as }] = useGlobalState();
|
||||
const themeType = useThemeType();
|
||||
const classes = useStyles();
|
||||
const [mutationsLoading, setMutationsLoading] = useState(false);
|
||||
|
|
@ -165,7 +165,7 @@ export default function ObjectHeaterCharts(props: Props) {
|
|||
setTempOnly(tempOnly);
|
||||
setHeater(heater);
|
||||
deviceAPI
|
||||
.listJSONMeasurements(dev.id(), measurementsFor, start, end, 0, 0, "asc", "timestamp")
|
||||
.listJSONMeasurements(dev.id(), measurementsFor, start, end, 0, 0, "asc", "timestamp", as)
|
||||
.then(resp => {
|
||||
resp.data.components.forEach(comp => {
|
||||
if (comp.componentId === tempHum?.key()) {
|
||||
|
|
@ -192,7 +192,7 @@ export default function ObjectHeaterCharts(props: Props) {
|
|||
}
|
||||
});
|
||||
});
|
||||
}, [device, deviceAPI, start, end]); //eslint-disable-line react-hooks/exhaustive-deps
|
||||
}, [device, deviceAPI, start, end, as]); //eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
const updateDateRange = (newStartDate: any, newEndDate: any, live: boolean) => {
|
||||
setStart(newStartDate);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue