marinmitev / smarthome

Eclipse SmartHome project
Eclipse Public License 1.0
2 stars 1 forks source link

How to limit the type of items for a trigger / condition #200

Open smhgit opened 8 years ago

smhgit commented 8 years ago

I want to define a trigger / condition and to limit the types of items that can be assigned to it (so in the UI only those items will be shown). E.g., only temperature sensors, only doors etc.

The options I can see are:

  1. Add a tag which will define the types
  2. Somehow use the context (currently there is the item context but it is to general).

Is there other way to do it?

kaikreuzer commented 8 years ago

This is what the tags are meant for. Unfortunately, we do not have any detailed out the tag concept, which will be a prerequisite for your request (unless you are fine with defining your own tag library).

Required tags can be specified directly for inputs/outputs. For config parameters, the context is probably the best place to put the tag list. But I agree that as the parameters are simple strings for item names, we also would have to clearly state that this is about items. Not sure if this information should all be put into the context string. So this is indeed a question that needs to be discussed, thanks for raising it.

danchom commented 8 years ago

May be there should be a list of predefined tags, because we can't guess what tag was set the author of the module type i.e fridge or refrigerator