Oh-toggle-item modification?

Hi All,
So I have this idea for alarms, that switch on and then you can manually ack them by hitting the

image

I use a oh-toggle-item for them.

- component: oh-toggle-item
      config:
        item: power_use_warning
        title: Power Use > 14.5 kW
        footer: power_use_warning
        color: orange

Is there an ability in yaml code to disable the switch-on by clicking it functionality and just leave switch-off function?

BTW, is that just me or the white dot is bit off center? from the grey pill.

Maciej

Not exactly what you were asking but I solved the same diifferently.
The list-item becomes visible when its error status is on and to acknowledge the message I use the swipeout action.

Otherwise use a list-item

action: command
actionCommand: OFF

This way you can only set it to OFF only, but not to ON

You can also use the boolean property disabled on the toggle item. In this case you always want the toggle to be disabled except when the power_use_warning item is on so you would just need:

disabled: =@@'power_use_warning' != 'ON'
1 Like

You could also use the same expression @JustinG posted on the visibility field and it won’t even show the ack toggle unless you can interact with it.

1 Like