FHEM Forum

FHEM => English Corner => Thema gestartet von: gw0udm am 11 April 2017, 19:22:46

Titel: Using spaces in alias names
Beitrag von: gw0udm am 11 April 2017, 19:22:46
Hi

This may be a really silly question but I can't find the answer.

I've got a load of devices with alias names that involve spaces, eg Front Room - Main Light. I would like to be able to address these directly and send them commands but I can't find a way of doing it because of the spaces.  So I would like to enter:

set Front Room - Main Light on

but it doesn't work. Is there any way of doing this? I've tried enclosing the name in quotes, double quotes, brackets etc but none of it works.

Is there any way of doing this or do I just need to use alias names without spaces?

James
Titel: Antw:Using spaces in alias names
Beitrag von: DeeSPe am 11 April 2017, 19:30:23
To use alias in a command is a bad idea because you can change it really simple.
Instead of the alias rely on the name of the device, normally it will not be changed.

Cheers
Dan
Titel: Antw:Using spaces in alias names
Beitrag von: Thorsten Pferdekaemper am 11 April 2017, 21:16:59
Hi,
this might work:

{CommandSet("Front Room - Main Light", "on")}

Regardless whether this works or not, I'd recommend all names without blanks.
Regards,
   Thorsten
Titel: Antw:Using spaces in alias names
Beitrag von: CoolTux am 11 April 2017, 21:23:31
I'm not sure but,

set alias=Front.Room.-.Main.Light on

can work
Titel: Antw:Using spaces in alias names
Beitrag von: gw0udm am 11 April 2017, 21:36:32
Zitat von: CoolTux am 11 April 2017, 21:23:31
I'm not sure but,

set alias=Front.Room.-.Main.Light on

can work

Yes that does work - thanks!

James