simo 2.5.2__py3-none-any.whl → 2.5.3__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/core/__pycache__/controllers.cpython-38.pyc +0 -0
- simo/core/controllers.py +3 -2
- simo/core/management/update.py +5 -3
- simo/generic/__pycache__/gateways.cpython-38.pyc +0 -0
- simo/generic/gateways.py +3 -0
- {simo-2.5.2.dist-info → simo-2.5.3.dist-info}/METADATA +1 -1
- {simo-2.5.2.dist-info → simo-2.5.3.dist-info}/RECORD +11 -11
- {simo-2.5.2.dist-info → simo-2.5.3.dist-info}/LICENSE.md +0 -0
- {simo-2.5.2.dist-info → simo-2.5.3.dist-info}/WHEEL +0 -0
- {simo-2.5.2.dist-info → simo-2.5.3.dist-info}/entry_points.txt +0 -0
- {simo-2.5.2.dist-info → simo-2.5.3.dist-info}/top_level.txt +0 -0
|
Binary file
|
simo/core/controllers.py
CHANGED
|
@@ -695,6 +695,8 @@ class RGBWLight(ControllerBase, TimerMixin, OnOffPokerMixin):
|
|
|
695
695
|
def _validate_val(self, value, occasion=None):
|
|
696
696
|
assert 0 <= value['active'] <= 4
|
|
697
697
|
assert isinstance(value['is_on'], bool)
|
|
698
|
+
if 'scenes' not in value:
|
|
699
|
+
value['scenes'] = self.component.value['scenes']
|
|
698
700
|
for color in value['scenes']:
|
|
699
701
|
if not is_hex_color(color):
|
|
700
702
|
raise ValidationError("Bad color value!")
|
|
@@ -704,8 +706,7 @@ class RGBWLight(ControllerBase, TimerMixin, OnOffPokerMixin):
|
|
|
704
706
|
else:
|
|
705
707
|
if len(color) != 7:
|
|
706
708
|
raise ValidationError("Bad color value!")
|
|
707
|
-
|
|
708
|
-
value['scenes'] = self.component.value['scenes']
|
|
709
|
+
|
|
709
710
|
return value
|
|
710
711
|
|
|
711
712
|
def turn_off(self):
|
simo/core/management/update.py
CHANGED
|
@@ -10,8 +10,10 @@ HUB_DIR = '/etc/SIMO/hub'
|
|
|
10
10
|
|
|
11
11
|
def perform_update():
|
|
12
12
|
|
|
13
|
+
pip_executable = os.path.join(os.path.dirname(sys.executable), 'pip')
|
|
14
|
+
|
|
13
15
|
proc = subprocess.Popen(
|
|
14
|
-
[
|
|
16
|
+
[pip_executable, 'install', 'simo', '--upgrade'],
|
|
15
17
|
cwd=HUB_DIR, stderr=subprocess.PIPE
|
|
16
18
|
)
|
|
17
19
|
out, err = proc.communicate()
|
|
@@ -19,7 +21,7 @@ def perform_update():
|
|
|
19
21
|
raise Exception(err.decode())
|
|
20
22
|
|
|
21
23
|
proc = subprocess.Popen(
|
|
22
|
-
[os.path.join(HUB_DIR, 'manage.py'), 'migrate'],
|
|
24
|
+
[sys.executable, os.path.join(HUB_DIR, 'manage.py'), 'migrate'],
|
|
23
25
|
cwd=HUB_DIR,
|
|
24
26
|
stderr=subprocess.PIPE
|
|
25
27
|
)
|
|
@@ -28,7 +30,7 @@ def perform_update():
|
|
|
28
30
|
raise Exception(err.decode())
|
|
29
31
|
|
|
30
32
|
proc = subprocess.Popen(
|
|
31
|
-
[os.path.join(HUB_DIR, 'manage.py'), 'collectstatic',
|
|
33
|
+
[sys.executable, os.path.join(HUB_DIR, 'manage.py'), 'collectstatic',
|
|
32
34
|
'--noinput'],
|
|
33
35
|
cwd=HUB_DIR, stderr=subprocess.PIPE
|
|
34
36
|
)
|
|
Binary file
|
simo/generic/gateways.py
CHANGED
|
@@ -145,7 +145,10 @@ class ScriptRunHandler(multiprocessing.Process):
|
|
|
145
145
|
else:
|
|
146
146
|
code = self.component.config.get('code')
|
|
147
147
|
def run_code():
|
|
148
|
+
start = time.time()
|
|
148
149
|
exec(code, globals())
|
|
150
|
+
if 'class Automation:' in code and time.time() - start < 1:
|
|
151
|
+
Automation().run()
|
|
149
152
|
|
|
150
153
|
if not code:
|
|
151
154
|
self.component.value = 'finished'
|
|
@@ -43,7 +43,7 @@ simo/core/auto_urls.py,sha256=nNXEgLAAAQAhRWQDA9AbDtw-zcPKmu_pufJaSa8g818,1102
|
|
|
43
43
|
simo/core/autocomplete_views.py,sha256=JT5LA2_Wtr60XYSAIqaXFKFYPjrmkEf6yunXD9y2zco,4022
|
|
44
44
|
simo/core/base_types.py,sha256=qVh6MrXZEfN7bFOyFftC7u0yyz0PkvpsjllLBc6SCp4,616
|
|
45
45
|
simo/core/context.py,sha256=snfPIGcZQTrx8iiZc5PI91A0dRQH6y5kH4uG_lfhU6Q,1486
|
|
46
|
-
simo/core/controllers.py,sha256=
|
|
46
|
+
simo/core/controllers.py,sha256=JeOvn1Y4MYGkimqEB_6u3B-KwJk3qLjY63ELlFXih14,30027
|
|
47
47
|
simo/core/dynamic_settings.py,sha256=bUs58XEZOCIEhg1TigR3LmYggli13KMryBZ9pC7ugAQ,1872
|
|
48
48
|
simo/core/events.py,sha256=fH6d5HcPdDqT3R7CZPdo69qTszJ23j3GJt3IFOso3WA,4757
|
|
49
49
|
simo/core/filters.py,sha256=ghtOZcrwNAkIyF5_G9Sn73NkiI71mXv0NhwCk4IyMIM,411
|
|
@@ -76,7 +76,7 @@ simo/core/__pycache__/auto_urls.cpython-38.pyc,sha256=Tyf8PYHq5YqSwTp25Joy-eura_
|
|
|
76
76
|
simo/core/__pycache__/autocomplete_views.cpython-38.pyc,sha256=hJ6JILI1LqrAtpQMvxnLvljGdW1v1gpvBsD79vFkZ58,3972
|
|
77
77
|
simo/core/__pycache__/base_types.cpython-38.pyc,sha256=hmq22vvGyCmhbYyuV6bFAOOSIupspgW5yq_VzqWd-vY,759
|
|
78
78
|
simo/core/__pycache__/context.cpython-38.pyc,sha256=ck1FcBljLB4__5F6poS2tEEn8IDDgK7pU3FcXDPc_mI,1329
|
|
79
|
-
simo/core/__pycache__/controllers.cpython-38.pyc,sha256=
|
|
79
|
+
simo/core/__pycache__/controllers.cpython-38.pyc,sha256=ycGGRvBwNsOl2obNKl5t77UK5mkn8bEU4_1dE0K_Z9k,26897
|
|
80
80
|
simo/core/__pycache__/dynamic_settings.cpython-38.pyc,sha256=wGpnscX1DxFpRl54MQURhjz2aD3NJohSzw9JCFnzh2Y,2384
|
|
81
81
|
simo/core/__pycache__/events.cpython-38.pyc,sha256=yip7WSyX4pUy2wJE820W4fD7iwoIWGhdHfloFb_N0R8,5257
|
|
82
82
|
simo/core/__pycache__/filters.cpython-38.pyc,sha256=VIMADCBiYhziIyRmxAyUDJluZvuZmiC4bNYWTRsGSao,721
|
|
@@ -147,7 +147,7 @@ simo/core/drf_braces/tests/serializers/test_enforce_validation_serializer.py,sha
|
|
|
147
147
|
simo/core/drf_braces/tests/serializers/test_form_serializer.py,sha256=IE2xQ1SzhSsOy2BFsBYw_Po-ujKBgIuNoTRxCzhyilE,12995
|
|
148
148
|
simo/core/drf_braces/tests/serializers/test_swapping.py,sha256=o-B5YV5HDxHCVrXYGODeF7lB3rPDGtafNgClx97d6w4,1220
|
|
149
149
|
simo/core/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
|
-
simo/core/management/update.py,sha256=
|
|
150
|
+
simo/core/management/update.py,sha256=t-54NN9enr10ldWRemmIHEaSQSOHqTchbZzqucm1P6s,1911
|
|
151
151
|
simo/core/management/__pycache__/__init__.cpython-38.pyc,sha256=Ptf1WzljXMt3wP1tzOy6q3JfLERYDs66wSHBVdrzjHg,169
|
|
152
152
|
simo/core/management/_hub_template/hub/asgi.py,sha256=ElN_fdeSkf0Ysa7pS9rJVmZ1HmLhFxb8jFaMLqe1220,126
|
|
153
153
|
simo/core/management/_hub_template/hub/celeryc.py,sha256=3ksDXftIZKJ4Cq9WNKJERdZdQlDEnjTQXycweRFmsSQ,27
|
|
@@ -10337,7 +10337,7 @@ simo/generic/app_widgets.py,sha256=E_pnpA1hxMIhenRCrHoQ5cik06jm2BAHCkl_eo-OudU,1
|
|
|
10337
10337
|
simo/generic/base_types.py,sha256=djymox_boXTHX1BTTCLXrCH7ED-uAsV_idhaDOc3OLI,409
|
|
10338
10338
|
simo/generic/controllers.py,sha256=NQelUJhAVsPH88RRiX4D0-NBb3pwwXcF2orMVdfneic,59918
|
|
10339
10339
|
simo/generic/forms.py,sha256=GuB-5H-GX9_2Q-YjwrHVcryTDo5CuJb3rsFG7-mMr5A,32759
|
|
10340
|
-
simo/generic/gateways.py,sha256=
|
|
10340
|
+
simo/generic/gateways.py,sha256=JaX-wVaYh3CTkryq-Lq_UQfA4JWdxY42QkchstC12Sw,18982
|
|
10341
10341
|
simo/generic/models.py,sha256=YEAFfkARsAellfDwmmqGSx7nKkEF5XngciRB4qP1MKk,7596
|
|
10342
10342
|
simo/generic/routing.py,sha256=elQVZmgnPiieEuti4sJ7zITk1hlRxpgbotcutJJgC60,228
|
|
10343
10343
|
simo/generic/socket_consumers.py,sha256=K2OjphIhKJH48BvfFfoCOyCQZ1NmXb_phs6y1IP-qaQ,1757
|
|
@@ -10346,7 +10346,7 @@ simo/generic/__pycache__/app_widgets.cpython-38.pyc,sha256=0IoKRG9n1tkNRRkrqAeOQ
|
|
|
10346
10346
|
simo/generic/__pycache__/base_types.cpython-38.pyc,sha256=ptw6axyAqemZA35oa6vzr7EihzvbhW9w7Y-G6kfDedU,555
|
|
10347
10347
|
simo/generic/__pycache__/controllers.cpython-38.pyc,sha256=QrZsXgBvwrlGtI0PwQAl8TFDD5RAkm3mjIvfmJSpbq8,37734
|
|
10348
10348
|
simo/generic/__pycache__/forms.cpython-38.pyc,sha256=BS9XscqbEcTPIr6kzZzpya2SCgqiGkLGXWiACt0_IFo,23316
|
|
10349
|
-
simo/generic/__pycache__/gateways.cpython-38.pyc,sha256=
|
|
10349
|
+
simo/generic/__pycache__/gateways.cpython-38.pyc,sha256=H5cK5eNQ6P24wSmoRUKvVhkggrKEJ1UGiCkQQ5g98xI,14073
|
|
10350
10350
|
simo/generic/__pycache__/models.cpython-38.pyc,sha256=ES8wXkdKn0m-yaJlvhyaIOSppuX9Ckz-bOs9DCpVvaQ,5825
|
|
10351
10351
|
simo/generic/__pycache__/routing.cpython-38.pyc,sha256=xtxTUTBTdivzFyA5Wh7k-hUj1WDO_FiRq6HYXdbr9Ks,382
|
|
10352
10352
|
simo/generic/__pycache__/socket_consumers.cpython-38.pyc,sha256=qJO5kvQLWhsQDOr1AtAtsAybuRWioxSkQei3Pc7rdP0,1737
|
|
@@ -10543,9 +10543,9 @@ simo/users/templates/invitations/expired_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCe
|
|
|
10543
10543
|
simo/users/templates/invitations/expired_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10544
10544
|
simo/users/templates/invitations/taken_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10545
10545
|
simo/users/templates/invitations/taken_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10546
|
-
simo-2.5.
|
|
10547
|
-
simo-2.5.
|
|
10548
|
-
simo-2.5.
|
|
10549
|
-
simo-2.5.
|
|
10550
|
-
simo-2.5.
|
|
10551
|
-
simo-2.5.
|
|
10546
|
+
simo-2.5.3.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
|
|
10547
|
+
simo-2.5.3.dist-info/METADATA,sha256=twUguJgwbaneN3x1oCPaSpfAtyfKV73LVKhxPl4NW8M,1923
|
|
10548
|
+
simo-2.5.3.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
10549
|
+
simo-2.5.3.dist-info/entry_points.txt,sha256=S9PwnUYmTSW7681GKDCxUbL0leRJIaRk6fDQIKgbZBA,135
|
|
10550
|
+
simo-2.5.3.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
|
|
10551
|
+
simo-2.5.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|