Revert "Sort Adafruit IO received data by timestamp"
This reverts commit 2739dda266
.
This commit is contained in:
parent
2739dda266
commit
bb8a21ed13
1 changed files with 2 additions and 2 deletions
|
@ -180,13 +180,13 @@ class AdafruitIoPlugin(Plugin):
|
||||||
def _convert_data_to_dict(self, *data):
|
def _convert_data_to_dict(self, *data):
|
||||||
from Adafruit_IO.model import DATA_FIELDS
|
from Adafruit_IO.model import DATA_FIELDS
|
||||||
|
|
||||||
return sorted([
|
return [
|
||||||
{
|
{
|
||||||
attr: self._cast_value(getattr(i, attr))
|
attr: self._cast_value(getattr(i, attr))
|
||||||
if attr == 'value' else getattr(i, attr)
|
if attr == 'value' else getattr(i, attr)
|
||||||
for attr in DATA_FIELDS if getattr(i, attr) is not None
|
for attr in DATA_FIELDS if getattr(i, attr) is not None
|
||||||
} for i in data
|
} for i in data
|
||||||
], key=lambda i: i.get('created_epoch'))
|
]
|
||||||
|
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
Loading…
Reference in a new issue