Commit d4b82522 authored by Tom Kunze's avatar Tom Kunze
Browse files

server: Reduce space between temperature and unit

parent e4a7ac8d
......@@ -45,7 +45,7 @@ requestbar-float {% if requestbar_collapsed != 'false' %}requestbar-collapsed{%
<div id="footer-lectures" class="col">
<span class="grey-text text-lighten-5" href="#!">Current Lecture:<span id="current_lectures">None</span></span>
<span class="grey-text text-lighten-2 hide-on-med-and-down" href="#!">Next Lecture:<span id="next_lectures">None</span></span>
<span class="grey-text text-lighten-5" href="#!">Temperature:<span id="current_temp">N/A</span>°C</span>
<span class="grey-text text-lighten-5" href="#!">Temperature:<span id="current_temp">N/A</span></span>
</div>
</div>
</footer>
......
......@@ -333,8 +333,9 @@ def _get_temperatures():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(1)
s.connect((thost + '.cs.fau.de', 16842))
temps.append(round(float(s.recv(1024).decode().strip()), 1))
temperatures[room.name] = '/'.join([str(x) for x in temps])
temp_float = float(s.recv(1024).decode().strip())
temps.append(str(round(temp_float, 1)))
temperatures[room.name] = '/'.join(temps) + ' °C'
except Exception as e:
temperatures[room.name] = 'N/A'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment