homecontrol-dash: update max slider values in callback
This commit is contained in:
parent
6639e138b6
commit
815bf282f6
1 changed files with 8 additions and 4 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue