File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
homeassistant/components/deconz Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,8 @@ async def _create_entry(self) -> ConfigFlowResult:
184184 CONF_HOST : self .host ,
185185 CONF_PORT : self .port ,
186186 CONF_API_KEY : self .api_key ,
187- }
187+ },
188+ reload_on_update = False ,
188189 )
189190
190191 except TimeoutError :
@@ -231,7 +232,8 @@ async def async_step_ssdp(
231232 updates = {
232233 CONF_HOST : self .host ,
233234 CONF_PORT : self .port ,
234- }
235+ },
236+ reload_on_update = False ,
235237 )
236238
237239 self .context .update (
@@ -265,7 +267,8 @@ async def async_step_hassio(
265267 CONF_HOST : self .host ,
266268 CONF_PORT : self .port ,
267269 CONF_API_KEY : self .api_key ,
268- }
270+ },
271+ reload_on_update = False ,
269272 )
270273
271274 self .context ["configuration_url" ] = HASSIO_CONFIGURATION_URL
Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ async def test_ssdp_discovery_update_configuration(
483483 with patch (
484484 "homeassistant.components.deconz.async_setup_entry" ,
485485 return_value = True ,
486- ) as mock_setup_entry :
486+ ):
487487 result = await hass .config_entries .flow .async_init (
488488 DOMAIN ,
489489 data = SsdpServiceInfo (
@@ -502,7 +502,6 @@ async def test_ssdp_discovery_update_configuration(
502502 assert result ["type" ] is FlowResultType .ABORT
503503 assert result ["reason" ] == "already_configured"
504504 assert config_entry_setup .data [CONF_HOST ] == "2.3.4.5"
505- assert len (mock_setup_entry .mock_calls ) == 1
506505
507506
508507async def test_ssdp_discovery_dont_update_configuration (
@@ -607,7 +606,7 @@ async def test_hassio_discovery_update_configuration(
607606 with patch (
608607 "homeassistant.components.deconz.async_setup_entry" ,
609608 return_value = True ,
610- ) as mock_setup_entry :
609+ ):
611610 result = await hass .config_entries .flow .async_init (
612611 DOMAIN ,
613612 data = HassioServiceInfo (
@@ -630,7 +629,6 @@ async def test_hassio_discovery_update_configuration(
630629 assert config_entry_setup .data [CONF_HOST ] == "2.3.4.5"
631630 assert config_entry_setup .data [CONF_PORT ] == 8080
632631 assert config_entry_setup .data [CONF_API_KEY ] == "updated"
633- assert len (mock_setup_entry .mock_calls ) == 1
634632
635633
636634@pytest .mark .usefixtures ("config_entry_setup" )
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ async def test_update_address(
7676 patch (
7777 "homeassistant.components.deconz.async_setup_entry" ,
7878 return_value = True ,
79- ) as mock_setup_entry ,
79+ ),
8080 patch ("pydeconz.gateway.WSClient" ) as ws_mock ,
8181 ):
8282 await hass .config_entries .flow .async_init (
@@ -97,4 +97,3 @@ async def test_update_address(
9797
9898 assert ws_mock .call_args [0 ][1 ] == "2.3.4.5"
9999 assert config_entry_setup .data ["host" ] == "2.3.4.5"
100- assert len (mock_setup_entry .mock_calls ) == 1
You can’t perform that action at this time.
0 commit comments