Compare commits
7 Commits
config_flow
...
v1.4.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 0e8c3ef0b6 | |||
| f1002d107f | |||
| 24fc2ea74e | |||
| 1fbe95c72f | |||
| 3e59aa94aa | |||
| e56266be86 | |||
| 1decadee2e |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"domain": "ecovacs",
|
"domain": "ecovacs",
|
||||||
"name": "Ecovacs Bumper",
|
"name": "Ecovacs Bumper",
|
||||||
"version": "1.4.2",
|
"version": "1.4.3",
|
||||||
"documentation": "https://github.com/bittles/ha_ecovacs_bumper",
|
"documentation": "https://github.com/bittles/ha_ecovacs_bumper",
|
||||||
"issue_tracker": "https://github.com/bittles/ha_ecovacs_bumper/issues",
|
"issue_tracker": "https://github.com/bittles/ha_ecovacs_bumper/issues",
|
||||||
"requirements": ["sleekxmppfs==1.4.1", "requests>=2.18", "pycryptodome>=3.4", "pycountry-convert>=0.5", "paho-mqtt>=1.4", "stringcase>=1.2"],
|
"requirements": ["sleekxmppfs==1.4.1", "requests>=2.18", "pycryptodome>=3.4", "pycountry-convert>=0.5", "paho-mqtt>=1.4", "stringcase>=1.2"],
|
||||||
|
|||||||
@@ -12,6 +12,20 @@ from sleekxmppfs.xmlstream import ET
|
|||||||
|
|
||||||
from .const import LOGGER
|
from .const import LOGGER
|
||||||
|
|
||||||
|
def str_to_bool_or_cert(s):
|
||||||
|
if s == 'True' or s == True:
|
||||||
|
return True
|
||||||
|
elif s == 'False' or s == False:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
if not s == None:
|
||||||
|
if os.path.exists(s): # User could provide a path to a CA Cert as well, which is useful for Bumper
|
||||||
|
if os.path.isfile(s):
|
||||||
|
return s
|
||||||
|
else:
|
||||||
|
raise ValueError("Certificate path provided is not a file - {}".format(s))
|
||||||
|
raise ValueError("Cannot covert {} to a bool or certificate path".format(s))
|
||||||
|
|
||||||
#This is used by EcoVacsIOTMQ and EcoVacsXMPP for _ctl_to_dict
|
#This is used by EcoVacsIOTMQ and EcoVacsXMPP for _ctl_to_dict
|
||||||
def RepresentsInt(stringvar):
|
def RepresentsInt(stringvar):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user