mirror of
https://github.com/esphome/esphome.git
synced 2025-09-10 07:12:21 +01:00
allow to use MQTT for discovery of IPs if mDNS is no option (#3887)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -147,6 +147,14 @@ def get_bool_env(var, default=False):
|
||||
return bool(os.getenv(var, default))
|
||||
|
||||
|
||||
def get_str_env(var, default=None):
|
||||
return str(os.getenv(var, default))
|
||||
|
||||
|
||||
def get_int_env(var, default=0):
|
||||
return int(os.getenv(var, default))
|
||||
|
||||
|
||||
def is_ha_addon():
|
||||
return get_bool_env("ESPHOME_IS_HA_ADDON")
|
||||
|
||||
|
Reference in New Issue
Block a user