simo 2.7.16__py3-none-any.whl → 2.7.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of simo might be problematic. Click here for more details.
- simo/generic/__pycache__/controllers.cpython-312.pyc +0 -0
- simo/generic/__pycache__/forms.cpython-312.pyc +0 -0
- simo/generic/__pycache__/gateways.cpython-312.pyc +0 -0
- simo/generic/controllers.py +2 -5
- simo/generic/forms.py +1 -1
- simo/generic/gateways.py +3 -2
- {simo-2.7.16.dist-info → simo-2.7.17.dist-info}/METADATA +1 -1
- {simo-2.7.16.dist-info → simo-2.7.17.dist-info}/RECORD +12 -12
- {simo-2.7.16.dist-info → simo-2.7.17.dist-info}/LICENSE.md +0 -0
- {simo-2.7.16.dist-info → simo-2.7.17.dist-info}/WHEEL +0 -0
- {simo-2.7.16.dist-info → simo-2.7.17.dist-info}/entry_points.txt +0 -0
- {simo-2.7.16.dist-info → simo-2.7.17.dist-info}/top_level.txt +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
simo/generic/controllers.py
CHANGED
|
@@ -1177,14 +1177,11 @@ class MainState(StateSelect):
|
|
|
1177
1177
|
return False
|
|
1178
1178
|
|
|
1179
1179
|
|
|
1180
|
-
def
|
|
1180
|
+
def owner_phones_on_charge(self, all_phones=False):
|
|
1181
1181
|
sleeping_phones_hour = self.component.config.get('sleeping_phones_hour')
|
|
1182
1182
|
if sleeping_phones_hour is None:
|
|
1183
1183
|
return False
|
|
1184
1184
|
|
|
1185
|
-
if not self.is_sleep_time():
|
|
1186
|
-
return False
|
|
1187
|
-
|
|
1188
1185
|
from simo.users.models import InstanceUser
|
|
1189
1186
|
|
|
1190
1187
|
phones_on_charge = []
|
|
@@ -1198,7 +1195,7 @@ class MainState(StateSelect):
|
|
|
1198
1195
|
phones_on_charge.append(iuser.phone_on_charge)
|
|
1199
1196
|
|
|
1200
1197
|
|
|
1201
|
-
if
|
|
1198
|
+
if all_phones:
|
|
1202
1199
|
return all(phones_on_charge)
|
|
1203
1200
|
else:
|
|
1204
1201
|
return any(phones_on_charge)
|
simo/generic/forms.py
CHANGED
|
@@ -491,7 +491,7 @@ class MainStateSelectForm(BaseComponentForm):
|
|
|
491
491
|
"No value disables this behavior."
|
|
492
492
|
)
|
|
493
493
|
sleeping_phones_hour = forms.IntegerField(
|
|
494
|
-
initial=
|
|
494
|
+
initial=22, required=False, min_value=18, max_value=24,
|
|
495
495
|
help_text='Set mode to "Sleep" if it is later than given hour '
|
|
496
496
|
'and all home owners phones who are at home are put on charge '
|
|
497
497
|
'(requires location and fitness permissions on mobile app). <br>'
|
simo/generic/gateways.py
CHANGED
|
@@ -421,11 +421,12 @@ class GenericGatewayHandler(
|
|
|
421
421
|
|
|
422
422
|
if state.config.get('sleeping_phones_hour') is not None:
|
|
423
423
|
if state.value != 'sleep':
|
|
424
|
-
if state.
|
|
424
|
+
if state.is_sleep_time() and state.owner_phones_on_charge(True):
|
|
425
425
|
print(f"New main state of {state.zone.instance} - sleep")
|
|
426
426
|
state.send('sleep')
|
|
427
427
|
else:
|
|
428
|
-
if not state.
|
|
428
|
+
if not state.owner_phones_on_charge(True) \
|
|
429
|
+
and not state.is_sleep_time():
|
|
429
430
|
try:
|
|
430
431
|
new_state = state.get_day_evening_night_morning()
|
|
431
432
|
except:
|
|
@@ -10591,9 +10591,9 @@ simo/fleet/templates/fleet/controllers_info/ENS160AirQualitySensor.md,sha256=3LS
|
|
|
10591
10591
|
simo/generic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10592
10592
|
simo/generic/app_widgets.py,sha256=y8W3jR76Hh26O9pPQyg2SophMbYIOtAWD33MPKbB8Mg,856
|
|
10593
10593
|
simo/generic/base_types.py,sha256=u3SlfpNYaCwkVBwomWgso4ODzL71ay9MhiAW-bxgnDU,341
|
|
10594
|
-
simo/generic/controllers.py,sha256=
|
|
10595
|
-
simo/generic/forms.py,sha256=
|
|
10596
|
-
simo/generic/gateways.py,sha256=
|
|
10594
|
+
simo/generic/controllers.py,sha256=C3bwn7kSpOz0Gs0fL5VQFYi8pL8VV57mo-9PfLTBBQA,46542
|
|
10595
|
+
simo/generic/forms.py,sha256=ynf-u9RE-VU0xQgCYovUVEZO3ZJ_pCsem91KSeQdHbs,26033
|
|
10596
|
+
simo/generic/gateways.py,sha256=6mu6bSjn-UmeiFLWpskyCGO8MR8KpesruHspEUeOvDo,17609
|
|
10597
10597
|
simo/generic/models.py,sha256=Adq7ipWK-renxJlNW-SZnAq2oGEOwKx8EdUWaKnfcVQ,7597
|
|
10598
10598
|
simo/generic/routing.py,sha256=elQVZmgnPiieEuti4sJ7zITk1hlRxpgbotcutJJgC60,228
|
|
10599
10599
|
simo/generic/socket_consumers.py,sha256=pyiqzfGxSKBNqfrfEJ_kCU0UbSC28XnvDn6QjKkbqyY,1767
|
|
@@ -10603,11 +10603,11 @@ simo/generic/__pycache__/app_widgets.cpython-312.pyc,sha256=ywoKk91YSEZxpyt9haG5
|
|
|
10603
10603
|
simo/generic/__pycache__/app_widgets.cpython-38.pyc,sha256=D9b13pbMlirgHmjDnQhfLIDGSVINoSouHb4SWOeCRrs,1642
|
|
10604
10604
|
simo/generic/__pycache__/base_types.cpython-312.pyc,sha256=h8Mwu49i-zmwTbL33JaLJfRDGOgkQh2_VqrfzEc4UQ4,616
|
|
10605
10605
|
simo/generic/__pycache__/base_types.cpython-38.pyc,sha256=aV5NdIuvXR-ItKpI__MwcyPZHD6Z882TFdgYkPCkr1I,493
|
|
10606
|
-
simo/generic/__pycache__/controllers.cpython-312.pyc,sha256=
|
|
10606
|
+
simo/generic/__pycache__/controllers.cpython-312.pyc,sha256=Ti6xqlOVIA_DYAo4HS72j-2g20xuvAaiEsZl4eIEPfs,53085
|
|
10607
10607
|
simo/generic/__pycache__/controllers.cpython-38.pyc,sha256=jJjwKVaDYyazrRGNjUFoY74nr_jX_DEnsC9KjyxZCgc,30427
|
|
10608
|
-
simo/generic/__pycache__/forms.cpython-312.pyc,sha256=
|
|
10608
|
+
simo/generic/__pycache__/forms.cpython-312.pyc,sha256=naGe-9nY5GFqM_bNpg52acV8s5j9PFILS7l0UTuWbQQ,34681
|
|
10609
10609
|
simo/generic/__pycache__/forms.cpython-38.pyc,sha256=k8lz3taXdWAg5P9jcnw66mWH51pCc4SOsg32kVEtBCg,19416
|
|
10610
|
-
simo/generic/__pycache__/gateways.cpython-312.pyc,sha256=
|
|
10610
|
+
simo/generic/__pycache__/gateways.cpython-312.pyc,sha256=o2Ijs-IXKmytSXRkVs-MChscxuGv97_if13tN2piwY4,21787
|
|
10611
10611
|
simo/generic/__pycache__/gateways.cpython-38.pyc,sha256=GIeMT51oZU2OCFD4eUDFdSRRYE0Qf14AcOr_gdUqG94,12705
|
|
10612
10612
|
simo/generic/__pycache__/models.cpython-312.pyc,sha256=xriUzjkaM2Y4mT3jo2OPK-XGBroBBSFJfLqK0jMA4MA,10200
|
|
10613
10613
|
simo/generic/__pycache__/models.cpython-38.pyc,sha256=MZpum7syAFxuulf47K7gtUlJJ7xRD-IBUBAwUM1ZRnw,5825
|
|
@@ -10924,9 +10924,9 @@ simo/users/templates/invitations/expired_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCe
|
|
|
10924
10924
|
simo/users/templates/invitations/expired_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10925
10925
|
simo/users/templates/invitations/taken_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10926
10926
|
simo/users/templates/invitations/taken_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10927
|
-
simo-2.7.
|
|
10928
|
-
simo-2.7.
|
|
10929
|
-
simo-2.7.
|
|
10930
|
-
simo-2.7.
|
|
10931
|
-
simo-2.7.
|
|
10932
|
-
simo-2.7.
|
|
10927
|
+
simo-2.7.17.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
|
|
10928
|
+
simo-2.7.17.dist-info/METADATA,sha256=J5dFupbSoGVFuKx_tBG3mzNT9Yau8gd0CuAigZ2Oigk,2009
|
|
10929
|
+
simo-2.7.17.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
10930
|
+
simo-2.7.17.dist-info/entry_points.txt,sha256=S9PwnUYmTSW7681GKDCxUbL0leRJIaRk6fDQIKgbZBA,135
|
|
10931
|
+
simo-2.7.17.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
|
|
10932
|
+
simo-2.7.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|