Virtual Switches

Hey, I am trying to do some WaterLeak senson automation; this is all done; however, I want to expose the Valve to HomeKit. In another case, I did this by creating a virtual switch and using a bridge. In those i was setting a default state of the switch to On using the code below. How can set the state of this switch to whatever the state of the Walve is.

my_virtual_waterleak_switch:
        value_template: "{{ is_state('input_boolean.my_virtual_waterleak_switch', 'on') }}"
        turn_on:
          service: input_boolean.turn_on
          target:
            entity_id: input_boolean.my_virtual_waterleak_switch
        turn_off:
          service: input_boolean.turn_off
          target:
            entity_id: input_boolean.my_virtual_waterleak_switch

The valve is the Z-Wave version of the Econet BullDog.

  - platform: device
    device_id: 50b3f5370d7547de60161bd7eb3a3759
    domain: zwave_js
    type: zwave_js.value_updated.value

Thanks