Ejemplo n.º 1
0
        private async void SetAwayModeAsync(bool isAway)
        {
            Structure structure = GetFirstStructure();

            if (structure.IsAway == isAway)
            {
                return;
            }

            await PauseStatusProviderWhile(async() => {
                structure.IsAway = isAway;
                await _nestWebService.SetAwayMode(structure, isAway);
            });
        }
Ejemplo n.º 2
0
        private async void SetAwayModeAsync(bool isAway)
        {
            Structure structure = GetFirstStructure();

            if (structure.IsAway == isAway)
            {
                return;
            }

            try {
                _statusProvider.Stop();
                structure.IsAway = isAway;
                await _nestWebService.SetAwayMode(structure, isAway);
            }
            finally {
                _statusProvider.Start();
            }
        }