Using spaces in alias names

Begonnen von gw0udm, 11 April 2017, 19:22:46

Vorheriges Thema - Nächstes Thema

gw0udm

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

DeeSPe

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
MAINTAINER: 22_HOMEMODE, 98_Hyperion, 98_FileLogConvert, 98_serviced

Als kleine Unterstützung für meine Programmierungen könnt ihr mir gerne einen Kaffee spendieren: https://buymeacoff.ee/DeeSPe

Thorsten Pferdekaemper

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
FUIP

CoolTux

I'm not sure but,

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

can work
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

gw0udm

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