Help with rest/command line switch

Hi,

I have this great IR controller, http://pyrogss.com

i want to integrate the buttons from the device to HA using

This is example of the Push URL:
http://192.168.x.x/integration/push?code=34234234324

what will be the best way + example to use?

you can use either function. You’ve posted links to the docs, so you managed to find them. If you scroll down you’ll see examples for you to copy and adapt to your needs

i didnt understand this one:

can you write me sample for 1 button with any method ? i will try…

Not sure what command this does (on or off) http://192.168.x.x/integration/push?code=34234234324
but assuming it’s the on command, you would define like this:

switch:
  platform: command_line
  switches:
    arest_pin_four:
      command_on: "/usr/bin/curl -X GET http://192.168.x.x/integration/push?code=34234234324"
      command_off: "/usr/bin/curl -X GET http://192.168.1.10/digital/4/0"
      command_state: "/usr/bin/curl -X GET http://192.168.1.10/digital/4"
      value_template: '{{ value == "1" }}'
      friendly_name: Kitchen Lightswitch

You need to update the above command URLs for the On, Off commands, and the State one.
The value template is a formula that tells HA what value means on. In above example, the command_state URL would return only 1 character: “1”. The Value template tells HA that 1 means on