SylvainGa
(Sylvain Gagnon)
December 30, 2025, 11:22pm
1
Hi, I have this line that is a subset of a shell command:
IRHVAC%20{"Vendor":"GREE","Power":"On","Mode":"Heat","FanSpeed":"Auto","Temp":"{{ states('input_number.hvac_temperature')|int }}","Light":"On"}
and it has to be enclosed in quotes, but I’m already using both sets of quote symbols (’ and "). What can I do? Below, ‘##’ is where the problematic quote are:
wget --spider -q http://192.168.2.175/cm?cmnd=##IRHVAC%20{"Vendor":"GREE","Power":"On","Mode":"Heat","FanSpeed":"Auto","Temp":"{{ states('input_number.hvac_temperature')|int }}","Light":"On"}##
So what can I use instead of ‘##’? Thanks.
stevemann
(Stephen Mann (YAML-challenged))
December 30, 2025, 11:33pm
2
Just a guess…
Use single quotes for the whole URL, and escape the nested single quotes:
wget --spider -q 'http://192.168.2.175/cm?cmnd=IRHVAC%20{"Vendor":"GREE","Power":"On","Mode":"Heat","FanSpeed":"Auto","Temp":"{{ states('\''input_number.hvac_temperature'\'')|int }}","Light":"On"}'
1 Like
SylvainGa
(Sylvain Gagnon)
December 30, 2025, 11:44pm
3
stevemann:
wget --spider -q 'http://192.168.2.175/cm?cmnd=IRHVAC%20{"Vendor":"GREE","Power":"On","Mode":"Heat","FanSpeed":"Auto","Temp":"{{ states('\''input_number.hvac_temperature'\'')|int }}","Light":"On"}'
``
It was easier than expected. I didn’t need to do anything lol. They don’t interfere with one another. This works:
shell_command:
set_hvac_temp_input: |
wget --spider -q http://192.168.2.175/cm?cmnd='IRHVAC%20{"Vendor":"GREE","Power":"On","Mode":"Heat","FanSpeed":"Auto","Temp":"{{ states('input_number.hvac_temperature')|int }}","Light":"On"}'