Retrieve latest Channel/Item State and Supported Commands/States of a Channel


Can someone show me how to achieve the fol​:point_up:lth examples? :smile:

Q1) In handleCommand(ChannelUID channelUID, Command command) of a class inherited from BaseThingHandler, how to I retrieve the current state of the Channel or associated item?

Q2) in void channelLinked(ChannelUID channelUID), I can get the accepted item type “String” via the following code. But how do I