Tagging a Lightbulb in the Semantic Model

Hi,

question: how do you guys tag your smart light bulbs in OH3?
do you only tag the equipment as “light”, or also the switch and the brightness?

this is how it looks for me:

and this is for example how the powerswitch and brightness items of that group look like:

does this make sense to you?
I ask because if I for example tell HABot to turn off the kitchen lights he also toggles the brightness items down to 0% for example, which is not really what I want.

also, when I go to the lights list on the Equipment tab of MainUI, it lists everything there. I’d much rather only have the groups (equipment = lightbulb) show up there, and have them clickable for details.
I know I can do my own overview pages, but helping OH3 with the generated ones would be fine for me as well :slight_smile:

thanks

In general, if you’ve more than one Item to represent a device you will want to:

  • Create a Group Item and tag it with an Equipment tag
  • Add each of the Item to that Group, tagging them with a Point and Property pair of tags.

For a light, I usually use “Lightbulb” for the Equipment tag. The Switch Items would be tagged with Switch,Light. I don’t have any Dimmer Items nor any Color Items so I can’t comment on that except to say that a Color Item can receive Dimmer command and Switch commands. Similarly, Dimmers can receive Switch commands. Therefore the usual approach is to just have the one Item which you can treat as either a Dimmer or a Switch depending on what makes the most sense at the time.

Your devices might not work that way though and you might be an edge case. The only way I can think to work around that would be using a Proxy Item and a Rule. You’d command the Proxy Item and the Rule would send ON/OFF to the actual Switch Item or the new Dimmer command to the actual Dimmer Item based on the command received. Only the Proxy Item would be a part of the model.

To block something from appearing there, the best approach is to simply leave it out of the model. You can also apply a default list widget to those Items and set a Visibility Option to false which will hide it from the list. But it is going to hide it everywhere in the automatically generated pages. You can’t hide it on the Equipment tab but leave it on the Locations tab.

The way that all the cards work on the automatically generated pages is as follows:

  • The Equipment is represented with a gray row that is just a label
  • Each Point that is a member of the equipment is shown as a widget under that label

You could maybe achieve what you are after using subequipment. But that is going to lead to a proliferation of Equipment Items. In this case you would have to create an Equipment for each light that are then members of your Group Equipment that is itself a member of the location. Then the card will let you click on the Group Equipment and it will open a new card showing all the subequipment and I think their points. Though it might just show the subequipment and you’ll have to click again to get to the points.

2 Likes

Thanks a lot, I thought that’s more or less how it works.
maybe I will un-tag the dimmer, as it causes ill effects with HAChat :slight_smile: