TL;DR:
How to get value from HABPanel slider in script?
Long version:
I have working set of rules that control a pump depending on available power. The pump is expected to work 8h per day. Currently it’s a fixed value in the script:
var pool_pump_run_time = items.Pool_Pump_Run_Time;
var pool_pump_daily_run_limit = Quantity("8 h");
// Check is Pool Pumps runs longer than the limit...
if (pool_pump_daily_run_limit.lessThanOrEqual(pool_pump_run_time)) {
// ... and if Pool Pump is enabled
if (items.Enable_Pool_Pump.state.toString() == "ON") {
console.log("Pool Pump daily run time ", pool_pump_run_time.quantityState.toUnit('h'), " over the limit ", pool_pump_daily_run_limit, ". Disabling Pool Pump....");
items.Enable_Pool_Pump.sendCommand("OFF");
}
}
I added a slider to one HABPanel
I can’t figure out how to get the value in my rule. I searched the forum - multiple solutions, but nothing that I could implement with my current knowledge level. Any ideas?