mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
Added an option to disable mDNS (#1716)
* Added an option to disable mDNS * Fixed linter issues * Moved the enable_mdns option to WiFi and Ethernet components * extracted common method for add mdns library * lint Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
@@ -71,6 +71,7 @@ wifi:
|
||||
password: ''
|
||||
channel: 14
|
||||
bssid: 'A1:63:95:47:D3:1D'
|
||||
enable_mdns: true
|
||||
manual_ip:
|
||||
static_ip: 192.168.178.230
|
||||
gateway: 192.168.178.1
|
||||
|
@@ -14,6 +14,7 @@ ethernet:
|
||||
clk_mode: GPIO0_IN
|
||||
phy_addr: 0
|
||||
power_pin: GPIO25
|
||||
enable_mdns: false
|
||||
manual_ip:
|
||||
static_ip: 192.168.178.56
|
||||
gateway: 192.168.178.1
|
||||
|
@@ -503,13 +503,13 @@ class TestEsphomeCore:
|
||||
def test_address__wifi(self, target):
|
||||
target.config = {}
|
||||
target.config[const.CONF_WIFI] = {const.CONF_USE_ADDRESS: "1.2.3.4"}
|
||||
target.config["ethernet"] = {const.CONF_USE_ADDRESS: "4.3.2.1"}
|
||||
target.config[const.CONF_ETHERNET] = {const.CONF_USE_ADDRESS: "4.3.2.1"}
|
||||
|
||||
assert target.address == "1.2.3.4"
|
||||
|
||||
def test_address__ethernet(self, target):
|
||||
target.config = {}
|
||||
target.config["ethernet"] = {const.CONF_USE_ADDRESS: "4.3.2.1"}
|
||||
target.config[const.CONF_ETHERNET] = {const.CONF_USE_ADDRESS: "4.3.2.1"}
|
||||
|
||||
assert target.address == "4.3.2.1"
|
||||
|
||||
|
Reference in New Issue
Block a user