mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-03 19:38:30 +02:00
Initial Commit 🎉
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
class ESPHomeYAMLError(Exception):
|
||||
"""General esphomeyaml exception occurred."""
|
||||
pass
|
||||
|
||||
|
||||
class HexInt(long):
|
||||
def __str__(self):
|
||||
return "0x{:X}".format(self)
|
||||
|
||||
|
||||
class IPAddress(object):
|
||||
def __init__(self, *args):
|
||||
if len(args) != 4:
|
||||
raise ValueError(u"IPAddress must consist up 4 items")
|
||||
self.args = args
|
||||
|
||||
def __str__(self):
|
||||
return '.'.join(str(x) for x in self.args)
|
||||
Reference in New Issue
Block a user