show ntp time in status, use useInterval everywhere instead of alova's AutoRequest

This commit is contained in:
proddy
2024-12-21 16:30:05 +01:00
parent 6d22f6aebf
commit b0c29b57c7
17 changed files with 80 additions and 63 deletions

View File

@@ -57,7 +57,7 @@ const CustomEntities = () => {
if (!dialogOpen && !numChanges) {
void fetchEntities();
}
}, 3000);
});
const { send: writeEntities } = useRequest(
(data: Entities) => writeCustomEntities(data),

View File

@@ -149,7 +149,7 @@ const Dashboard = () => {
if (!deviceValueDialogOpen) {
void fetchDashboard();
}
}, 3000);
});
useEffect(() => {
showAll

View File

@@ -419,7 +419,7 @@ const Devices = () => {
if (!deviceValueDialogOpen) {
selectedDevice ? void sendDeviceData(selectedDevice) : void sendCoreData();
}
}, 3000);
});
const deviceValueDialogSave = async (devicevalue: DeviceValue) => {
const id = Number(device_select.state.id);

View File

@@ -90,7 +90,7 @@ const Sensors = () => {
if (!temperatureDialogOpen && !analogDialogOpen) {
void fetchSensorData();
}
}, 3000);
});
const common_theme = useTheme({
BaseRow: `