Add battery_level 'VERY_LOW', reduce some log levels, bump version_number
This commit is contained in:
parent
5ba3e2848d
commit
0f9ae570f6
3 changed files with 6 additions and 5 deletions
|
@ -3,5 +3,6 @@ CONF_JSESSIONID = "jsessionid"
|
||||||
BATTERY_LEVELS = {
|
BATTERY_LEVELS = {
|
||||||
'FULL': 100,
|
'FULL': 100,
|
||||||
'MEDIUM': 50,
|
'MEDIUM': 50,
|
||||||
'LOW': 10
|
'LOW': 15,
|
||||||
|
'VERY_LOW': 5
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
"domain": "smartthings_find",
|
"domain": "smartthings_find",
|
||||||
"name": "SmartThings Find",
|
"name": "SmartThings Find",
|
||||||
"after_dependencies": ["http"],
|
"after_dependencies": ["http"],
|
||||||
"version": "0.0.2",
|
"version": "0.1.0",
|
||||||
"documentation": "https://github.com/Vedeneb/HA-SmartThings-Find",
|
"documentation": "https://github.com/Vedeneb/HA-SmartThings-Find",
|
||||||
"integration_type": "hub",
|
"integration_type": "hub",
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
|
|
|
@ -361,10 +361,10 @@ async def get_device_location(hass: HomeAssistant, session: aiohttp.ClientSessio
|
||||||
elif 'encLocation' in op:
|
elif 'encLocation' in op:
|
||||||
loc = op['encLocation']
|
loc = op['encLocation']
|
||||||
if 'encrypted' in loc and loc['encrypted']:
|
if 'encrypted' in loc and loc['encrypted']:
|
||||||
_LOGGER.warn(f"[{dev_name}] Ignoring encrypted location ({op['oprnType']})")
|
_LOGGER.info(f"[{dev_name}] Ignoring encrypted location ({op['oprnType']})")
|
||||||
continue
|
continue
|
||||||
elif 'gpsUtcDt' not in loc:
|
elif 'gpsUtcDt' not in loc:
|
||||||
_LOGGER.warn(f"[{dev_name}] Ignoring location with missing date ({op['oprnType']})")
|
_LOGGER.info(f"[{dev_name}] Ignoring location with missing date ({op['oprnType']})")
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
utcDate = parse_stf_date(loc['gpsUtcDt'])
|
utcDate = parse_stf_date(loc['gpsUtcDt'])
|
||||||
|
@ -396,7 +396,7 @@ async def get_device_location(hass: HomeAssistant, session: aiohttp.ClientSessio
|
||||||
else:
|
else:
|
||||||
_LOGGER.warn(f"[{dev_name}] No useable location-operation found")
|
_LOGGER.warn(f"[{dev_name}] No useable location-operation found")
|
||||||
|
|
||||||
_LOGGER.debug(f" --> {dev_name} used operation:\t{'NONE' if not used_op else used_op['oprnType']}")
|
_LOGGER.debug(f" --> {dev_name} used operation: {'NONE' if not used_op else used_op['oprnType']}")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
_LOGGER.warn(f"[{dev_name}] No operation found in response; marking update failed")
|
_LOGGER.warn(f"[{dev_name}] No operation found in response; marking update failed")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue