To elaborate a bit on @kjknauss answer, The topic you put for the “State Topic” on the MQTT Thing is the topic that OH subscribes to. “Command Topic” is the topic that OH publishes to. You are sending a message to the cmd topic so of course OH won’t receive anything.
Pedantry: the mosquitto_pub command you show is one bundled with your Mosquitto MQTT broker. When you say ‘the command line of Home Assistant’ do you just mean ‘from the device running Home Assistant’?
This is a good question. We may be leaking into a HA configuration discussion on an OH forum. Are you looking to control an OH integrated light with an HA UI? I run both OH and HA to integrate some equipment (HVAC and Fans) where there wasn’t an existing OH binding. But I never originate actions from HA. Perhaps you are just testing, but from your original post you had been using OH for years, so keep it that way and control from OH, but use HA to handle the few items that aren’t available in OH.
This is the opposite of what I am suggesting, I know. But if you an experienced OH user, do the opposite (unless of course you really like the HA UI).
To control devices the way you want, you will have to look into the concept of what HA calls helper items (i.e., similar to a proxy item in OH).
Also, are you able to control the Honeywell thermostat with HA?
I don’t know anything about Home Assistant but I do know openHAB. And what I know, based on what you’ve shown so far, is that your publish command is to the topic you’ve configure openHAB to only publish to. OH will never see any messages sent to that topic. If you want OH to see it, you have to publish to the State Topic. That’s the only topic OH subscribes to.
If you want that message to be sent to the linked Item as a command, there’s a checkbox on the Channel config to treat state updates as commands.
But unless you’ve changed your config since posting above, the only messages OH will see are those published to homeassistant/switch/garage_entrance/state
I would suggest that you need to decide to use either OpenHAB or HomeAssistant for your automation system. I’ve used both system, they each have their pros and cons. If you’re planning to run the two systems simultaneously I think you’re going to make maintaining the systems challenging. You’ll have twice of everything to maintain and learn, from versions, upgrades, different programming styles, etc., and you’ll be asking questions on multiple forums; OpenHAB on this one and HA on another.
I tried the integration but unfortunately it does not support dimmer switches and the switch toggles do not update or stay synced the physical switches without the constant reloading of the integration.
In my experience this will be another automation. My solution looks like this (for a thermostat):
When changed in OH UI/sitemap
OH channel cmd topic→MQTT broker→HA automation (change temp from payload)→thermostat
or Changed at thermostat
thermostat→HA publish changes via Statestream→MQTT broker→OH channel state topic/linked item
Also Changed in HA UI works (I don’t control from HA though)
HA changes thermostat and publishes changes via Statestream→MQTT broker→OH channel state topic/linked item→(now goes back) OH channel cmd topic→MQTT broker→HA automation (change temp from payload, which does nothing based on conditions in the automation since the thermostat temp already equals the payload).
Everything stays in sync, including state and cmd topics (you can watch in MQTT Explorer).