     }
   }
 
-  private func fetchPowerNowAndUsageToday() -> Observable<(Double, Double)> {
-    guard let useFeedId = self.appData.useFeedId, let kwhFeedId = self.appData.kwhFeedId else {
-      return Observable.empty()
-    }
-
+  private func fetchPowerNowAndUsageToday(useFeedId: String, kwhFeedId: String) -> Observable<(Double, Double)> {
     let calendar = Calendar.current
     let dateComponents = calendar.dateComponents([.year, .month, .day], from: Date())
     let midnightToday = calendar.date(from: dateComponents)!

import RxCocoa
import RealmSwift

class MyElectricAppViewModel {

  typealias MyElectricData = (powerNow: Double, usageToday: Double, lineChartData: [DataPoint], barChartData: [DataPoint])


      .flatMapFirst { [weak self] () -> Observable<MyElectricData> in
        guard let strongSelf = self else { return Observable.empty() }
        return strongSelf.update()
          .catchError { [weak self] error in
            let typedError = error as? MyElectricAppError ?? .generic
            self?.errorsSubject.onNext(typedError)
            return Observable.empty()
          }
          .trackActivity(isRefreshing)
      }
      .asDriver(onErrorJustReturn: MyElectricData(powerNow: 0.0, usageToday: 0.0, lineChartData: [], barChartData: []))
