mirror of
https://github.com/esphome/esphome.git
synced 2025-10-14 07:43:48 +01:00
Convert IPAddress to use Pythonmodule ipaddress (#8072)
This commit is contained in:
@@ -54,16 +54,6 @@ class HexInt(int):
|
||||
return f"{sign}0x{value:X}"
|
||||
|
||||
|
||||
class IPAddress:
|
||||
def __init__(self, *args):
|
||||
if len(args) != 4:
|
||||
raise ValueError("IPAddress must consist of 4 items")
|
||||
self.args = args
|
||||
|
||||
def __str__(self):
|
||||
return ".".join(str(x) for x in self.args)
|
||||
|
||||
|
||||
class MACAddress:
|
||||
def __init__(self, *parts):
|
||||
if len(parts) != 6:
|
||||
|
Reference in New Issue
Block a user