|
@@ -41,7 +41,7 @@ class SpaceInfoService(Service):
|
|
|
|
|
|
async def is_customized(self) -> bool:
|
|
|
url = self._base_url.join('duoduo-service/custom-service/custom/timetarget')
|
|
|
- time_str = arrow.get(arrow.get(self._now_time, TIME_FMT).shift(minutes=15).timestamp
|
|
|
+ time_str = arrow.get(arrow.get(self._now_time, TIME_FMT).shift(minutes=15).timestamp()
|
|
|
// 900 * 900).strftime('%Y%m%d%H%M%S')
|
|
|
params = {
|
|
|
'projectId': self._project_id,
|
|
@@ -121,7 +121,7 @@ class SpaceInfoService(Service):
|
|
|
current_targets = targets.get('pre_targets').append(targets.get('normal_targets'))
|
|
|
else:
|
|
|
current_targets = targets.get('normal_targets')
|
|
|
- temp = arrow.get(self._now_time, TIME_FMT).shift(minutes=15).timestamp // (15 * 60) * (15 * 60)
|
|
|
+ temp = arrow.get(self._now_time, TIME_FMT).shift(minutes=15).timestamp() // (15 * 60) * (15 * 60)
|
|
|
next_quarter_minutes = arrow.get(temp).time().strftime('%H%M%S')
|
|
|
try:
|
|
|
current_lower_target = current_targets['temperatureMin'].loc[next_quarter_minutes]
|
|
@@ -134,7 +134,7 @@ class SpaceInfoService(Service):
|
|
|
async def env_database_set(self, form: str, value: float) -> None:
|
|
|
url = self._base_url.join('duoduo-service/transfer/environment/hispoint/set')
|
|
|
params = self._common_parameters()
|
|
|
- time_str = arrow.get(arrow.get(self._now_time, TIME_FMT).timestamp // 900 * 900).strftime('%Y%m%d%H%M%S')
|
|
|
+ time_str = arrow.get(arrow.get(self._now_time, TIME_FMT).timestamp() // 900 * 900).strftime('%Y%m%d%H%M%S')
|
|
|
params.update({'time': time_str, 'type': form, 'value': value})
|
|
|
await self._get(url, params)
|
|
|
|