Esempio n. 1
0
    public DebugService(
        IHostApplicationLifetime hostLifetime,
        IHomeAssistantRunner homeAssistantRunner,
        IOptions <HomeAssistantSettings> settings,
        ILogger <DebugService> logger)
    {
        _haSettings          = settings.Value;
        _hostLifetime        = hostLifetime;
        _homeAssistantRunner = homeAssistantRunner;
        _logger = logger;

        homeAssistantRunner.OnConnect
        .Select(async s => await OnHomeAssistantClientConnected(s).ConfigureAwait(false))
        .Subscribe();
        homeAssistantRunner.OnDisconnect.Subscribe(OnHomeAssistantClientDisconnected);
    }
Esempio n. 2
0
 public NetDaemonRuntime(
     IHomeAssistantRunner homeAssistantRunner,
     IOptions <HomeAssistantSettings> settings,
     IOptions <AppConfigurationLocationSetting> locationSettings,
     IAppModel appModel,
     IServiceProvider serviceProvider,
     ILogger <NetDaemonRuntime> logger,
     ICacheManager cacheManager)
 {
     _haSettings          = settings.Value;
     _homeAssistantRunner = homeAssistantRunner;
     _locationSettings    = locationSettings;
     _appModel            = appModel;
     _serviceProvider     = serviceProvider;
     _logger       = logger;
     _cacheManager = cacheManager;
 }
Esempio n. 3
0
 public AppStateRepository(IHomeAssistantRunner runner, IHostEnvironment hostEnvironment)
 {
     _runner          = runner;
     _hostEnvironment = hostEnvironment;
 }