Broadlink script

Hi All,

I had a card for my Air conditioner that was work fine using broadlink until the change to b64 packet.

I have variable that called “packet_code” that should contains the IR packet.
Something go wrong on my script ( Fully sure it’s that way I engage all part’s"

living_room_ac_cool_high_script:
sequence:
- service: script.living_room_rm_pro_send_packet
data_template:
packet_code: >
{% if (selected_temp == “16”) %} “JgCSAAABJ5MWNhYSFRIWNhU3FTYWEhUSFhIWEhUSFhIVEhYSFRIWEhUSFhIWEhUSFhIVNhY2FhIVEhYSFRIWEhU2FhIWNhUSFhIVNxUSFgACjxUSFhIVExUSFhIVEhYSFRIWEhUSFjYWEhUSFhIVEhYSFRIWEhUTFRIWEhUSFhIVEhYSFxAWEhUTFTYWNhUTFRIWAA0FAAAAAAAA”
{% elif (selected_temp == “17”) %} “JgCSAAABJ5MWNRYSFRIWNhY2FjUWEhYSFTYWEhUSFhIVEhYSFhIVEhYSFhEWEhUSFhIVNxU2FhIVEhYSFhIWERY2FRIWNhYSFRIWNhYRFgACjxYSFRIWEhYRFhIVExUSFhIVEhcRFTYXERUSFxEWEhUSFhIVEhYSFhEWEhUTFRIVExUSFhIVEhYSFRIWEhU3FRIWAA0FAAAAAAAA”
{% elif (selected_temp == “18”) %} “JgCSAAABJ5MWNhUSFhIWNhU2FjYWEhUSFhIVNhYSFRMVEhYSFRIWEhUSFhIVEhYSFRMVNhY2FhEWEhcRFRIWEhU2FhIVNxUSFhIVNhYSFQACkBUSFhIVEhYSFRMVEhYSFRIWEhUSFjYVExUSFhIVEhYSFRIWEhUSFhIVExUSFhIVEhYSFRIWEhUSFjYWEhU2FhIVAA0FAAAAAAAA”
{% elif (selected_temp == “19”) %} “JgCSAAABKJMWNhUSFhIWNhU2FzUVExUSFjYVNhYSFhIVEhYSFRIWEhUSFhIVEhYSFRMWNRY2FRIWEhUTFRIWEhU2FhIVNhYSFhIVNhYSFQACjxYSFhIVEhYSFRIWEhUSFhIVEhYSFTcVEhYSFRIWEhUSFhIVExUSFRMVEhYSFRIWEhUSFhIVEhYSFhIVNhY2FRMVAA0FAAAAAAAA”
{% elif (selected_temp == “20”) %} “JgCSAAABJ5MWNhYSFRIWNhU3FTYWEhUSFhIWEhU2FhIVEhYSFRIWEhYSFRIWEhUSFhIVNhY2FhIVEhYSFRIXERU2FhIWNhUSFhIVNxUSFgACjxYRFhIVEhYSFRIWEhUTFRIYEBUSFjYVEhYSFhIVEhYSFRIWEhUSFhIVExUSFhIVEhYSFRIWEhUSFjYWNhU2FhIVAA0FAAAAAAAA”
{% elif (selected_temp == “21”) %} “JgCSAAABJ5MVNhYSFRIWNhY2FTYWEhYSFTYWEhU2FhIWEhUSFhIVEhYSFRIWEhUSFhIVNxU2FhIVEhYSFRIWEhY2FRIWNxUSFhIVNhYSFgACjxUSFhIVEhYSFRMVEhYSFRIWEhUSFjYVEhYSFhIVEhYSFRIWEhUSFhIVExUSFhIVEhYSFRIWEhUSFhIVEhYSFjYVAA0FAAAAAAAA”
{% elif (selected_temp == “22”) %} “JgCSAAABJ5MWNhUSFhIVNxU2FjYVExUSFhIVNhg0FRMVEhYSFRIWEhUSFhIXEBYSFRIWNhY2FRIWEhUSFhIXERU2FhIVNhYSFRIWNhYSFQACjxYSFhIVEhYSFRIWEhUSFhIVEhYSFTcVEhYSFRIWExUSGBAVEhYSFRIWEhUTFRIWEhUSFhIVEhYSFTYWEhYSFTYWAA0FAAAAAAAA”
{% elif (selected_temp == “23”) %} “JgCSAAABKJMVNxUSFhIVNhY2FjYVEhYSFTYWNhY2FRIWEhUTFRIWEhUSFhIVEhYSFRIWNhc1FRIWEhUSFhIWEhU2FhIVNxUSFhIVNhYSFQACkBUSFhIVEhYSFRMVEhYSFRIWEhUSFjYVExUSFhIVEhYSFRIWEhUSFhIVExUSFhIVEhYSFRIWEhUTFRIWNhUSFjYVAA0FAAAAAAAA”
{% elif (selected_temp == “24”) %} “JgCSAAABKJEXNxUSFhIVNhY2FjYVEhYSFRIWEhUSFjYWEhUSFhIVEhYSFRIWEhUTFRIWNhU2FxEVEhYSFRMVEhY2FRIWNhYSFRIWNhUSFgACjxYSFRIWEhUSFhIVEhYSFRIWEhUTFTYWEhYRFhIVEhYSFRMVEhYSFRIWEhUSFhIVEhYSFRMVEhYSFTYWNhUSFjYWAA0FAAAAAAAA”
{% elif (selected_temp == “25”) %} “JgCSAAABJ5IWNhYSFRIWNhU3FTYWEhYSFTYWEhUSFjYVExUSFhIVEhYSFRIWEhUSFhIVNxU2FhIVEhYSFRIWEhU3FRIWNhUSFhIVNxYRFgACjxUSFhIVEhYSFRMVEhYSFRIWEhUSFjYVEhYSFhIWERYSFRIXERUSFhIVEhYSFhIVEhYSFhEWEhUSFhIVEhY2FjYVAA0FAAAAAAAA”
{% elif (selected_temp == “26”) %} “JgCSAAABJ5MVNhYSFRMVNhY2FTYWEhYSFRIWNhUSFjYWEhUSFhIVEhYSFRIYEBYSFRIWNhU3FRIWEhcQFhIVEhY2FhIVNhYSFRIWNhUTFQACjxgQFRIWEhUTFRIWEhcQFhIVEhYSFTcVEhYSFRIWEhUSFhIVEhYSFRMXEBYSFRIWEhUSFhIVEhYSFTcVEhY2FTcWAA0FAAAAAAAA”
{% elif (selected_temp == “27”) %} “JgCSAAABJ5MWNhUSFhIVNxU2FjYWEhUSFjYVNhYSFTcVEhYSFRIWEhUSFhIVExUSFxEVNhY2FRIWEhYSFRIWEhc0FhIVNxUSFhIVNhYSFQACkBUSFhIXEBYSFRIWEhUTFRIVExUSFjYVEhYSFRMWEhUSFhIXERUSFhIVEhYSFRIWEhcQFhIVExUSFhIVNBg2FTcVAA0FAAAAAAAA”
{% elif (selected_temp == “28”) %} “JgCSAAABJ5MVNxUSFhIVNhY2FjYVEhYSFRIWEhU2FjYWEhUSFhIVEhYSFRMVEhYSFRIWNhU2FhIWEhUSFhIVEhY2FRIWNhYSFRIWNhUSFgACjxYSFRIWEhUSFhIVEhYSFRIWEhYSFTYWEhUSFhIVEhgQFRMVEhYSFRIWEhUSFhIVExUSFhIVEhYSFTYWNhU3FTYWAA0FAAAAAAAA”
{% elif (selected_temp == “29”) %} “JgCSAAABKJMWNhUSFhIXNRU2FjYVEhYSFTcVEhY2FTYWEhYSFRIWEhcQGBAVEhYSFRIWNhY2FRIWEhUSFhIVExU2FhIVNhYSFRMVNhYSFQACjxYSFhIVEhYSFRIWEhUSFhIVEhYSFTcVEhYSFRIWEhUTFRIWEhUSFxEVEhYSFRIWEhUSFhIVExUSFhIVEhYSFRIWAA0FAAAAAAAA”
{% elif (selected_temp == “30”) %} “JgCOABY2FhIVEhY2FTcVNhYSFRIWEhU3FTYWNhUTFRIWEhUSFhIVEhYSFRIWEhU3FTYWEhUSFhIVEhYSFjYVEhY2FRIWEhY2FRIWAAKPFRMVEhYSFRIWEhUSFhIVEhYSFRIWNhYSFRIWEhUSFhIVEhYSFRMVEhYSFRIWEhUSFhIVEhYSFRMVNhYSFRIWEhUADQUAAAAAAAAAAAAA”
{% endif %}

living_room_rm_pro_send_packet:
sequence:
- service: remote.send_command
target:
entity_id: remote.living_room_remote
data:
command: >
- b64:{{ packet_code }}

What I’m doing wrong in terms of state the b64 packet?

Please check How to help us help you - or How to ask a good question , point 11, to format your code. It’s unreadable as it is.