findmydevice 고정밀 상태 토글과 5초 갱신
This commit is contained in:
@@ -442,6 +442,7 @@ $fdescendedUrl = $entities['daily_floors'];
|
||||
$stepsUrl = $entities['daily_steps'];
|
||||
$distanceUrl = $entities['daily_distance'];
|
||||
$triggerUrl = $entities['trigger'];
|
||||
$highAccuracyModeUrl = $entities['high_accuracy_mode'] ?? 'binary_sensor.seocaegeonyi_z_fold7_high_accuracy_mode';
|
||||
|
||||
// GET 파라미터 읽기
|
||||
$startParam = $_GET['startTime'] ?? null;
|
||||
@@ -587,6 +588,7 @@ $ascendedData = getData($fascendedUrl);
|
||||
$descendedData = getData($fdescendedUrl);
|
||||
$stepsData = getData($stepsUrl);
|
||||
$distanceData = getData($distanceUrl);
|
||||
$highAccuracyModeData = getData($highAccuracyModeUrl);
|
||||
$historySets = [];
|
||||
if ($includeHistory) {
|
||||
foreach ($findmydeviceHaProfiles as $profile) {
|
||||
@@ -833,6 +835,7 @@ $activityState = $activityData['state'] ?? null;
|
||||
$aaccuracyState = $activityData['attributes']['Confidence'] ?? $activityData['attributes']['confidence'] ?? null;
|
||||
$connectionState = $connectionData['state'] ?? null;
|
||||
$batteryState = $batteryStateData['state'] ?? null;
|
||||
$highAccuracyMode = strtolower((string)($highAccuracyModeData['state'] ?? '')) === 'on';
|
||||
|
||||
$address = null;
|
||||
|
||||
@@ -890,6 +893,7 @@ if (isset($_GET['hashonly']) && $_GET['hashonly'] == '1') {
|
||||
'activity' => $activityMap[$lang][$activityState] ?? $activityState ?? null,
|
||||
'aaccuracy' => $aaccuracyMap[$lang][$aaccuracyState] ?? $aaccuracyState ?? null,
|
||||
'connection' => $connectionMap[$lang][$connectionState] ?? $connectionState ?? null,
|
||||
'highAccuracyMode' => $highAccuracyMode,
|
||||
'sensors' => $sensorSections,
|
||||
'home' => $findmydeviceHome,
|
||||
]);
|
||||
@@ -914,6 +918,7 @@ echo json_encode([
|
||||
'activity' => $activityMap[$lang][$activityState] ?? $activityState ?? null,
|
||||
'aaccuracy' => $aaccuracyMap[$lang][$aaccuracyState] ?? $aaccuracyState ?? null,
|
||||
'connection' => $connectionMap[$lang][$connectionState] ?? $connectionState ?? null,
|
||||
'highAccuracyMode' => $highAccuracyMode,
|
||||
'sensors' => $sensorSections,
|
||||
'home' => $findmydeviceHome,
|
||||
'history' => $includeHistory ? $path : null,
|
||||
|
||||
Reference in New Issue
Block a user