Skip to content

Commit

Permalink
Merge pull request #52 from shlomki/monitored_devices_disconnected_fix
Browse files Browse the repository at this point in the history
Bugfix: Update state immediately according to service data
  • Loading branch information
elad-bar authored Aug 22, 2021
2 parents d732186 + a6a8ffd commit 33c9175
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/edgeos/managers/data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def handle_export(self, data):
if item in service_data and service_data[item] != "":
service_data_item_value = int(service_data[item])

if "x_rate" in item and current_value > 0:
if "x_rate" in item and service_data_item_value > 0:
device[LAST_ACTIVITY] = datetime.now()

traffic_value = current_value + service_data_item_value
Expand Down

0 comments on commit 33c9175

Please sign in to comment.