Chromecast + MQTT = two channels

Hello, i need to control the volume of the chromecast via mqtt.
Can I use 2 channels in 1 item?

Dimmer Google_Asistent_Volume3 "Hlasitost" <soundvolume> (Office, gAssistenten) { channel=" chromecast:audio:7e38d5f23908478fd348fc72e7aab72c:volume, mqtt:topic:mqtt_thing:Google_Asistent_Volume3", autoupdate="on" }

Now via MQTT is dimmer item changed, bud chromecast volume not.
When you change the dimmer via BasicUI the chromecast volume is changed.

Thanks for help.

Yes. But -
Both channels can update Item state.
Both channels will get Item commands.
Neither channel cares what the other channel does i.e. if an update comes in via one channel, it will not get sent to to other.

What relationship are you trying to create here, what needs things doing to it (command) and what is reporting status (update)?

I want to control chromecast volume via MQTT topic

When receiv mqtt command mqtt:topic:mqtt_thing:Google_Asistent_Volume3 value, than set chromecast volume.

When 1 item is enough, I don’t want to use 2 items and a rule.

Use the MQTT channel option to post incoming messages as commands to the Item. Then the chromecast channel will gets its command.

yes can you please write an example code?

There is no code.
However you set up your MQTT channel, go back there and change the postCommand setting to true, described in the docs