How to poll state without overwriting actions in rules?

That seems all good.

So what problem occurs when you want to send a command?

Well when I send command, it can take 10-20 for the charger to change to the “ON” mode. During this 10-20 seconds the poll might kick in and reset the mode to “OFF” which then triggers the rule to send “OFF” command to the device. This has been fixed by introducing a grace period of 30 seconds, basically it ignores any state update from polling for 30 seconds after a command is sent to the charger.
Just to be clear, “send command” I mean call the cloud based REST service to change the charger operating mode.
Next thing I’d like to do is to disallow user to send ON/OFF action when the charge is in wrong state. However as @rlkoshak pointed out that it is not possible - partially due to ON/OFF command is derived from current state and previous state (I added the complexity because I want to adjust charging power by Dimmer).

Okay. That’s just an exaggerated version of every real-world device.

Let’s examine this part. Why would you have a rule that listens to device device status changes, and then commands the device to do what (the rule thinks) it is already doing?
This seems to be the root of the trouble.

I’m beginning to think you can solve your ills (and add the extra functionality you want) by isolating “what I would like to do” from “what it is really doing”. i.e. use two Items here. One is linked to the real device, gets status updates. The other is used in your UI and rules to issue commands.
Whenever the ‘dummy’ Item gets a command, you know it is a real desire to do X.
Rules can process this, decide if it should be passed to ‘real’ Item.
Whenever the ‘device’ Item gets a status update, you know its a real update from the device, not just a wish.
Rules can process that, for example copying a changed state to the ‘dummy’ Item.

You’ll probably want to inhibit autoupdate on one or both Items too, to uncouple state from command. Without knowing the detail of your rules, maybe you only need to do this for your one Item now to solve the whole thing.