1
0
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:
Paulus Schoutsen
2020-03-09 14:07:50 -07:00
committed by GitHub
parent 3318e65948
commit d4615fd432
16 changed files with 71 additions and 45 deletions

View File

@@ -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