Snmp switch for pdu with buildup payload with a template

I got a PDU that I want to build up the payload of the SNMP set command with a template. See the code of current config that is not working that I want to get working. I will replace the 0 and 1 with the same if statement code if I get this to work. thanks for any suggestion

- platform: snmp
  baseoid: 1.3.6.1.4.1.17420.1.2.9.1.13.0
  command_payload_off: "{% if is_state('input_boolean.pdu_1_outlet','on') -%}1{%- else -%}0{%- endif %},{% if is_state('input_boolean.pdu_2_outlet','on') -%}1{%- else -%}0{%- endif %},{% if is_state('input_boolean.pdu_3_outlet','on') -%}1{%- else -%}0{%- endif %},0,0,0,0,0"
  command_payload_on: "{% if is_state('input_boolean.pdu_1_outlet','on') -%}1{%- else -%}0{%- endif %},{% if is_state('input_boolean.pdu_2_outlet','on') -%}1{%- else -%}0{%- endif %},{% if is_state('input_boolean.pdu_3_outlet','on') -%}1{%- else -%}0{%- endif %},1,1,1,1,1"
  community: xxxxx
  version: "1"
  host: 192.168.xx.xx
  name: pdu set outlet
  vartype: OctetString

I have a PDU from the same vendor. https://www.digipower.com.tw/single-post/2019/08/02/snmp-mib-for-pdu-outelet-onoff was helpful - you can set them up as individual switches as:

OutletA on 1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
OutletA off 0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
OutletB on 5,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
OutletB off 5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5

edit: I’ve just run into SNMP Switches that use string lack relaxed matching capability · Issue #42106 · home-assistant/core · GitHub . Damn.