-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsensors22_custom.py
32 lines (28 loc) · 986 Bytes
/
sensors22_custom.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import time
from src.sensors.utils import end, sendUpdateByApi
def returnHttPageExemple():
""" Basic Html exemple with css """
return '''
<div class="contener" id="mycontener">
<div class="card">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcS0MrhIzjan2GfDeqNVqyIDjBXqP7J7GwDJxd_OKwp91Lj4JS4t">
<div class="container">
<h4><b>Mister cat</b></h4>
<p>Look in my eyes darling</p>
</div>
</div>
</div>
<style>
#mycontener {
display: flex;
justify-content: center;
}
</style>
'''
def sonde22(tester=None, tile_id='custom_ex'):
start_time = time.time()
data = {
'text': returnHttPageExemple()
}
CarboardAnswer = sendUpdateByApi(data=data, tileTemplate='custom', tileId=tile_id, tester=tester)
end(title=f'sensors custom tile -> {tile_id}', startTime=start_time, CarboardAnswer=CarboardAnswer, tileId=tile_id)