Trigger custom commands

Still very new to openhab (read the docs and played around a tiny bit).

I have a group (gBedroom) that has multiple devices in it (some lights, some other items).

I want to make a rule that when triggered, switches a light on for 5 minutes and then switches it off again. Right now its only 1 light, but in the future there may be other items included (not just lights).

What I initially thought was -

Make a rule that listens for the command “goingToBathroom” and then fires the rule, when I triggered the rule I didn’t see any effect, so I looked into the logs and saw -

Error: Command 'goingToBathroom' is not valid for item 'gBedroom'
Valid command types are:
  RefreshType: REFRESH

Is there a way to define custom commands can be sent to an item, or is there a better way to accomplish what I’m trying to accomplish? What I was originally thinking was using commands for each room that could take custom effects for the rooms (i.e sleep, going to bathroom, romantic) and then each room has their own logic on how to deal with said command.

for the rule I currently have -

rule "React on Bedroom (gBedroom) when someone wishes to goto the bathroom"
when
    Item gBedroom received command bathroom
then
    Bedbottomlight_Color.sendCommand("349,100,75")
    createTimer(now.plusMinutes(5), [ | Bedbottomlight_Color.sendCommand(OFF)])
end 

Any help would be appreciated!

needs to be

Item gBedroom received command "bathroom"

String type Items accept quite flexible commands.
Groups can be assigned sub-types e.g. Group:String.
The Group type need not relate to any members type.
But beware - posting a command to a Group results in (attempting to) propagate the command to all member Items.

Thanks - I tried updating but I still receive the same error -

openhab> openhab:send gBedroom “goToBathroom”
Error: Command ‘sleep’ is not valid for item ‘gBedroom’
Valid command types are:
RefreshType: REFRESH

Do I need to define somewhere that gBedroom can accept the command type “goToBathroom” ?

Read the message. The complaint is not about the “goToBathroom”, it is about ‘sleep’ now. Where’s that come from, you have that in a rule somewhere?

Sorry, that was completely my mistake, I couldn’t copy from the console so I typed the message… and didn’t do a great job of it!

openhab> openhab:send gBedroom "goToBathroom"
Error: Command 'goToBathroom' is not valid for item 'gBedroom'
Valid command types are:
  RefreshType: REFRESH

with the rule

rule "React on Bedroom (gBedroom) when someone wishes to goto the bathroom"
when
    Item gBedroom received command "goToBathroom"
then
    Bedbottomlight_Color.sendCommand("349,100,75")
    createTimer(now.plusMinutes(5), [ | Bedbottomlight_Color.sendCommand(OFF)])
end 

Probably your item is not of type ‘string‘.
I would use a proxy item anyway, as rossko pointed out.
so, just create an item which is not linked to a channel.