How to manually set state/value of sensor?

Could you tell us what sensor should be created?