mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Freeze config entry data (#32615)
* Freeze config entry data * Fix mutating entry.data * Fix config entry options tests
This commit is contained in:
@@ -33,10 +33,10 @@ async def setup_mikrotik_entry(hass, **kwargs):
|
||||
config_entry.add_to_hass(hass)
|
||||
|
||||
if "force_dhcp" in kwargs:
|
||||
config_entry.options["force_dhcp"] = True
|
||||
config_entry.options = {**config_entry.options, "force_dhcp": True}
|
||||
|
||||
if "arp_ping" in kwargs:
|
||||
config_entry.options["arp_ping"] = True
|
||||
config_entry.options = {**config_entry.options, "arp_ping": True}
|
||||
|
||||
with patch("librouteros.connect"), patch.object(
|
||||
mikrotik.hub.MikrotikData, "command", new=mock_command
|
||||
|
||||
Reference in New Issue
Block a user