mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Copy kwargs, remove traces.
This commit is contained in:
parent
a3abd8bb08
commit
c5cdf6d7cf
@ -52,8 +52,6 @@ def setup_scanner(hass, config, see):
|
|||||||
|
|
||||||
# Block updates if we're in a region
|
# Block updates if we're in a region
|
||||||
with LOCK:
|
with LOCK:
|
||||||
_LOGGER.error("REGIONS_ENTERED %s",REGIONS_ENTERED)
|
|
||||||
_LOGGER.error("MOBILE_BEACONS_ACTIVE %s",MOBILE_BEACONS_ACTIVE)
|
|
||||||
if REGIONS_ENTERED[dev_id]:
|
if REGIONS_ENTERED[dev_id]:
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"location update ignored - inside region %s",
|
"location update ignored - inside region %s",
|
||||||
@ -77,10 +75,6 @@ def setup_scanner(hass, config, see):
|
|||||||
'Unable to parse payload as JSON: %s', payload)
|
'Unable to parse payload as JSON: %s', payload)
|
||||||
return
|
return
|
||||||
|
|
||||||
_LOGGER.error("REGIONS_ENTERED %s",REGIONS_ENTERED)
|
|
||||||
_LOGGER.error("MOBILE_BEACONS_ACTIVE %s",MOBILE_BEACONS_ACTIVE)
|
|
||||||
|
|
||||||
|
|
||||||
if not isinstance(data, dict) or data.get('_type') != 'transition':
|
if not isinstance(data, dict) or data.get('_type') != 'transition':
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -141,9 +135,10 @@ def setup_scanner(hass, config, see):
|
|||||||
data['event'])
|
data['event'])
|
||||||
return
|
return
|
||||||
|
|
||||||
def see_beacons(dev_id, kwargs):
|
def see_beacons(dev_id, kwargs_param):
|
||||||
""" Set active beacons to the current location """
|
""" Set active beacons to the current location """
|
||||||
|
|
||||||
|
kwargs = kwargs_param.copy()
|
||||||
for beacon in MOBILE_BEACONS_ACTIVE[dev_id]:
|
for beacon in MOBILE_BEACONS_ACTIVE[dev_id]:
|
||||||
kwargs['dev_id'] = "{}_{}".format(BEACON_DEV_ID, beacon)
|
kwargs['dev_id'] = "{}_{}".format(BEACON_DEV_ID, beacon)
|
||||||
kwargs['host_name'] = beacon
|
kwargs['host_name'] = beacon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user