I have a Broadlink RM4 PRO i am using to control a heatpump. The automation uses a service call where the command is calling a previously reccorded learned command from the heatpump remote. It works but i want to make the service call parameterized so i can have helpers for the target temperature and fan speed. I have named the reccorded commands to prepare for this so if i want to set temperature 22 degrees and fanspeed 4 the command would look like this command: heat_fan4_t22 and i have saved commands for relevant temperatures and fan speeds.
My prefered solution would use the values 22 and 4 and call the right learned command based on that. Any suggestions? The code for my ”hardcoded” service is simple, see below.
alias: Boost heatpump
description: Boost heatpump early morning
trigger:
- platform: state
entity_id:- schedule.heatpump_schedule
from: “off”
to: “on”
condition: []
action:
- schedule.heatpump_schedule
- service: remote.send_command
data:
device: heatpump
num_repeats: 2
command: heat_fan4_t22
target:
device_id: xxxxx removed xxxxx
mode: single