Hi,
Currently I am working on my first widget related to my centralized ventilation system.
Could anybody help me with the following, please?
- component: oh-button
config:
visible: "=props.set_pump_item ? true : false"
iconF7: arrow_up_circle
iconSize: 35
action: command
actionItem: =props.set_pump_item
actionCommand: =Math.min(Number(items[props.set_pump_item].state.split(' ')[0]) + 5, 100)
style:
position: absolute
color: "#175B88"
top: 166px
left: 312px
height: 35px
background: transparent
- component: oh-button
config:
visible: "=props.set_pump_item ? true : false"
iconF7: arrow_down_circle
iconSize: 35
action: command
actionItem: =props.set_pump_item
actionCommand: =Math.max(Number(items[props.set_pump_item].state.split(' ')[0]) - 5, 0)
style:
position: absolute
color: "#175B88"
top: 166px
left: 225px
height: 35px
background: transparent
- component: f7-col
config:
class:
- display-flex
- flex-direction-column
- align-items-right
- fixed-width
slots:
default:
- component: oh-link
config:
visible: "=props.set_pump_item ? true : false"
text: =items[props.set_pump_item].state
style:
color: "#175B88"
font-size: 30px
left: 266px
top: 40px
I do have 2 buttons here and a number. Something like a stepper card. The first button is the arrow up (works fine). The second button is the arrow down to decrement the set values by 5 with the lowest value of 0. The problem is, that it does not go to 0.
Does anybody have an idea what could be wrong?