mirror of
https://github.com/home-assistant/iOS.git
synced 2026-04-21 05:55:01 -05:00
Periodically update sensors from local push extension (#2138)
## Summary When the Local Push extension is running (when we're on Wi-Fi in an SSID marked as 'Internal' and location is set to Always), we're given a persistent opportunity to do work. When we're running, we now update sensors on a regular interval. ## Link to pull request in Documentation repository Documentation: home-assistant/companion.home-assistant#753 ## Any other notes Updating the metadata/sensors every 5 minutes (by default) should have minimal, if any, battery implications. This follows the same setting as the "Periodic" timer which we use for foreground updates.
This commit is contained in:
@@ -136,10 +136,11 @@ public class HomeAssistantAPI {
|
||||
case cold
|
||||
case warm
|
||||
case periodic
|
||||
case background
|
||||
|
||||
var updateSensorTrigger: LocationUpdateTrigger {
|
||||
switch self {
|
||||
case .cold, .warm:
|
||||
case .cold, .warm, .background:
|
||||
return .Launch
|
||||
case .periodic:
|
||||
return .Periodic
|
||||
|
||||
Reference in New Issue
Block a user