I uses name conventions for different types of Dummy Variables that I have, e.g
Bedroom_Temperature
Bedroom_Humidity
Study_Temperature
Study_Humidity
I would like to be able to define the rooms these are in based on a regex, e.g
attr Study_.* room Study
attr .*_Temperature room Temperature
is this possible ?
thanks
Yes, that should work, however be aware that existing room assignments will be overwritten.
To append rooms, have a look at the roomadd cmdalias https://wiki.fhem.de/wiki/Cmdalias
thanks!
I just implemented the -a and -r options for the attr command, so you can add some devices to further rooms with one command:
attr -a Bedroom.* room ,Bedroom
To remove them use:
attr -r Bedroom.* room ,Bedroom
The comma (,) at the beginning is necessary, as rooms are separated with comma.
In all other cases a space will be inserted automatically.
The -a is not necessary if the device has no rooms assigned yet.
I discovered that the order is different from using the room attribute list with mouse, the new one is just appended.
Second, i realized, that a room is added twice, if (accidentially) the command is executed twice.
Don't know if its correct or could cause other Problems.
Stephan