diff --git a/homecontrol-dash.py b/homecontrol-dash.py index add3307..15b5544 100755 --- a/homecontrol-dash.py +++ b/homecontrol-dash.py @@ -115,18 +115,22 @@ def update_slider_limit(value): @app.callback( - Output('slider-min-txt', 'children'), + [Output('slider-min-txt', 'children'), Output('slider-min', 'max')], [Input('slider-min', 'value')]) def update_slider_min(value): - return "From: %s" % (time.strftime("%Y/%m/%d %H:%M", time.localtime(float(value))) if + txt = "From: %s" % (time.strftime("%Y/%m/%d %H:%M", time.localtime(float(value))) if value > 0 else 0) + t = time.time() + return txt, t @app.callback( - Output('slider-max-txt', 'children'), + [Output('slider-max-txt', 'children'), Output('slider-max', 'max')], [Input('slider-max', 'value')]) def update_slider_max(value): - return "To: %s" % (time.strftime("%Y/%m/%d %H:%M", time.localtime(float(value)))) + txt = "To: %s" % (time.strftime("%Y/%m/%d %H:%M", time.localtime(float(value)))) + t = time.time() + return txt, t @app.callback(