I have Openhab 3 installed on a RPI3, there’s a problem since last version that I wanted a fix for, I have a mqtt dimmer that have 2 different commands, one for the brightness and another for ON/OFF, and for controlling it I need to have 2 Items one for each command, is there an item type that have this 2 controlls or I always will need to have 2 different items for the light?
I use google assistant and it sometimes don’t know what to do because of the 2 items for the same lamp.
You could go the other way, and introduce a third Item.
This virtual Item is not linked to MQTT at all, but could be exposed to google assistant. This one goes on your UI, the real MQTT Items can be invisible.
A rule listens for commands to the virtual Item, and routes them to whichever real MQTT Item is appropriate.
Another rule can listen for state updates coming in from MQTT (assuming you have any) and update the virtual Item.
but what itemtype do I use to in the same item I have the dimmer and the switch?
openHAB Dimmer type Item handles commands ON,OFF, and a numeric (for % brightness). This Item type has a numeric state (% brightness).
The openHAB Item is quite happy doing what you want all in one Item - your difficulty is around splitting out the commands from one Item to different MQTT messages.