7474CONF_PROXY = "proxy"
7575CONF_SSL = "ssl"
7676
77+ CONF_CLOUD_UPDATES = "cloud_updates"
78+ CONF_LOCAL_UPDATES = "local_updates"
79+
7780CONFIG_SCHEMA = vol .Schema (
7881 {
7982 DOMAIN : vol .Schema (
97100 vol .Optional (CONF_DOMAIN ): cv .string ,
98101 vol .Optional (CONF_PROXY ): cv .string ,
99102 vol .Optional (CONF_SSL ): cv .boolean ,
103+ vol .Optional (CONF_CLOUD_UPDATES ): cv .boolean ,
104+ vol .Optional (CONF_LOCAL_UPDATES ): cv .boolean ,
100105 vol .Optional (CONF_DEBUG , default = False ): cv .boolean ,
101106 },
102107 extra = vol .ALLOW_EXTRA ,
@@ -119,7 +124,9 @@ async def async_setup(hass: HomeAssistant, hass_config: dict):
119124 YandexSession .proxy = config .get (CONF_PROXY )
120125 YandexSession .ssl = config .get (CONF_SSL )
121126
122- await _init_local_discovery (hass )
127+ if config .get (CONF_LOCAL_UPDATES , True ):
128+ await _init_local_discovery (hass )
129+
123130 await _init_services (hass )
124131 await _setup_entry_from_config (hass )
125132
@@ -179,7 +186,9 @@ async def update_cookie_and_token(**kwargs):
179186
180187 await _setup_devices (hass , quasar )
181188
182- quasar .start ()
189+ config = hass .data [DOMAIN ][DATA_CONFIG ]
190+ if config .get (CONF_CLOUD_UPDATES , True ):
191+ quasar .start ()
183192
184193 if hass_utils .incluce_devices (hass , entry ):
185194 quasar .platforms = platforms = PLATFORMS
0 commit comments