You need to get the state of the sensors, and you need to convert them to numbers (they are stored as strings) before making a numeric comparison like greater than. Also your second ‘sensor’ can be an input number. No need to convert it to a sensor if that is what you were doing.