Set counter value

Hi @uiguy, maybe use this:

It works great and you can set any states/attributes you want.