The interaction is unspecified, so a ruling is required
This is one of those cases that the rules don’t account for. The text of Haste, of course, doesn’t mention the Steel Defender, and the rules for the Steel Defender don’t explicitly call out Haste. The DM will need to make a ruling, and there are a couple of defensible rulings I can think of:
- Each use of your bonus action allows the defender to use one action. This effectively denies the defender its hasted action, since you only get one bonus action.
- You use your bonus action to issue a single command, and the defender may then use as many actions as it is allowed as long as it is following the command you issue. For example, if you order it to dash, it could take the Dash action twice.
- As long as you use your bonus action to issue orders, the defender can take any allowed combination of actions it is allowed. For example, it could disengage and then dash.
Personally, I would favor ruling 3, which effectively treats your bonus action as the cost to “activate” the defender on a given turn, after which it can act as normal. But any of the above rulings seems to be consistent with the rules as written.
The defender may be unable to double-attack regardless
You may have noticed that I avoided talking about the attack action above, and the reason for that is that technically, the Steel Defender does not have an attack action1. The action it uses to make attacks is called “Force-Empowered Rend”, which is obviously not on the “approved list” of actions in Haste. Hence, the DM will also need to make a ruling on whether this action is “close enough” to the attack action to be used with the additional action granted by Haste (unless they already chose ruling 1 above, in which case the point is moot).
1Even more technically, the defender probably can take the “regular” attack action, but only to make unarmed strikes, since it has no weapons.